OK, did some experimentation - sorry, this will be a long post…
Inserted the rack Smoothie 1, set its parameters “Output Gain” and “Selected Rack State” to be controlled by song states. Initialized the first state with default values (gain 1, selected state “0.3”). Saved the song file - the rack section looks like this:
{
"kind": "RackHost",
"embeddedRack": null,
"RackFile": "C:\\Cantabile\\Racks\\Smoothie 1.cantabileRack",
"gain": 1,
"rackState": "0.3",
"exportedRackState": null,
"RackFileRelative": "..\\..\\Racks\\Smoothie 1.cantabileRack",
"userNotes": null,
"primaryView": false,
"resetRackState": false,
"runMode": "Running",
"stateManager":
{
"behaviour": 6,
"indexedBehaviour": null,
"externalBehaviour": 0,
"externalIndexedBehaviour": null,
"nonLinkedBehaviour": 0,
"nonLinkedIndexedBehaviour": null,
"resetBehaviour": 0,
"resetIndexedBehaviour": null,
"states":
{
"22":
{
"runMode": "Running",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": true,
"savedBehaviour": 1023
}
},
"resetState": null
},
"solo": false,
"soloControl": true,
"wiringPositionX": 0,
"wiringPositionY": 0,
"nextUniqueID": 1,
"uniqueId": 86,
"routes": [],
"name": "Smoothie 1",
"sendBalance": 0,
"displayExpanded": true,
"slotColor": "Default"
}
So, as expected only one state defined, rest “undefined”.
Now did an “update all states” on the two parameters and then changed the values for one specific state (State “13”) to gain 0, rack state “2”. Saved the song.
This is what it looks like now:
{
"kind": "RackHost",
"embeddedRack": null,
"RackFile": "C:\\Cantabile\\Racks\\Smoothie 1.cantabileRack",
"gain": 0,
"rackState": "2",
"exportedRackState": null,
"RackFileRelative": "..\\..\\Racks\\Smoothie 1.cantabileRack",
"userNotes": null,
"primaryView": false,
"resetRackState": false,
"runMode": "Running",
"stateManager":
{
"behaviour": 6,
"indexedBehaviour": null,
"externalBehaviour": 0,
"externalIndexedBehaviour": null,
"nonLinkedBehaviour": 0,
"nonLinkedIndexedBehaviour": null,
"resetBehaviour": 0,
"resetIndexedBehaviour": null,
"states":
{
"22":
{
"runMode": "Running",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": true,
"savedBehaviour": 1023
},
"1":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"5":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"23":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"13":
{
"runMode": "Running",
"sendBalance": 0,
"selectedState": "2",
"resetRackState": false,
"outputGain": 0,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": true,
"savedBehaviour": 1023
},
"14":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"15":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"19":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"16":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"2":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"20":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"17":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"18":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
},
"21":
{
"runMode": "Unloaded",
"sendBalance": 0,
"selectedState": "0.3",
"resetRackState": false,
"outputGain": 1,
"exportedState": null,
"userNotes": null,
"slotColor": "Default",
"solo": false,
"soloControl": false,
"savedBehaviour": 0
}
},
"resetState": null
},
"solo": false,
"soloControl": true,
"wiringPositionX": 0,
"wiringPositionY": 0,
"nextUniqueID": 1,
"uniqueId": 86,
"routes": [],
"name": "Smoothie 1",
"sendBalance": 0,
"displayExpanded": true,
"slotColor": "Default"
}
So it looks that song state information was created for the rack for all song states, so no “undefined” values.
Now when I jump between states “13” and “22”, the parameters of the Smoothie rack get applied correctly, but when I jump from state “13” to state “1” or “5”, the values from “22” carry over.
Looking at the state parameters in the song file in detail, I notice two key differences between states “13” and “22” and the rest:
- runMode of all other states is (incorrectly) set to “Unloaded”
- savedBehaviour is set to 0 instead of 1023
So I just did some manual patching of the song file and used “revert song” to re-load. Just changing runMode to “Running” didn’t help, but as soon as I also set “savedBehavior” to 1023 for all rack states, things changed for the better - now all rack states load correctly, no values carried over from previous states.
Now changing values via “Update State” properly sticks for this rack for all states.
Summary:
- when using “Update All States” for a newly created rack, Cantabile does create new song state information for the rack, but incorrectly sets their runMode and savedBehavior values
- this makes these parameters not load correctly for the un-edited song states for the rack in this song - rack parameters will be carried over from the previously loaded song state
- setting savedBehavior to 1023 manually and reloading the song fixes that problem - the song state information now loads correctly with changing song states - no more carry over
So to fix this, I guess, you’ll need to teach Cantabile to set the “savedBehavior” to 1023 (and runMode to “Running”) when creating new song state information for a rack via Update All States.
Makes sense?
Cheers,
Torsten