Remote Duet
This work-in-progress project aims to ease some of the logistical issues of practicing a duet. While video or audio chats may introduce a burden of latency that is hard to overcome in the context of playing music synchronously, I hoped that, by limiting the data transfer necessary and simplifying the problem as much as possible, low enough latencies could be achieved to enable reasonably instantaneous-feeling shared music.
While my normal MIDI piano setup involves using Logic Pro X and Keyscape, one of the goals of this project was to be able to support anybody who could connect their MIDI keyboard to a Mac, which allows for access to GarageBand and the decent-enough MIDI piano included within.
One of the neat things about this program is that, rather than only being a stand-alone application, it can also be run as a plugin that can be loaded into a DAW such as Logic Pro. I made this plugin using JUCE, the tool provided by ROLI for making multi-platform audio applications (and one of my favorite tools for projects such as this). JUCE makes it straightforward to compile VST and AU plugins, which will allow creating for a wide variety of DAWs. In Logic, for example, I can simply load the plugin in the track inspector, and open and adjust it from there.
That being said, AU MidiFX plugins seem to have support issues in some DAWs, and are not loadable in GarageBand. Therefore, in order to support GarageBand, I needed to also compile a separate version as a stand-alone application. This can output within the Mac’s MIDI ecosystem using the default MIDI IAC Driver device, which can then be used as a MIDI input within GarageBand.
I need to do some further testing (and ask a friend to help test with a separate computer and keyboard on a different network than mine). Currently, I think that the way I’m adding midi messages to the buffer may not be as timely as is possible, which may exacerbate any latency issues.