Are plugins are supposed to register a custom MIDI driver? I have implemented a rough prototype which registers my driver in the plugin‘s
init function. While everything seems to work as expected I get a segfault when existing Rack on
delete of the driver. I wasn’t able to debug it completely yet but my current guess is that the plugin is unloaded before the driver gets destructed. Has anybody done something like this before?
A short note on my motivation: I implemented the MIDI/audio encoding like Silent Way does it some time ago myself because the existing module has some limitations, like a single MIDI channel per output port and no support for CC. I think having a MIDI driver which can be used in all existing modules could be the right approach to get it finally released publicly.
Yes, if your plugin registers a MIDI driver, it should call
midi::addDriver() in its
init() function. No plugins to my knowledge do this, so post a Rack issue so any bugs can be fixed in Rack v2.
Confirmed, it is caused by unloading the plugin before destructing the driver. Issue created.
As it got mentioned in the development blog:
Here is a first look at the MIDI driver. Each instance (up to 4) of the ES MIDI module creates 8 ports in the MIDI driver. The output ports should be connected to the Expert Sleepers 8GT module. It is essentially the same as “CV to MIDI” but this way you can send any MIDI message using the existing modules. For debugging porposes I created a specialized scope to review the bits of the encoded MIDI messages.
If you like further information on the Expert Sleepers hardware modules and using an audio signal for sending MIDI in Rack should check out this video: