desc: CC to Note (GianniMIDI) in_pin:none out_pin:none slider1:cc=64<0,127,1>CC slider2:channel=0<0,16,1>CC Channel (0 = all) slider3:note=36<0,127,1>Note slider4:noteChannel=0<0,16,1>Note Channel (0 = match CC) import my-lib.jsfx-inc @init prevVal = 0; val = 16; function toNoteOn() ( this.statusHi = 9; noteChannel && this.statusLo = noteChannel - 1; this.data1 = note; this.data2 = 127; ); function toNoteOff() ( this.statusHi = 8; noteChannel && this.statusLo = noteChannel - 1; this.data1 = note; this.data2 = 0; ); @block while (msg.recv()) ( convert = msg.isCC() && ((channel == 0) || (msg.channel() == (channel - 1))) && msg.data1 == cc; !convert && msg.send(); convert && ( ccChannel = msg.channel(); prevVal[ccChannel] = val[ccChannel]; val[ccChannel] = msg.data2; ); prevVal[ccChannel] < 64 && val[ccChannel] >= 64 && ( msg.toNoteOn(); msg.send(); ); prevVal[ccChannel] >= 64 && val[ccChannel] < 64 && ( msg.toNoteOff(); msg.send(); ); );