nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 20, 2019 10:54:57 GMT
This script rewrites the MIDI channel of each incoming note to a discrete channel starting from channel 1. If multiple notes are sounded simultaneously then each note will be assigned to a separate channel in the order that they are played. Say 3 notes are sounded, then note 1 will be channel 1, note 2 will be channel 2 and note 3 will be channel 3. If note 2 is released and another note (or the same note) sounded while the others are still sounding, then that new note will be assigned the first non-sounding channel (2 in this case)
IF LOAD # L0-7F = assigned chan/note ASS L0 = 0
# K0-F = used channels (80 == unused) ASS I0 = 0 IF I0 < 10 +L ASS KI0 = 80 MAT I0 = I0 + 1 END END
# note ons 9X XX 00 = 8X IF MT == 90 # find next avail chan in K ASS I0 = 0 IF I0 < 10 +L # next available channel IF KI0 == 80 MAT M0 = 90 + I0 # rewrite ASS LM1 = I0 # remember channel ASS KI0 = I0 # mark as used ASS I0 = 10 # break loop END MAT I0 = I0 + 1 END END
# note offs IF MT == 80 # get channel from L ASS I0 = LM1 MAT M0 = 80 + I0 # rewrite ASS KI0 = 80 # mark as unused END
|
|
|
Post by Billy O on Mar 20, 2019 21:20:24 GMT
Would it be possible to amend this in 2 different ways? 1 so it works like the round robin on a dx11 or tx81z to that each time ANY note is triggered it fires off to the next midi channel in sequence 2 if you hold a note it cycles through the midi channels in time with the daw etc ( you could get wavestation type fx with this...
dont kno just throwing it out there
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 21, 2019 11:46:19 GMT
1. Is pretty easy. Just requires some simplification:
IF LOAD # L0-7F = assigned chan/note ASS L0 = 0
ASS L80 = 0 # next channel to use END
# note ons 9X XX 00 = 8X IF MT == 90 MAT M0 = 90 + L80 # rewrite ASS LM1 = L80 # remember channel # next/cycle channel MAT L80 = L80 + 1 IF L80 > 0F ASS L80 = 0 END END
# note offs IF MT == 80 MAT M0 = 80 + LM1 # rewrite END
Number 2 is a different kettle of fish and quite a bit more complex. In order to time notes, the script would need to be fed a clock signal and then auto-trigger notes on different channels in time to the ticks while held down. In this case, what happens when multiple notes are being sounded? Also what length should these notes be? The specification of this would need to be fleshed out first; really belongs in a different thread also. If you want to pursue this, maybe create a new thread and try and specify how this should work and I could then have a stab at it.
Regards, Nic.
|
|
|
Post by Billy O on Mar 26, 2019 21:23:34 GMT
Neat  Much thx. What you’ve written about the second idea: that’s exactly it. Note length would be determined by a variable input....but I’ll start a different thread 
|
|