sonic-pi
sonic-pi copied to clipboard
Let SonicPi use jack midi
After playing around with some audio software in combination, I figured out that it would be really great, if SonicPi could use jack midi, because sometimes there are conflicts between SonicPi and software like amidi. As far as I know, SonicPi uses an own application called m2o to convert midi to osc and o2m the other way round. Therefore it should not be too complicated to make o2m / m2o use jack midi. I could also assist implementing this as I have made some experience programming with libjack in the past weeks/months.
@gedobbles - apologies for the long delay. Although changes under the hood since this was raised mean that we now use a different library to handle MIDI communication (https://github.com/sonic-pi-net/sp_midi), jack midi support may still be a useful feature 🙂 @llloret - any thoughts?
Hi, @gedobbles, at the moment, Sonic Pi is not using m2o and o2m, as it did in the past. This was changed so that now it uses a library (based on those) called sp_midi. sp_midi is using RtMidi for the cross-platform midi support, which should support jack.
At the moment, since we are using the default constructor for the RtMidi objects, I think that it would use alsa if available, and then jack, but this has not been tested.
In the future, we could consider having an additional parameter, so that we could select what interface to use in Linux, instead of using the default, but that would require changes on both the library and the application itself, so it would need to be prioritised against other work. The change in the library itself would be easy, but I am not sure about the impact on the current API and the Sonic Pi application itself.