|
Post by Michael on Oct 15, 2017 17:23:57 GMT
Hi,
i was wondering if using midifire it would be possible to vary the midi CC a controller outputs with each subsequent press.
So for example, a footswitch/sustain pedal first press, it sends CC 64 and then the next press it sends CC 65, next press it goes back to 64, press it again it outputs 65 again and so on.
Is this possible?
Thanks
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Oct 15, 2017 19:32:33 GMT
Hi,
Definitely doable. Here's a Stream Byter ruleset. When CC64 (on ch1) seen, it is alternately left intact or remapped to CC65. The last sent CC number is shown in the left block label.
IF LOAD ASS L0 = 0 # CC counter ASS K0 = 2 # modulo END # trap incoming CC64/ch1 IF M0 == B0 40 MAT L1 = L0 % K0 IF L1 != 0 MAT M1 = M1 + L1 END SET LB0 M1 +D MAT L0 = L0 + 1 END
If you change the ASS K0 = 2 near the top to ASS K0 = 3 then it will cycle through 64,65 and 66 and back to 64 each time it sees 64.
Regards, Nic.
|
|
|
Post by Michael on Oct 15, 2017 20:35:13 GMT
Hi Nic,
Thanks very much for getting back to me.
As is it doesn't seem to work. When I changed it as you suggested to cycle through 64, 65 and 66 it does work.
I'm a complete novice at this, so I'm not sure how to troubleshoot it myself.
To give a bit more detail, I'm basically just wanting to start and stop the transport in beatmaker 3 with my sustain pedal. I've selected midifire as the input in bm3 and it's picking up CC64, but not 65. If I change ASS KO to 3, then it does cycle through all 3 though.
Thanks
|
|
|
Post by Michael on Oct 15, 2017 20:36:45 GMT
To add, it seems to cycle in this order: 64, 66 then 65.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Oct 15, 2017 21:24:49 GMT
Right, so you probably want to move the CC up only when the CC is marked as 'OFF' (sustain pedal released) rather than any value of the CC. Try this out:
IF LOAD ASS L0 = 0 0 ASS K0 = 2 END # trap incoming CC64/ch1 IF M0 == B0 40 MAT L1 = L0 % K0 MAT M1 = M1 + L1 SET LB0 M1 +D IF M2 < 40 MAT L0 = L0 + 1 END END
Regards, Nic.
|
|
|
Post by Michael on Oct 15, 2017 22:09:16 GMT
Perfect.
Thanks for that.
I'll try and see if I can understand why this works for future reference.
Much appreciated. I'm glad apps like this exist, even if I can't currently understand the stream byter part myself.
|
|