How to do a MIDI_C_ALL_NOTES_OFF message to all channels?


#1

I'm trying to write an "all midi note off" module as I'm sometimes facing hanging notes.
Although I found a part of the code for this "MIDI_C_ALL_NOTES_OFF", I'm not sure how to implement it..
The following code still allows the axoloti to go live, but doesn't seem to do anything about hanging notes on the other axoloti which listens to the MIDI-din-output.
It's probably the ",0," that should be something else... but what?

if((param_rst>0)&&!ntrig){
ntrig=1;
MidiSend1((midi_device_t) MIDI_DEVICE_OMNI,0,MIDI_C_ALL_NOTES_OFF);
}
else if(param_rst==0){ntrig=0;}


#2

You have to specify a device, you cannot send to omni


#3

ah ok, I thought I'd seen a post of yours about midi commands where "OMNI" was listed. Still runs without giving an error though, that's a bit weird I think..


#4

you can receive omni (by ignoring the channel part of the midi message) but you can only send to omni by actually sending to all 16 channels... so maybe you have seen OMNI mentioned in a receiving midi object.


#5

no, it was in a post of technobear in a list of midi-commands.

but to be sure now, the right one for sending note-off to DIN-device and channel 3 would be:

if((param_rst>0)&&!ntrig){
ntrig=1;
MidiSend1((midi_device_t) MIDI_DEVICE_DIN,2,MIDI_C_ALL_NOTES_OFF);
}
else if(param_rst==0){ntrig=0;}


#6

I would have meant for input only, and even then it has to be coded.


#7

well, it was an "improvised"way of using the listed codes, Just checking whether I could change somthing to something else so it does something I want..
remember, I know close to nothingg about coding... I only know how to bring my own ideas together while looking at other onces's codes...