|
Post by supadom on Jan 21, 2019 16:57:59 GMT
Hi all. Inspired by this thread and Janosax who brought me here I’ve been wondering if a similar thing (double and triple taps) could be done with PC messages? PC sending foot controllers still seem to be the majority these days so it might be useful for others as well. i have a controller sending PC: 0, 1, 2, 3 and 4 and would like to get it to send further messages via double and triple taps. Also I use streambyter, not midifire. Nic, I’m guessing this will need a new thread as well? thanks
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 21, 2019 17:17:30 GMT
Hi supadom , Yes, have created a new thread :-) It would be possible to modify the BlueVelvet code to work with PCs but the issue is that a PC is a single event, whereas the BlueBoard sends a note on/off as you press/release the button. This means, we can't do holds but we can do double and triple taps. Leave this with me and I'll make a PC version for you over the coming week. Regards, Nic.
|
|
|
Post by supadom on Jan 21, 2019 17:59:14 GMT
Thanks for that Nic. Yes, I was aware that there’s no hold with Program Change. Double and triple taps would be super handy though.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 21, 2019 18:07:56 GMT
Hi supadom , Actually, if you are running StreamByter in a host which will let you chain two AUs together, you can do it another way without me having to rewrite BlueVelvet. Load up two instances of the StreamByter and route them so the events from the pedal pass through the two of them in series. In the first, paste this code: CX = 8X XX 00 +C CX = 9X XX 7FIn the second, paste the BlueVelvet code. Current version here: IF LOAD # K0,1: timeouts in 10ms units # (adjust to suit) ASS K0 = 05 05
# convert timeouts to ms MAT K0 = 64 * K0 MAT K1 = 64 * K1
# init note counter array ASS I80 = 0 IF I80 < 80 +L ASS II80 = 0 MAT I80 = I80 + 1 END END
# force note offs 9X XX 00 = 8X
# detect note on, ch1 IF M0 == 90 SET LB0 IM1 +D IF IM1 == 0 # no timer yet, inject timer 1 SND F0 7D M1 00 F7 +DK0 +I END # increment note counter MAT IM1 = IM1 + 1 END
# detect note off, ch1 IF M0 == 80 IF IM1 > 0 # increment note counter MAT IM1 = IM1 + 1 END END
# detect timeout, ch1 IF M0 == F0 7D # issue/reset flag ASS I80 = 0
# timer 1 IF M3 == 00 # hold or single tap - process now IF IM2 <= 2 ASS I80 = 1 END
# other actions, process after second timeout IF IM2 > 2 # inject timer 2 SND F0 7D M2 01 F7 +DK1 +I END END
# timer 2 IF M3 == 01 ASS I80 = 1 END
# issue/reset IF I80 == 1 SET LB0 SFIN SET LB1 M2 +N
# issue correct note on + off MAT M0 = 90 + IM2 SND M0 M2 7F MAT M0 = M0 - 10 SND M0 M2 00 +D200
# show channel+note in labels MAT L0 = M0 - 7F SET LB0 L0 +D SET LB1 M2 +N
# reset note off count ASS IM2 = 0 END END
# block all incoming events XX = XX +B
Regards, Nic.
|
|
|
Post by supadom on Jan 21, 2019 18:42:48 GMT
Thanks Nic, it ain’t working though. When I press once I see the original PC0 followed by C-1 half a second later. Double and triple taps don’t seem to have any effect. I’ve cleared all of my loopy bindings but it did not make any difference.
Also It occurred to me that if I bind PC0 to record and then double tap the same switch in order to activate another action Loopy will start recording again before the double tap action is activated. How is this mitigated in blue board?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 21, 2019 19:12:01 GMT
Hi supadom , I will check into this tomorrow. Maybe I got something wrong. Leave that one with me. :-) Actually if you can post screenshot of the StreamByter event monitor in the BlueVelvet instance when you send a PC, that might give me a head start. Different taps are calculated with a timeout, so you won't get a single tap with a double tap. Regards, Nic.
|
|
|
Post by janosax on Jan 21, 2019 19:51:25 GMT
If each action send a different note you will not have any issue with Loopy. It seems that PC is not filtered, which leads to trigger PC learned action each time you do single/double/triple tap. Loopy will learn first action sent.
Also, you need to set count in/out recording and muting in Loopy to manage properly action delay, which is a normal behavior with multiple taps.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 21, 2019 21:31:08 GMT
Hi supadom , OK, I found a few minutes to try this out for myself in AUM. I have this working, but I had to make a small tweak to the 1st StreamByter code: CX = 8X XX 00 +C +D100 CX = 9X XX 7FSeems we need to add a small delay before the note off so that the note off arrives after the note on (I think). Regards, Nic.
|
|
|
Post by supadom on Jan 21, 2019 22:49:33 GMT
Ok, cool. My bad, I forgot to disconnect the direct connection between the pedal and loopy so it was picking up raw and streambyter commands.
So yeah, all works as intended and I managed to have 3 commands per switch which is pretty insane. Thanks!
One thing is the latency. At the moment I’m getting over half a second (500ms) latency. Is that the case with blueboard as well or is there some added latency in the code?
|
|
|
Post by janosax on Jan 21, 2019 22:55:51 GMT
With BlueBoard BT latency in midi note mode is around 10 ms I think. Add to this Blue velvet settings with 50 ms delay for single/ hold taps and 100 ms for other taps, and total is 60/110 ms which is far below what you get. Perhaps related to PC? What I know is that BlueBoard in PC mode has a more important latency than in BTLE midi note mode, but I never tried PC to really compare and perhaps it’s only a Bluetooth limitation. Is your pedalboard BT or wired?
|
|
|
Post by supadom on Jan 21, 2019 22:58:46 GMT
I’m thinking that if I could filter out PC commands that I’d need to be quick (like stop or engage recording) the latency for other less time dependant functions wouldn’t be too bad.
What would be a code to filter out say PC 0 and PC 2? Would that make it more immediate or would I still get the latency? I guess I could have those going directly to loopy without passing through streambyter.
|
|
|
Post by supadom on Jan 21, 2019 23:00:53 GMT
With BlueBoard BT latency in midi note mode is around 10 ms I think. Add to this Blue velvet settings with 50 ms delay for single/ hold taps and 100 ms for other taps, and total is 60/110 ms which is far below what you get. Perhaps related to PC? What I know is that BlueBoard in PC mode has a more important latency than in BTLE midi note mode, but I never tried PC to really compare and perhaps it’s only a Bluetooth limitation. Is your pedalboard BT or wired? Wired via 5 pin. So Boss FC50 > midi interface > iPad
|
|
|
Post by janosax on Jan 21, 2019 23:06:41 GMT
I’m thinking that if I could filter out PC commands that I’d need to be quick (like stop or engage recording) the latency for other less time dependant functions wouldn’t be too bad. What would be a code to filter out say PC 0 and PC 2? Would that make it more immediate or would I still get the latency? I guess I could have those going directly to loopy without passing through streambyter. Yes you could already midi learn those ones directly in Loopy.
|
|
|
Post by supadom on Jan 21, 2019 23:07:56 GMT
No, scrap the filtering out idea. If I have it connected with both direct and streambyter connections Loopy would pick up double messages for double and triple taps.
|
|
|
Post by janosax on Jan 21, 2019 23:12:19 GMT
In Loopy you should have MidiFire entry in which you midi learn what you need, and your normal pedalboard entry in which you learn PC. MidiFire will still send notes but if they’re not assigned that should work. That will works only if you have buttons dedicated to PC and others to midi notes. You will loose multiple taps actions on PC dedicated buttons.
|
|