<!--
{
  "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/sendController(_:withValue:onChannel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioUnitMIDIInstrument(im)sendController:withValue:onChannel:"
  },
  "title" : "sendController(_:withValue:onChannel:)"
}
-->

# sendController(_:withValue:onChannel:)

Sends a MIDI controller event to the instrument.

```
func sendController(_ controller: UInt8, withValue value: UInt8, onChannel channel: UInt8)
```

## Parameters

`controller`

Specifies a standard MIDI controller number. The valid range is `0` to `127`.

`value`

Value for the controller. The valid range is `0` to `127`.

`channel`

The channel number to send the event to. The valid range is `0` to `15`.

## Discussion

---

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)