Latest News: Bitwig updates Bitwig Studio to v5.1
Convert OSC messages to MIDI CC values
-
- KVRer
- Topic Starter
- 23 posts since 17 Mar, 2019
Hello,
how to convert an OSC message, something like "/slider1 x", where "x" ranges from 0 to 1 (in floats) into MIDI CC in Bitwig, without physical hardware to create these midi input messages (or midi bridges from specific OSC software)?
In the API it seems to be possible to create a "virtual hardware control surface", the tutorials from Jürgen Moßgraber on Youtube mention this, but how to generate "Midi Input" from the OSC values into MidiCC to control VSTs ? How to bind the OSC commands to specific Midi messages ?
The value from OSC can be "catched" using the "message.getFloat(index number)". For sure, the range from 0 to 1 from OSC will have to be multiplied by 127 to match the Midi CC range, but what is the function to generate midi CC input into Bitwig? Where to put this OSC value into a Midi CC generating function?
The only thing appearing possible at the moment, would be to create a Midi Out function and use a midi loopback.
Thanks
how to convert an OSC message, something like "/slider1 x", where "x" ranges from 0 to 1 (in floats) into MIDI CC in Bitwig, without physical hardware to create these midi input messages (or midi bridges from specific OSC software)?
In the API it seems to be possible to create a "virtual hardware control surface", the tutorials from Jürgen Moßgraber on Youtube mention this, but how to generate "Midi Input" from the OSC values into MidiCC to control VSTs ? How to bind the OSC commands to specific Midi messages ?
The value from OSC can be "catched" using the "message.getFloat(index number)". For sure, the range from 0 to 1 from OSC will have to be multiplied by 127 to match the Midi CC range, but what is the function to generate midi CC input into Bitwig? Where to put this OSC value into a Midi CC generating function?
The only thing appearing possible at the moment, would be to create a Midi Out function and use a midi loopback.
Thanks
- KVRAF
- 4145 posts since 13 May, 2004
You can send MIDI to Bitwig with the method sendRawMidiEvent() of NoteInput (which you can get from the MidiInput). You can use any MIDI input port for this (e.g. a virtual MIDI driver). Still a bit of a workaround but that's what I did in my OSC extension.
-
- KVRer
- Topic Starter
- 23 posts since 17 Mar, 2019
Hi Moss, so I would still need an external virtual midi driver (loopback)?
At the moment sendChannelController() is doing the job when an OSC message comes in, which ends up also using a virtual midi driver (loopback)... Do you think this is also a good alternative to sendRawMidiEvent?
So, the conclusion is that it is not possible to generate midi CC messages, from and into Bitwig, without using an external midi driver?
By the way, thank you very much for your youtube tutorials!
At the moment sendChannelController() is doing the job when an OSC message comes in, which ends up also using a virtual midi driver (loopback)... Do you think this is also a good alternative to sendRawMidiEvent?
So, the conclusion is that it is not possible to generate midi CC messages, from and into Bitwig, without using an external midi driver?
By the way, thank you very much for your youtube tutorials!
- KVRAF
- 4145 posts since 13 May, 2004
Basically, it can be ANY midi input which you do not use otherwise. No, need that it can be looped but virtual ones have the advantage that you can create them quite easily and use them exclusively for such a workaround.
In this case you really need the loopback which is a bit complicated to set up.
Correct. It is on the todo list of Bitwig but I guess quite at the end
You are welcome
-
- KVRer
- Topic Starter
- 23 posts since 17 Mar, 2019
Hey Moss, I am trying to use the sendpitchbend() from the midi resource functions.
I can confirm the Synth accepts pitchbend messages from hardware, I even correctly monitored the ouput values from this function in a midi monitor and can confirm the values are being sent.
For some reason the VSTs do not respond to the scripted pitch bend when coming from the OSC message.
I have tried the values ranging from 0-127, 0-16384, but none of them work! I could emulate the hardware value range and channel but still no response.
The midi function from the controller script api is:
I have tried in Int and Float formats, directly from the OSC message, but nothing.
Can you give some insight ?
Thank you
I can confirm the Synth accepts pitchbend messages from hardware, I even correctly monitored the ouput values from this function in a midi monitor and can confirm the values are being sent.
For some reason the VSTs do not respond to the scripted pitch bend when coming from the OSC message.
I have tried the values ranging from 0-127, 0-16384, but none of them work! I could emulate the hardware value range and channel but still no response.
The midi function from the controller script api is:
Code: Select all
function sendPitchBend(channel, value)
{
host.getMidiOutPort(0).sendMidi(0xE0 | channel, value & 0x7F, (value >> 7) & 0x7F);
}
Can you give some insight ?
Thank you
- KVRAF
- 4145 posts since 13 May, 2004
Why should it? You are sending the message to the outside world not Bitwig. Use the method I showed you above.
- KVRAF
- 4633 posts since 21 Jan, 2008 from oO
What is the drawback of OSC that holds back DAW devs to maketheir software fully compatible? I don't really get it somehow.
- KVRAF
- 4145 posts since 13 May, 2004
It's simply too flexible. It does not define any specific commands / functions. Therefore, most of the time it is easier to write you own implementation.
But if you just want to use it with Bitwig, my DrivenByMoss extension does also support OSC, see the turial video here:
https://www.youtube.com/watch?v=GEH7k1k ... okJ6SruEpq
-
- KVRer
- Topic Starter
- 23 posts since 17 Mar, 2019
Hum, I am using the loopback midi, so it is not sending exactly to the outside world but back into Bitwig. I can confirm the MIDI message is working correctly because, in fact, I also tried sending it to the outside world and the same VST responded accordingly and correctly to the pitchbend movement. It is just that when the MIDI message is sent from and back into Bitwig, using sendPitchBend() it seems to not be recognized as such, with no response whatsoever. I just would like to understand if this is a bug or my ignorance : ) If it is ignorance, why does this happen?
The loopback midi workaround worked correctly for sending CCs (using the sendChannelController()) from and back into Bitwig, it just seems that pitchBend may have some other special requirements.
This actually seems to not be an OSC problem at all, OSC is working perfectly, It seems to be more a problem with the appropriate function for pitchBend ( is it?)
Thanks!
Last edited by ojggaspar on Wed Dec 07, 2022 2:40 am, edited 1 time in total.
-
- KVRer
- Topic Starter
- 23 posts since 17 Mar, 2019
Is there a way to retrieve (via OSC) the name of a midi mapped parameter back to the touchOSC surface?
I know this can be done with the device parameter/pages, but is it possible to get the name of the midi mapped parameter (outside the device parameters pages) back to an OSC label in TouchOSC (or whatever touch surface software) whenever it gets mapped?
Much appreciated!
I know this can be done with the device parameter/pages, but is it possible to get the name of the midi mapped parameter (outside the device parameters pages) back to an OSC label in TouchOSC (or whatever touch surface software) whenever it gets mapped?
Much appreciated!
- KVRAF
- 4145 posts since 13 May, 2004
Yes, if you create a mapping by using a user parameter.ojggaspar wrote: ↑Wed Dec 07, 2022 2:38 am Is there a way to retrieve (via OSC) the name of a midi mapped parameter back to the touchOSC surface?
I know this can be done with the device parameter/pages, but is it possible to get the name of the midi mapped parameter (outside the device parameters pages) back to an OSC label in TouchOSC (or whatever touch surface software) whenever it gets mapped?
Much appreciated!
- KVRAF
- 4145 posts since 13 May, 2004
-
- KVRer
- Topic Starter
- 23 posts since 17 Mar, 2019
Ok, this is a bit confusing. "User parameter" in this case refers to controls that can be freely mapped by right-clicking any control in the UI and "Learn Controller Assignment" (Map to controller or key), this is what I would like to know if it is possible to do. When you map something this way it would automatically send the name of the midi mapped parameter via OSC to the OSC text label, is this possible ?
Are you referring to parameter inside what is called Preset Pages (just like the Device pages) when you say a "user parameter"?
Again, thank you!