MIDI.h library help - ALL NOTES OFF

I am using (MIDI.h) Arduino MIDI Library Version 3.2

http://arduinomidilib.sourceforge.net/a00001.html

For this particular project I need to send all notes off every 1sec. I want to let the notes hanging and compiling for a second then turn all off. Regular sendNoteOff will not work since the note numbers are generated randomly.

Is there a question?

KeithRB:
Is there a question?

Where is AllNotesOff? I can not see it.
Or maybe there is a different way to accomplish this task - send all-any notes off at once? Going through the library I do not see anything that will do this. I assume there must be similar command with any MIDI library because if note number gets changed before note off is called there would be no way of turning that hanging note off unless is is played again and note off called in due time.

Would it be possible to use range on values(numbers like 1-127) in sendNoteOff first byte?

I think it would be easier to keep track of the notes you sent.

I have done this so far. And you may be right - I should leave it like it is.

Or just send your own custom message with the AllNotesOff bits.

You might also ask in the Audio and Midi sub-forum down below.

Thanks, intriguing! I shall investigate further.

For anybody who will need to send this message ”all notes off”

 MIDI.sendControlChange(123,0,c);

CC( 123, velosity 0, channel number)