Sending MPE messages from a controller script - NoteInput discards channel

Post Reply New Topic
RELATED
PRODUCTS

Post

I'm currently developing a controller script to use my LinnStrument as a clip launcher in addition to its regular MIDI controller functionality. For this, I programmed the script to toggle between the regular LinnStrument mode and the cliplauncher mode whenever the user presses a button on the LinnStrument.

I've got it working mostly, but there's one thing I can't figure out: How do I send MPE data to a NoteInput?

Usually, you'd setup the filters for your NoteInput so that any note and controller data is directly forwarded the selected track. However, in my usecase, when the Linnstrument is switched to be a clip launcher, I don't want any notes to be forwarded to the track. Whenever I switch back to the regular midi controller mode, I want the notes to be forwarded to the track. This is where I'm stuck. The NoteInput either forwards note messages always or never. I can't make it switchable.

So then I decided to handle the forwarding myself in the onMidi() function of my script. When the cliplauncher mode is activated, I use the incoming MIDI messages to start/stop/record clips, etc. When the regular linnstrument mode is activated, I forward the incoming MIDI messages to the track by calling

Code: Select all

noteInput.sendRawMidiEvent(status, data1, data2);
The problem is that sendRawMidiEvent() discards any information about the source MIDI channel - making it impossible to use the MPE functionality.

So, the question is: Can the NoteInputs filtering be switched on and off? (I dont think so from the documentation) Or can I otherwise enable/disable the forwarding? Or can I send notes to the track, without dropping the MIDI channel information?

Post

Send this also to support, knowing that they know of the problem, but haven't put enough pressure on them to adress it.
It is the most annoying bug they placed into their design...
Bitwig does not know how to deal with Midi channels!!!

Post

I sent a mail to the support as well. All I got was:
unfortunately we can't provide development assistance for scripts, but there is a scripting forum [...]
Glad to hear I'm not the only one with this issue. I'll talk to them in person at the superbooth. Maybe that helps.

Post

Lets do it together, I am there for the Moss session anyway...
I complain about it each time I meet them...; - )

Post

TheSlowGrowth wrote:So, the question is: Can the NoteInputs filtering be switched on and off? (I dont think so from the documentation) Or can I otherwise enable/disable the forwarding? Or can I send notes to the track, without dropping the MIDI channel information?
You can disable forwarding if you set the translation matrix fully to -1.

I have no MPE controller but I would try to fiddle around with:
void setUseExpressiveMidi (boolean useExpressiveMidi, int baseChannel, int pitchBendRange)
void setUseMultidimensionalPolyphonicExpression (boolean useMPE, int baseChannel)

I guess you can call them at runtime.

Post

Yes, I tried setting the translation matrix to all -1. It works but I think this is super hacky - because this only affects the notes. Pitchbend and Aftertouch are still being passed on to the track - not what I want.

setUseExpressiveMidi and setUseMultidimensionalPolyphonicExpression don't affect the forwarding of notes. They also don't stop sendRawMidiEvent from discarding the channel information.

All I really want is to be able to alter the filters of a NoteInput after it is created. Or at least to temporarily disable the direct forwarding.

Post

Can't you simply create 2 note inputs?

Post

I can. But two noteInputs only make sense if I have a way to temporarily disable one. Which I haven't, afaik.

Post Reply

Return to “Controller Scripting”