Author Topic: Understanding unknown and Default entries in Software State  (Read 3181 times)

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Understanding unknown and Default entries in Software State
« on: January 24, 2022, 05:04:31 PM »
Hi Alexey

I use a Software State called 'FriendlyNames' to synchronise Cakewalk track recording input sources with my digitally controlled mixer.
The software state I have at the moment has the following entries:

12 x real audio sources using Friendly Names
1 x '--- none ---' for no source selected
114 x Dummy entries
1 x 'unknown'
1 x Default

Each time a track input (source) is changed then AZ controller should provide a unique MIDI value to my PIC Computer.

As well as the 12 real audio sources which I use for recording, there are two other types of sources which appear in each track's Input Selector dropdown:

Type 1. Other audio sources which I never want to select but which need to appear for other purposes
These are less of an issue except if they are selected accidentally in which case I want to ignore their feedback MIDI value.

Type 2. The outputs of Soft Synths which appear as inputs to audio tracks.
These have to be selectable so you get audio from the soft synth but I want to ignore their feedback value.

The problem I am having is that the feedback value I am getting for both 1. and 2. above is not consistent and sometimes output the same MIDI value as one of the 12 Friendly Name sources.
Today during testing, all of 1. and 2. above are reporting MIDI value 04 which is the same value which one of my 12 Friendly Name reports.

I have attached the AZ Preset which is called 'RECORD'.  This runs in the 7th instance of AZ Controller.
You will see the software state and 24 controls (T1Mon to T24Mon) which provide the track input selection feedbacks.

I would be grateful if you could have a look in case I have made an error in the actions list or anything else which might be causing the non-Friendly Names to report incorrect MIDI values.

Regards
Robert



Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1578
Re: Understanding unknown and Default entries in Software State
« Reply #1 on: January 25, 2022, 10:02:10 AM »
Hi Robert,

I have mentioned already, routing IO (input output) in general and Sends routing in particular are extreme buggy, on Cakewalk level (sends are reordered on destination selection) and in Surface API level (names/numbers are sometimes correct, but in many situations does not). I would not trust it.

But if you want at least predictable results from your preset, in TXMon "Set State" FriendlyNames "unknown" just before "Set State" "<by text>". In this case it will not be "random" (in fact the last value set in Logic content or default, "REC 1 : L") in case current name is not found in states and the "<by text>" action is effectively void.

Cheers,
Alexey.

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Re: Understanding unknown and Default entries in Software State
« Reply #2 on: January 25, 2022, 10:55:50 AM »
Hi Alexey

Thanks for your suggestion.  When I add the "Set State" FriendlyNames "unknown" just before the "Set State" <by text> in the feedback tab actions for the TXMon, then I get no feedback MIDI message output when the selected source is not one of those listed in the "FriendlyNames" software state.  This is an improvement.

Can I ask if there is any way to get a preset value output instead of no feedback message?  e.g. could I get a preset value of 127 for any "unknown" source?

And to help my understanding for the future:

Does the software state entry "unknown" have a specific purpose within Software States? or is it just an arbitrary entry?

What is the purpose of the 'Default state' tick box?

Best regards

Robert

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Re: Understanding unknown and Default entries in Software State
« Reply #3 on: January 25, 2022, 02:58:18 PM »
Hi Alexey

Further to last post, I realised I had to add feedback actions for the FriendlyNames "unknown" within T1Mon to T24Mon feedbacks.  So I added these actions with the value of 127 and it works!

So now when a track is selected to an input which is not one of the 12 Friendly Names or "none", it outputs the value 127 which I can deal with in my PIC.

If you could respond to my two additional questions, it would be helpful to my understanding of how Software States work.  Questions were:

1. Does the software state entry "unknown" have a specific purpose within Software States? or is it just an arbitrary entry name?

2 What is the purpose of the 'Default state' tick box?

Again, thanks for your help.

Regards
Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1578
Re: Understanding unknown and Default entries in Software State
« Reply #4 on: January 25, 2022, 08:14:17 PM »
1. No states have any special meaning.
2. "Default state" is the one which is set on startup. Originally it was always the first, but that is not practical in some situations.

Note that current state is global ("Engine" state). You can check all current states of defined by you sets in the Overview tab.
That Engine state is changed in 2 cases:
1. when changed during execution in Logic mode, so on MIDI/OSC message (even looped back). So in corresponding control or in  function called from such control.
2. when changed in Monitoring mode, so in Feedback control or in Logic control called as a function from feedback control, when corresponding Action has "Set Engine" and it is checked.

During "Monitor evaluation" mode, so actions in a logic control prior Monitor Action, any state changes are "local". In case monitor is triggered, Feedback actions are called in Monitoring mode.
Changes from corresponding "Monitor evaluation" are still there. Once Feedback is finished, all local changes are lost. Sets are reset to Engine state. There is special "Set from monitoring" option
to explicitly save current local state as Engine state.

Note that "Set Engine" flag has reversed meaning in "Monitor evaluation" mode, changes with that flag set are NOT executed. So, do not set this flags in Logic control actions which are not functions called from Monitors (or till you hit the case when that is useful during "Monitor evaluation"... but you probably never hit such case ;) )

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 105
Re: Understanding unknown and Default entries in Software State
« Reply #5 on: February 10, 2022, 10:20:31 AM »
Hello Alexey
Thank you for the detailed explanation of states which is really helpful to me.
Best regards
Robert