MPE note parameters scaling question

mpe

#1

I had some questions regarding how to convert from a scale factor to decibels in order to set the gain in a JUCE DSP process. I have been that there is the Decibel:: gainToDecibels and Decibel::decibelsToGain functions where a scale factor of 6 would correspond to approximately 2 dB for example. But what about when you receive a float between 0 to 1 such as with the MPE Note parameters velocity and pressure. Is there a best practices for how to map velocity and pressure to the synth parameters in question? Or is it typically done on a case by case basis depending on the particular synth parameter? For my particular case, I’m trying to use note velocity or pressure to set the pre gain applied to the signal before it goes into the tanh waveshaper. So I wasn’t sure if it would be best to scale linearly or logarithmically. And if linearly, I assume I would have to remap from the 0 to 1 range to some wider range that would be applicable to the setGainLinear function. How is this typically done?

On a somewhat related note, I’ve been having issues where the pressure of noteOffVelocity are returning 0 values no matter what with MPE notes. Anyone else encounter similar problems?