I’ve been working with the configuration JSON files, and I have questions.
I’m working on a Mac with Sushi with the play_vst3.json configuration.
I was able to successfully use a different MIDI port by modifying the host config like so:
"host_config" : {
"samplerate" : 48000,
"rt_midi_input_mappings" : [
{
"rt_midi_device" : 1,
"sushi_midi_port" : 0
}
]
},
Meaning, I have the output ports enumerated on my mac:
“IAC Bus 1”
“IAC Bus 2”
“from Max 1”
“from Max 2”
So now I can send MIDI to IAC Bus 2 to play the synth.
I am unclear about the "sushi_midi_port" : 0
property, however. I was under the impression that it was related to the midi.track_connections.port property but it seems to break if I try anything other than 0.
For example, I tried making a couple mappings like so:
"rt_midi_input_mappings" : [
{
"rt_midi_device" : 1,
"sushi_midi_port" : 0
},
{
"rt_midi_device" : 0,
"sushi_midi_port" : 1
}
]
But this threw an error in my Terminal:
zsh: segmentation fault ./sushi --coreaudio -c config_files/play_vst3.json
When I tried to run sushi.
Clearly there’s some thing that I’m not getting. Ultimately, I want to be able to load a plugin that generates MIDI on one track, and send that to another track that hosts a synth plugin.
I’ll also be interested in dynamic routing of MIDI inputs and outputs, but I’m not seeing how to accomplish that in the Sushi documentation.
Along these lines, I tried to setup a track so it would output MIDI. My config has:
"midi" : {
"track_connections" : [
{
"port" : 0,
"channel" : "all",
"track" : "main",
"raw_midi" : false
}
]
,
"track_out_connections" : [
{
"port" : 0,
"channel" : "all",
"track" : "main"
}
]
}
But this “Failed to load MIDI mapping from Json config file”. If I delete the track_out_connections portion, sushi is able to start. Clearly I need some insights into the configuration file!
Hi peter, did you get it to work? The concept of midi ports is just how many virtual ports sushi should open (rt midi ports or alsa midi ports depending on which platform you’re on). By default sushi tries to open input port and 1 output port. But you can configure that in the json file with something like:
"host_config" : {
"samplerate" : 48000,
"midi_inputs" : 2,
"midi_outputs" : 2,
....
I tested your midi output example and I realise why it’s not working. It’s probably not documented very well, but “all” is not a valid configuration for midi outputs. It needs to be a number between 0 and 15.
For runtime configuration of midi you can use the gRPC api or the elkpy/elkcpp wrappers. See elkpy.MidiController — Elk DevKit documentation
That helps, thank you. In summary, I need to specify the “midi_inputs” and “midi_outputs” count in host_config if I’m going to do anything clever with the “rt_midi_input_mappings” settings.
For the second scenario, I was able to get my sequencer to output MIDI by specifying an output channel, instead of “all”. This leads me to the question - are tracks limited to a single MIDI channel output? I’d like to enable MPE on my sequencer, so I’d need all channels, or at least several.
1 Like
And…another question. If I have two tracks in my configuration, one with a synth plugin and another with a sequencer plugin, how would I route MIDI from one track to another? I realize that the simple way is to load them serially like in the “play_arp_mda_link.json” config. But I want to try hosting multiple tracks of synths, and drive them with a single sequencer on another track.
Sort of. The channel set in the configuration will be applied to the midi events outputted from sushi. This is a leftover from when note events didn’t have channel information. This is something we’ll fix eventually when we have time.
Unfortunately that is currently not possible in sushi. There are the send and return plugins, but those only work with audio. Though it would certainly be possible to modify them to send midi/kbd data too.
It would be a nice feature to be able to route MIDI from a track to other tracks. It could lead to some pretty flexible architectures and simple multi-core distribution (that is if I understand correctly that separate tracks can be applied to separate cores!).
1 Like
Definitely. I’ll take that with me when we start planning for new features in sushi.