MidiMessage setChannel() assertion


#1

I think it’s missing a check for channel 0 and >16 like you do that in some methods

jassert (channel > 0 && channel <= 16);

i had midiChannel internaly kept in 0-15 uint8 format and i got garabage using your methods:

MidiMessage m(0xb0, 12, 13);
Log (String::toHexString (m.getRawData(), m.getRawDataSize()));
m.setChannel (0);
Log (String::toHexString (m.getRawData(), m.getRawDataSize()));

result:
b0 0c 0d
ff 0c 0d

#2

Good idea, thanks!