---
title: "stopNote(_:onChannel:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiounitmidiinstrument/stopnote(_:onchannel:)"
---

# stopNote(_:onChannel:)

Sends a MIDI Note Off event to the instrument.

## Declaration

```swift
func stopNote(_ note: UInt8, onChannel channel: UInt8)
```

## Parameters

- `note`: The note number (key) to stop. The valid range is 0 to 127.
- `channel`: The channel number to send the event to. The valid range is 0 to 15.

## See Also

### Starting and stopping play

- [startNote(_:withVelocity:onChannel:)](avfaudio/avaudiounitmidiinstrument/startnote(_:withvelocity:onchannel:).md)
