|
Post by blarz on Nov 14, 2019 21:00:51 GMT
Hello- Thanks for taking the time to look at my post.
I have a sustain pedal that is working in reverse on a particular keyboard controller (the researched usual hardware fixes don't seem to work.) I want to pass the midi through StreamByter to switch the 0 and the 127 messages on cc64 so the sustain will work as expected, sustaining on pedal down.
It sounds simple but I am a complete noob here. Any suggestions would not only help with my goal but also also assist me in better understanding a bit about coding for the platform. So thanks in advanced for helping on both accounts.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 14, 2019 21:13:26 GMT
Hi blarz , Try this: # reverse sustain pedal if M0 == B0 $64 calc M2 = $127 - M2 endRegards, Nic.
|
|
|
Post by blarz on Nov 14, 2019 22:00:18 GMT
Thanks Nic- So fast of a response. And it worked a treat! Now I will look at how it logically worked. Cheers!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 14, 2019 22:17:54 GMT
Hi blarz, First line detects if event is CC 64 on channel 1 Second line subtracts 127 from CC value (in M2, 3rd byte) to invert. Regards, Nic.
|
|