Get latest MIDI controller values in SynthesizerVoice

Hi,

to get the latest pitch wheel position when a new note is started, there is the currentPitchWheelPosition argument in the SynthesizerVoice::startNote() method. This is fine to initialise the pitch of the new voice.

But what about the mod wheel? The controllerMoved() method is only called when the voice is active. Hence, if the mod wheel is moved up all active voices will follow, but inactive voices are not notified. When I press a new key, only previously active voices will have the correct mod wheel position.

Any reason why this is the default behaviour in the Synthesizer class? I think I can easily work around this by creating my own class and overwrite the Synthesizer::handleController() method. But maybe there is a smarter solution?

Sebastian

1 Like

Sorry to bump this up, but I am still confused how to properly get the current midi controller values during SynthesizerVoice::startNote()… Anyone who can give me a hint?

I know this is an old post, but I had the same problem and had to extend the Synthesiser class in order to solve it, by creating an argument for the mod wheel. This turned out to be more complicated than it would appear on the surface, due to the use of friend classes inside the Synthesiser and SynthesiserSound classes.