If I want to make more MIDI inputs (specifically, the mod wheel and polyphonic aftertouch) available to individual synth voices (subclasses of the SynthVoice
class, as in the IPlugInstrument
example), should I be modifying the ProcessEvents
function of the VoiceAllocator
class, or is there an easy way to add ramps in the SetControl
function of the individual voice objects? It seems redundant to add a second VoiceInputs
object or write ramps some other way - so is there a particular reason that the VoiceAllocator
class only writes velocity, pitch bend, and channel pressure to ramps, or were those just meant as examples of how you’d extend the functionality to other MIDI messages?
Also, if I were to create a new VoiceInputs
object to accept incoming data in SetControl
, where would I call its Process
functions? Those functions for the ramps in the voice mInputs
object are executed in VoiceAllocator::ProcessEvents
, so I guess since that function calls SetControl
, I could just call the processing functions within that function. But again, it seems redundant, which makes me think that wasn’t the intended use of the VoiceAllocator
.