Block MIDI Messages

Post Reply New Topic
RELATED
PRODUCTS

Post

Is it possible to block certain MIDI messages from going to Bitwig in a controller script? It seems all MIDI messages will go through to Bitwig for possible assignment irrespective of what the script does with them, unless there is a specific filter somewhere?

In my case I have rotaries that are very sensitive and send taps as well as left/right data. By just placing finger on rotary a tap will be sent first, which will then occupy the assignment instead of the intended left/right. So ideally I would like to bury the tap message if possible.

Post

bassc wrote: Fri Jan 03, 2020 4:56 pm Is it possible to block certain MIDI messages from going to Bitwig in a controller script? It seems all MIDI messages will go through to Bitwig for possible assignment irrespective of what the script does with them, unless there is a specific filter somewhere?

In my case I have rotaries that are very sensitive and send taps as well as left/right data. By just placing finger on rotary a tap will be sent first, which will then occupy the assignment instead of the intended left/right. So ideally I would like to bury the tap message if possible.
Yes, that is possible. Watch my tutorial videos #3 and #4 to get a basic understanding how MIDI works in the API (it is a bit tricky).

In #4 I talk about the NoteInput, you need to look at its parameters:
https://www.youtube.com/watch?v=OGBCxqs ... FM&index=2

Post

Thanks Moss, I will watch videos but I have looked at NoteInput and used it previously. It can filter what goes to the controller script, but it would seem all MIDI input will still go through to Bitwig for possible assignment regardless of this or what the script does with it?

For example, if you have a slider and write code to update something in Bitwig, that will happen but the original CC value will still slip through too for manual assignment? This is what I would like to bury.

Post

bassc wrote: Sat Jan 04, 2020 11:04 am Thanks Moss, I will watch videos but I have looked at NoteInput and used it previously. It can filter what goes to the controller script, but it would seem all MIDI input will still go through to Bitwig for possible assignment regardless of this or what the script does with it?

For example, if you have a slider and write code to update something in Bitwig, that will happen but the original CC value will still slip through too for manual assignment? This is what I would like to bury.
No, it doesn't. The NoteInput only forwards what you tell it to but note that if you do not give any parameter it has a default setting!

Post

Hmm my tests show otherwise. The NoteInput filter will block specified messages from firing the MIDI callback in the script, but if you right click a UI control in Bitwig then "Map to Controller or Key", the original message can still be assigned against that control (viewable in browser panel > mappings) regardless of the NoteInput filter mask.

However, I have solved this another way after thinking about it a bit more.

Rather than try to block the message to Bitwig for assigning (which I don't think is possible), I'm making the unwanted message fire an update on a UserControlBank.

In this case calling inc(0) on a control in the bank works and will fire an event that does nothing, which prevents the original MIDI input message. This is because UserControlBank is a higher priority than the original MIDI message, so it comes first and intercepts it to do nothing. So this also lets me assign the unwanted push message to the rotary dial instead, making assignment happen on the dial when it is pushed.

If you think about this for a Mackie MCU slider, which sends a push when tapped, this effectively turns push into a slide for assignment purposes. In my script I have a mode that e.g. lets the sliders (rotaries in my case) be freely assignable, and so converts push into slide. The push is much more easily triggered on the controller I'm working with than the MCU, hence wanting to do this for this mode.

Post

bassc wrote: Sat Jan 04, 2020 12:14 pm Hmm my tests show otherwise. The NoteInput filter will block specified messages from firing the MIDI callback in the script, but if you right click a UI control in Bitwig then "Map to Controller or Key", the original message can still be assigned against that control (viewable in browser panel > mappings) regardless of the NoteInput filter mask.
Are you using Bitwig 3.1? I just ran into this as well and it seems that User Controls are somehow broken.

Post

Nope i am on the earlier 2.3.5, interesting.

I do have an upgrade plan I’ve not applied, but thought I’d stay back a bit for backwards compatibility. The java API seems to not let you call depreciated methods so that you’re always building for the latest version.

Post Reply

Return to “Controller Scripting”