Nuked-SC55 icon indicating copy to clipboard operation
Nuked-SC55 copied to clipboard

Support for PortMidi input

Open giulioz opened this issue 1 year ago • 3 comments

I've added support for using the PortMidi library instead of RtMidi, as it can present itself as a virtual midi port, useful when using it with a DAW.

image

giulioz avatar Apr 03 '24 19:04 giulioz

Hi, It seems that your solution is not fully cross-platform since on Windows the function Pm_CreateVirtualInput() you use to create virtual Midi-In port is not supported:

Virtual devices are not supported by Windows (Multimedia API). Calls on Windows do nothing except return pmNotImplemented

https://portmidi.github.io/portmidi_docs/group__grp__device.html#gaf262cf560e105c9a44f7b30eb868951e

So it seems the latest Midi-In port related commit from Nukeykt should work better overall: https://github.com/nukeykt/Nuked-SC55/commit/1130e057d0df607fae0b4be159e221bf40fb6f37

Falcosoft avatar Apr 04 '24 07:04 Falcosoft

True, my PR is mostly Mac focused, maybe i can keep the two and make it a flat during compilation with Claire cmake?

giulioz avatar Apr 04 '24 10:04 giulioz

True, my PR is mostly Mac focused, maybe i can keep the two and make it a flat during compilation with Claire cmake?

It seems portMidi also supports opening existing Midi In ports the same way as RtMidi does so a run-time check for failing Pm_CreateVirtualInput() call should be enough. In case of a failing call it should open an existing Midi In port (port number can be read from the command line as in latest main branch or from a config file).

Falcosoft avatar Apr 04 '24 13:04 Falcosoft