<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioUnitMIDIInstrument/sendPitchBend(_:onChannel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioUnitMIDIInstrument(im)sendPitchBend:onChannel:"
  },
  "title" : "sendPitchBend(_:onChannel:)"
}
-->

# sendPitchBend(_:onChannel:)

Sends a MIDI Pitch Bend event to the instrument.

```
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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)