Re: Linking or double messaging from a fader
Posted: 05 May 2014 09:47
that clock example used to work.... I wonder what changed in Lemur?
Anyway - since your current example that we've been playing with are using MIDI info directly from a variable, you can't (to my knowledge) introduce any delays. To delay one message from another, it has to be done through scripting.
Basic idea is to creating a script with both messages in it and have the script triggered on a frame (you don't need as much delay as a MIDI clock can introduce, I don't think).
The script should store the current frame count and x values so that every time it is called (approx. every 16ms), it can check to see if the fader position has changed (x is different than the old stored value) and if one or more frames have passed (current framecount > stored framecount+1 or 2 or whatever is needed by the target).
If x has changed, send MIDI CC 102. If x has changed and MIDI CC 102 has been sent and the framecount is greater than the old framecount, send MIDI CC 103.
Anyway - since your current example that we've been playing with are using MIDI info directly from a variable, you can't (to my knowledge) introduce any delays. To delay one message from another, it has to be done through scripting.
Basic idea is to creating a script with both messages in it and have the script triggered on a frame (you don't need as much delay as a MIDI clock can introduce, I don't think).
The script should store the current frame count and x values so that every time it is called (approx. every 16ms), it can check to see if the fader position has changed (x is different than the old stored value) and if one or more frames have passed (current framecount > stored framecount+1 or 2 or whatever is needed by the target).
If x has changed, send MIDI CC 102. If x has changed and MIDI CC 102 has been sent and the framecount is greater than the old framecount, send MIDI CC 103.