lsp-plugins / lsp-plugins

Linux Studio Plugins Project

Home Page:https://lsp-plug.in/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multisampler: setting Midi velocity % VS midi value

Daniele71 opened this issue · comments

Hi, why midi velocity is expressed as a percentage ? In this way yon need to do some math: % ->midi velocity. IMHO, using midi value (0-127) would be easy to match settings with note velocity.
Thanks.

Hi! I would agree with you if I didn't recently dig deeply into VST3 plugin format. According to VST3, velocity is already something more complicated rather than integer values in range [0-127].

And do we need this complication in this case ? Advantages for end users ? I don't know.... do your math under the hood but show midi values in the GUI ? It's more readable and understandable.

The original idea was not to rely on MIDI-specific velocity mapping. And thre are several aspects that deliver problems while trying to implement the changes.

The first one, is a backward compatibility. If we change the velocity values from range 0-100 to 0-127, it will break setup for already configured sessions. To not to break compatibility, it will probably require to implement additional presentation values for velocity in the UI. But that also looks pretty ugly.
From the other side, velocity is already a continuous parameter within range [0.0, 1.0] for VST3. This means that it can have any value within this range the single-precision floating-point number can hold. In other words, we don't have 128 discrete values in range [0, 127] any more.

The same is also true for CLAP format which is a simplified version of VST3:
https://github.com/free-audio/clap/blob/df8f16c69ba1c1a15fb105f0c5a2e5b9ac6be742/include/clap/events.h#L158

I think maybe adding one more label that will display the actual MIDI-mapped velocity could be a solution, what do you think?

I still think that showing midi velocity is the best option. As you said, you have only to change the GUI not what you do internally. So it should not break anything.

Even if is a complete different story, it's a bit like using "0" (Instrument 0 - Sample 0). Yes yes, I know why this happens but usually at the GUI level, is "translated" to 1. Damned human beings... :) :)

Anyway, I don't want to stress you out too much so a label/tooltip it's better then nothing !

Thanks.

Just committed the prototype to the devel branch:

изображение

Available in 1.2.15.