I’ve just added MIDI output (with some restrictions) to Voicer.
// normal Voicer use
v = Voicer(numNodes, \defName, [... initial arg list...], ...);
// MIDI Voicer use
m = MIDIOut(...);
v = Voicer(maxPolyphony, m, [chan: channelNum]);
Then, notes played on v
will send note on/off messages to the given MIDI port and channel. (Mono glide seems to be working too – set the remote synth to be monophonic, and use 1 for the Voicer’s polyphony. Glide may not be reliable with polyphony – it will depend a lot on the target synth.)
This does not send per-note control values. Argument lists in trigger
or gate
method calls (or in \type, \voicerNote
patterns/events) are ignored.
Voicer global controls are analogous to MIDI CCs. Connect them as follows:
v.mapGlobal(\name, nil, 64, \midi)
.connectMIDIOut(aMIDIOutObject, chan, ccnum);
Then if you manipulate the global control in a GUI, or do theGlobalControl.watch.automate { ... kr synth function ... }
, updates will be sent over MIDI as well.
There might be some features to add later, but for now this is enough to hook up my live coding system to a MIDI synth.
Hope this is helpful to someone.
hjh
PS Update your ddwVoicer and ddwCommon quarks to use these.