Closed goofy2k closed 2 years ago
propagateMidi
to handle voices in not the recommended way. Better use keyOn/keyOff
ornewVoice/deleteVoice
APIkeyOn
actually set values for the "freq/gate/gate" controllerssetParamValue
access all voices (running ones and free ones). setVoiceParamValue
change the state of the voice given as parameter, obtained by keyOn
of newVoice
deleteVoice
now reset the voiceOK. I will check this again with keeping in mind your recommendations. It will take me some time !
I have a solution for what I wanted to achieve: using channel-specific DSP parameters for notes. I now use only keyOn/keyOff and setVoiceParamValue. I described my method in a discussion that quite accidentally was started today: https://github.com/grame-cncm/faust/discussions/696
(excuse me for the lengthy description, I took this from a discussion thread, with minimal effort to re-phrase)
I use the Wavesynth FX generated with faust2api for ESP32 in polyphonic mode.
First some background on the API.
It contains several ways to start a sound/note:
I use methods 1 and 2 in the same app.
The issue relates to setting sound parameters with setParamValue or setVoiceParamValue. When I do this with setParamValue and propagateMidi notes respond accordingly. When I do this for a specific voice created with keyOn, I use setVoiceParamValue with the acquired voice address and this notes plays with the selected parameters for that voice. All allready playing notes do not change their characteristics, which is fine. However, when I start a note with propagateMidi after that this also plays with the last characteristics set for the specific voice. Is this intended behavior by design? I would think it would be useful to let voices where characteristics are not set with setVoiceParamValue always play with those set with setParamValue ?
So current behaviour of setParamValue and setVoiceParamValue is:
A more "intuitive" way of operation would be:
Just another way to describe the current counter-intuitive way of operation:
ALL future notes respond to the last setting made by either setParamValue OR setVoiceParamValue. With setParamValue also still playing PAST notes are affected.