SourceSelector lacking ability to select source?

Post Reply New Topic
RELATED
PRODUCTS

Post

I'm using Bitwig's Java API for a project where I need to be able to create tracks and route MIDI notes to specific tracks.

I thought I would be able to accomplish this by creating a NoteInput and then selecting it using the track's SourceSelector. Unfortunately, I don't see any way to actually select a source using SourceSelector.

I'm looking for a workaround in the meantime. None of the track MIDI methods seem to work for me. Invoking playNote or sendMidi on a track has no effect.

If anyone has any idea how to do MIDI routing with the Controller API, I'd really appreciate some help.

Post

If you mean create a freely assignable MIDI message within the environment, instead of respond to one coming into the environment, the only way I know how to do this reliably is via a virtual port loopback. I.e. declare several ports in the Init, one of which is a virtual port used as a way "out" - which just comes back on the "in" stream of the same virtual port. This is because it's easy to target a port programmatically. You then set callbacks on that incoming port instead of trying to route the MIDI from within. Something like Bome can do this - I'm using it to get around various other shortcomings.

If your script is meant to be distributed to anyone other than yourself, the downside is that they will also have to install the loopback.
Bitwig 2.4 | Intel i9 7940X | Win10 | RME UCX | Focal SM9

Post Reply

Return to “Controller Scripting”