Turn off all notes on MIDI devices

midi_all_notes_off  

Sends a MIDI all notes off message to all connected MIDI devices. on all channels. Use the port: and channel: opts to restrict which MIDI ports and channels are used.

When an All Notes Off event is received, all oscillators will turn off.

MIDI 1.0 Specification - Channel Mode Messages - All Notes Off

Introduced in v3.0

Options

channel:

Channel to send the all notes off message to

port:

MIDI port to send to

on:

If specified and false/nil/0 will stop the midi all notes off message from being sent out. (Ensures all opts are evaluated in this call to midi_all_notes_off regardless of value).

Examples

# Example 1

midi_all_notes_off



#=> Turn off all notes on MIDI devices on all channels (and ports)



# Example 2

midi_all_notes_off channel: 2



#=> Turn off all notes on MIDI devices on channel 2