|
Post by mcdtracy on Apr 19, 2019 6:10:48 GMT
I have a MIDI Stream coming from an App call FAC Envolver. It's configure to send the envelope of the microphone out constantly and when the envelope exceeds a threshold it sends out a MIDi Note On & Off Pair. I'd like to insert the CC7 value into the MIDI Note ON's Velocity setting which gets locked in at 127 without this requested change to the Stream. Can I see a Script to do this? I next CC7 after the NOTE ON should be good for the Velocity "re-write" on the outbound MIDI NOTE ON.
The use case is to use the iPad Mic to make a MIDI Drum trigger for MIDI Drums. With this change I'll be able to hear accented notes on a snare drum or loud vs soft cymbal crashes.
21036: CH1 CC 7 1 21036: CH1 CC 7 1 21036: CH1 CC 7 1 21036: CH1 CC 7 1 21036: CH1 CC 7 3 21036: CH1 NOTE ON 36 127 21036: CH1 CC 7 24 21036: CH1 CC 7 28 21036: CH1 CC 7 28 21036: CH1 CC 7 27 21036: CH1 CC 7 24 21036: CH1 NOTE OFF 36 0 21036: CH1 CC 7 19 21036: CH1 CC 7 15 21036: CH1 CC 7 15 21036: CH1 CC 7 12 21036: CH1 CC 7 10 21036: CH1 CC 7 8 21036: CH1 CC 7 7 21036: CH1 CC 7 6 21036: CH1 CC 7 5
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Apr 19, 2019 7:07:39 GMT
Hi mcdtracy , Maybe something like this: if LOAD ASS L0 = 0 # init array END
9X XX 00 = 8X IF MT == 90 # note on - remember and block it ASS L0 = M0 M1 XX = XX +B END
IF M0 == B0 07 # got cc7 IF L0 != 0 # we have queued note, send it # with CC's value as velocity SND L0 L1 M2 ASS L0 = 0 END END
Regards, Nic.
|
|
|
Post by mcdtracy on Apr 19, 2019 16:25:53 GMT
Thanks. I'll give it a try.
|
|
|
Post by mcdtracy on Apr 19, 2019 19:24:52 GMT
Yes. It works great. The next CC 7 value becomes the MIDI NOTE ON velocity. In practice with FAC Envolver this turns out to track the Threshold setting for the NOTE ON's.
A nice update to the script would be to change 2 things:
1) Filter Out all CC's and just use them to capture the Volume value. The drum app doesn't need to see those CC's... just NOTE ON and OFF. 2) Capture the PEAK CC value after the NOTE ON event so the Drum sees Accents in the audio transients and the MIDI NOTE ON stream varies in volume.
Thanks, Nic. This script might motivate a few more StreamByter sales. FAC Envolver intends to add this behavior to an update but who knows how long that will take.
I'll share a drum solo when the accents are working. Until then this script just gives me some control over volume which I was using "MIDI Curve" to provide. Changing the CC's to track the peaks will allow me to play the "WipeOut" tom-tom solo or Gene Krupa's "Sing, Sing, Sing" tom-tom swing riff just by tapping on the iPad case.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Apr 19, 2019 19:47:17 GMT
Hi mcdtracy , Blocking the CC is easy. Just add XX = XX +B just before the last END (or in the next update, hopefully next week, use the BLOCK keyword instead along with more readable equivalents of the hated 3 character rules ;-) ) I will get back to you on the peak. It will of course delay the note on until just after the peak is reached, although maybe I'm not understanding exactly what you are looking for. Regards, Nic.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Apr 19, 2019 21:54:02 GMT
Hi mcdtracy , and here is the peak+block version... think this should work IF LOAD ASS L0 = 0 # init array END
9X XX 00 = 8X IF MT == 90 # note on - remember and block it ASS L0 = M0 M1 XX = XX +B END
IF M0 == B0 07 # got cc7 IF M2 < L2 # CC value dropped from previous IF L0 != 0 # we have queued note, send it # with previous CC's value (peak) as velocity SND L0 L1 L2 ASS L0 = 0 END END
# remember CC value for next time ASS L2 = M2
# block CC XX = XX +B ENDRegards, Nic.
|
|
|
Post by mcdtracy on Apr 20, 2019 4:33:41 GMT
It works great. It's tracking accents in the audio input. I shared in on the AudioBus Forum to recruit Drummer's to use StreamByter.
|
|