---
title: "sendPressure(forKey:withValue:onChannel:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiounitmidiinstrument/sendpressure(forkey:withvalue:onchannel:)"
---

# sendPressure(forKey:withValue:onChannel:)

Sends a MIDI Polyphonic key pressure event to the instrument.

## Declaration

```swift
func sendPressure(forKey key: UInt8, withValue value: UInt8, onChannel channel: UInt8)
```

## Parameters

- `key`: The key (note) number to which the pressure event applies. The valid range is 0 to 127.
- `value`: The value of the pressure. 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

### 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)
- [sendPitchBend(_:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendpitchbend(_:onchannel:).md)
- [sendPressure(_:onChannel:)](avfaudio/avaudiounitmidiinstrument/sendpressure(_: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)
