---
title: "startNote(_:withVelocity:onChannel:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiounitmidiinstrument/startnote(_:withvelocity:onchannel:)"
---

# startNote(_:withVelocity:onChannel:)

Sends a MIDI Note On event to the instrument.

## Declaration

```swift
func startNote(_ note: UInt8, withVelocity velocity: UInt8, onChannel channel: UInt8)
```

## Parameters

- `note`: The note number (key) to play. The valid range is 0 to 127.
- `velocity`: Specifies the volume to play the note at. 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

- [stopNote(_:onChannel:)](avfaudio/avaudiounitmidiinstrument/stopnote(_:onchannel:).md)
