# Expanding MIDI control functionality

**URL:** <https://iplug2.discourse.group/t/expanding-midi-control-functionality/622>\
**Category:** Uncategorized\
**Created:** [16 April 2022 18:12 UTC](https://iplug2.discourse.group/t/expanding-midi-control-functionality/622 "2022-04-16T18:12:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radiofarmer](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@radiofarmer](https://iplug2.discourse.group/u/radiofarmer)\
**Post date:** [16 April 2022 18:12 UTC](https://iplug2.discourse.group/t/expanding-midi-control-functionality/622/1 "2022-04-16T18:12:42Z")

</div>

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`.
