Why does this conditional operation not work?
Posted: 16 Mar 2017 00:12
I have a Fader object and its midi input and output are disabled. Then I create a script "On Expression, Fade.x" to get feedback to the fader from a hardware midi controller sending pitchbend:
This works! Then I create a script"On Midi, Pitchbend, Channel 1" to output midi pitchbend:
Ok, now I get midi output from the Fader in Lemur. However, I also get doubled midi output from feedback sent to the fader, which is not how I want it. Well, this is why I created the condition in the first script:
This should theoretically only send the mid out, as long as I touch the fader. But instead, the midi gets sent out anyway ... I don't understand why?!
Code: Select all
midiout(1,{224,1,Fader.x*127});
Code: Select all
setexpression(Fader,'x',MIDI_ARGS[0]/16000);
Code: Select all
if(Fader.z>0) midiout(1,{224,1,Fader.x*127});