SysEx Encoder Filter "Any" CC?

I can’t seem to get SysEx Encoder filters with “Any” CC to ever trigger. Am I doing it wrong? Here are my steps:

  1. Open a fresh (blank) Cantabile song.

  2. 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
  1. 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
  1. To double-check, change the MIDI Filter from step 2 to only trigger on CC=0 instead of “Any”.

  2. Repeat step 3, and observe that the correctly encoded sysex event appears (F0 00 01 F7).

Am I misunderstanding how CC=Any works?

–Kevin

Just bumping this thread. Can anyone get any SysEx Encoder filter to trigger with CC set to “Any”? I still can’t find a way.

Thanks,
–Kevin

Still looking for help on this one… Can anyone reproduce the bug above? Should be a hopefully quick test.

If it’s verified to be a bug, maybe @brad will find a fix for it?

Thanks,
–Kevin

Hi @Hamlen,

I’ve added this to the list to investigate when I’m back at my dev machine (hopefully tomorrow).

Brad

1 Like

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).

Do you really need this?

  • If so, I can look into adding support for it.
  • If not, I’ll just fix the UI to not allow it.

Brad

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.

– Jimbo

1 Like

Thanks for looking into this, Brad.

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:

  1. The sysex encoder filter didn’t work with CC=Any (the bug I reported).

  2. 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.

OK. Out of curiosity what’s this for?

I’ll look into adding this.

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.

Next build will support CC = Any.

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:

which for RPN 312 (0x0138), sending values 16383 (0x3fff) and zero gives:

1 Like

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!)

1 Like

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.

1 Like

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 :sunglasses:

Correct, but… it sends the note off as a note on event with velocity zero. Isn’t that what you need?

(Note Cantabile’s MIDI monitor displays note on events with velocity zero as “Note Off”).

Sounds like a Note Off Protocol Switching MIDI Filter would be useful?

Brad

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.

Does this cover it?

1 Like

Looks good! :+1:

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 F0F7). But Cantabile really doesn’t like me doing that. Sometimes it crashes, so I ceased my trickery. :slight_smile:

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.

Brad

3 Likes

Next build supports raw MIDI data in sys-ex encoder, including generating multiple events.

Due to the way MIDI filters are processed, this does not support delays between events (as supported by the binding raw sys-ex).

1 Like

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.

Thank you, Brad!

1 Like