I can’t seem to get SysEx Encoder filters with “Any” CC to ever trigger. Am I doing it wrong? Here are my steps:
Open a fresh (blank) Cantabile song.
Add a SysEx Encoder filter to the “Onscreen Keyboard (out)” port with the following settings:
Channels: Omni
Controller Kind: CC Coarse
Controller Number: Any
Controller Value: Any
Suppress: yes
Generate Sysex: F0 $(cc) $(val) F7
Open a MIDI monitor for the “Onscreen Keyboard (out)” (making sure it’s set to “Post MIDI Filter”), and send it a CC event. (I used a binding to send CC=0 Val=1.)
Expected result: MIDI monitor should show F0 00 01 F7
Actual result: MIDI monitor shows original CC event unfiltered
To double-check, change the MIDI Filter from step 2 to only trigger on CC=0 instead of “Any”.
Repeat step 3, and observe that the correctly encoded sysex event appears (F0 00 01 F7).
I’ve had a look at this and the problem is the UI should allow selecting “Any” for the Controller Number (the filter as coded currently doesn’t support this).
On a somewhat related note (and hopefully not sidetracking the original issue), it’d be great to have “Any” as an option for controller number in a binding. In my case, i have a Foot Pedal Rack with each pedal routed to a different rack output port, so i’d like to be able to bind from that pedal without having to suss out what CC it’s sending.
In my case, I need a route that extracts bits 2-5 from each incoming CC value and converts that into a note velocity. I can’t think of a way to do it without using a sysex encoder filter with CC=Any. My plan was to use three filters: (1) use a sysex encoder to extract the relevant bits, (2) use a sysex decoder to convert it back to a CC message, (3) use a CC-to-note filter to convert it to a note.
When I tried that, I encountered two obstacles/bugs:
The sysex encoder filter didn’t work with CC=Any (the bug I reported).
The CC To Note filter unfortunately suppresses zero-valued CC events even when Release Mode is set to “Never”. (I need it to output a note-on with velocity zero, since that’s what turns off lights on my MIDI controller.)
I think I can work around obstacle #2 with some more filters (e.g., velocity curves), though maybe it’s a bug too? But I can’t think of a way to do it without the sysex encoder with CC=Any.
I just tried this and it seems to work fine for me. Perhaps send me a screen shot of your MIDI filter and MIDI Monitor screen shot to show me what’s wrong.
Note this has implications when using RPN/NRPN as the controller (aka parameter) number can be more than 8 bits wide. In such cases you can use an expression like so:
I’m using a PreSonus Atom SQ as my MIDI controller. It’s by far the best lightweight controller I’ve ever used (I should write a post about it once I’ve got it fully working with Cantabile), but its MIDI protocol is a bit unusual (and undocumented!). To change the hues of its lighted buttons, one must send it Red Blue and Green values separately as note-on velocities on channels 2-4.
Your screen shot shows a CC To Note filter with release mode set to “When CC Value 0”, which indeed works as expected—when the CC value is zero, it sends a note-off event. But that doesn’t work for programming the Atom SQ, since the Atom SQ wants a note-on event with velocity zero. To achieve that, I set the filter’s release mode to “Never”, hoping that this would directly translate all CC values to note-on events of the same velocities (even velocity zero). But it doesn’t; a CC with value zero gets suppressed, and no note-on events with velocity zero can be generated with it as far as I can tell.
But there’s a workaround: I can use a velocity curve filter to raise the CC values above zero, then convert them to notes, and then use another velocity curve filter to drop them back down. It’s a bit clumsy but it generates the velocity-zero note-on events needed to turn off the Atom SQ’s lights.
This is fantastic! Thank you, Brad! (The RPN/NRPN solution is very slick!)
Sorry to butt in, but just to say that I bought myself an Atom SQ controller and found it to be a superbly built device. I loved so much about it, but… I found no way to make it friendly with Cubase or Cantabile, so gave up and sold it.
So I, for one, would be interested to see how you get on.
I’d just like to jump in here and say that I have a few situations which confounded me until it was realized that it was the Note On Vel = 0 vs real note off which was the cause of the issue.
Cantabile has no filtering I can find which would allow a simple conversion to take place. It’s all down to the venerable PizMidi converter to handle problems which arise due the choice of note off protocol.
OK - over and out
That would be a very useful filter.
Using velocity as a controller currently requires a mess of pizmidi to prevent the target diving back to zero when it sees these pseudo note off messages.
Oh, well then in that case, yes the CC To Note filter already does what I need!
Going back to the sysex encoder filter for a second… Have you ever considered passing the bytes produced by the sysex encoder filter through Cantabile’s MIDI parser instead of merely boxing them up as a sysex? This would make sysex encoder filters very powerful, since they would be able to produce arbitrary MIDI event sequences (sort of like the “raw bytes” feature of sysex encoder bindings).
I tried tricking Cantabile into letting me create non-sysex outputs by sandwiching them between sysex messages (e.g., writing F0 F7 90 4C 7F F0 F7 successfully generates a note-on, yet passes Cantabile’s sanity-check for F0 … F7). But Cantabile really doesn’t like me doing that. Sometimes it crashes, so I ceased my trickery.
For the next build, the MIDI Monitor will display zero velocity note offs as “Note Off *” (with an asterisk) to help distinguish the two variations of this event.
I’ve not considered that, but it’s a good idea. Leave it with me and I’ll see what’s involved.
Wow, I think this will be a great feature addition. It will even enhance the power of bindings, since it will now be possible to generate MIDI events that trigger bindings with filter-generated data. I will definitely be making use of it.