---
title: "init(channel:key:pressure:)"
framework: avfaudio
role: symbol
role_heading: Initializer
path: "avfaudio/avmidipolypressureevent/init(channel:key:pressure:)"
---

# init(channel:key:pressure:)

Creates an event with a channel, MIDI key number, and a key pressure value.

## Declaration

```swift
init(channel: UInt32, key: UInt32, pressure: UInt32)
```

## Parameters

- `channel`: The MIDI channel for the message, between 0 and 15.
- `key`: The MIDI key number to apply the pressure to.
- `pressure`: The poly pressure value.
