Maybe a bug in midiOutput->sendMessageNow(MidiMessage::noteOn());

Hey there,
I started to write a little Plugin which can Controll the Novation Launchpad.
Firstly thanks for that great and easy Midi class! very impressiv and awesome <3

So first step was to enable a button light on the Launchpad. That can be done easily with a Note on Message.

So my code was like this:
midiOutput->sendMessageNow(MidiMessage::noteOn(1, 45, 0.2f));
That was working great. So i tried to change the led colour (the velocity changes the colour).
So my next code was like that:
midiOutput->sendMessageNow(MidiMessage::noteOn(1, 45, 0.8f));

nothing changed :frowning:

I tested a little bit arround and figure out that it seems like there is a Problem with the floatValueToMidiByte() function. In my case it returns only “f”…

I deleted the noteOn function with the float parameter and used the noteOn with the uint8 parameter function function directly. That works perfect.

Did i do something wrong or is there an issue with the Juce framework?

Thanks and have a nice day :slight_smile:

No… there’s nothing wrong with that function. ‘f’ is the ascii code for 102, which is 0.8 * 127, which is what you asked it for…