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

# sendPitchBend(_:onChannel:)

Sends a MIDI Pitch Bend event to the instrument.

## Declaration

```swift
func sendPitchBend(_ pitchbend: UInt16, onChannel channel: UInt8)
```

## Parameters

- `pitchbend`: Value of the pitchbend. The valid range of values is 0 to 16383.
- `channel`: The channel number to send the event to. The valid range of values is 0 to 15.

## Discussion

Discussion If this method isn’t invoked, then the system uses the default pitch bend value of 8192 (no pitch).

## See Also

### Sending information to the MIDI instrument

- [sendController(_:withValue:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendcontroller(_:withvalue:onchannel:).md)
- [sendMIDIEvent(_:data1:)](avfaudio/avaudiounitmidiinstrument/sendmidievent(_:data1:).md)
- [sendMIDIEvent(_:data1:data2:)](avfaudio/avaudiounitmidiinstrument/sendmidievent(_:data1:data2:).md)
- [sendMIDISysExEvent(_:)](avfaudio/avaudiounitmidiinstrument/sendmidisysexevent(_:).md)
- [sendPressure(_:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendpressure(_:onchannel:).md)
- [sendPressure(forKey:withValue:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendpressure(forkey:withvalue:onchannel:).md)
- [sendProgramChange(_:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendprogramchange(_:onchannel:).md)
- [sendProgramChange(_:bankMSB:bankLSB:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendprogramchange(_:bankmsb:banklsb:onchannel:).md)
- [send(_:)](avfaudio/avaudiounitmidiinstrument/send(_:).md)
