Assertion request in MidiMessage

It’s easy to go wrong with those float velocities between 0 and 1 and the int ones between 0 and 127. (like calling noteOn() with a float value of 64 when we should pass an int)

What do you think about adding that to MidiMessage::floatValueToMidiByte() ?

jassert (isPositiveAndNotGreaterThan (v, 1.f));

1 Like

Yep, not a bad idea!