MidiOutput::openDevice()


#1

Hi.

Why can’t I call openDevice() inside a DAW? it always fails (Windows)
It’s probably basic stuff, but I don’t know it.

I’ve created a thread to add these messages in processBlock(), is that the only way?

Thanks,
Shlomi.


#2

The host probably already has the device open…

The whole point of writing a plugin is that the host handles all the i/o, so yes, the only (sensible) way to send midi messages is to return them from your process function.


#3

Got it.

Thanks.


#4

To bad it’s not possible. I have a plugin that try to communicate to synths, but no go …
On osx it works though.
Salvator


#5

Well … it used to work on osx in the past. Now it don’t work anymore…

The problem is that the track where plugin is instantiated will have audio outputs only in the DAW’s mixer.
While I can see how to receive midi in the process function, how then to route or even use the midi created in the process function that is sent back to the midiBuffer ? Is there any way at all to send midi to the outside world ?

Salvator


#6

Depending on your actual need, a ‘work around’ would be to create a little app that runs at startup, which will open the midi port you want, before the DAW runs. The DAW will be unable to open the port, as your app already has it, so if that is acceptable this solution may work for you. Then, when you plugin is loaded, it can talk to your little app, sending/receiving midi thru it.


#7

Hi,

I was thinking something like that, wondering about command line app or something that would not be visible to the user etc…
Do you have experience in the domain ? Is there any noticiable latency ?

Thanks !

Salvator