# Silence all MIDI devices

``

    midi_sound_off

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

All oscillators will turn off, and their volume envelopes are set to zero as soon as possible.

MIDI 1.0 Specification - Channel Mode Messages - All Sound Off

Introduced in v3.0

## Options

channel: | Channel to send the sound off message to
port: | MIDI port to send to
on: | If specified and false/nil/0 will stop the midi sound off on message from being sent out. (Ensures all opts are evaluated in this call to `midi_sound_off` regardless of value).

## Examples

# Example 1
``
    midi_sound_off
| ``
    #=> Silence MIDI devices on all ports and channels
# Example 2
``
    midi_sound_off channel: 2
| ``
    #=> Silence MIDI devices on channel 2