---
title: AVMIDINoteEvent
framework: avfaudio
role: symbol
role_heading: Class
path: avfaudio/avmidinoteevent
---

# AVMIDINoteEvent

An object that represents MIDI note on or off messages.

## Declaration

```swift
class AVMIDINoteEvent
```

## Topics

### Creating a MIDI Note Event

- [init(channel:key:velocity:duration:)](avfaudio/avmidinoteevent/init(channel:key:velocity:duration:).md)

### Configuring a MIDI Note Event

- [channel](avfaudio/avmidinoteevent/channel.md)
- [key](avfaudio/avmidinoteevent/key.md)
- [velocity](avfaudio/avmidinoteevent/velocity.md)
- [duration](avfaudio/avmidinoteevent/duration.md)

## Relationships

### Inherits From

- [AVMusicEvent](avfaudio/avmusicevent.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Handling MIDI Events

- [AVMIDIMetaEvent](avfaudio/avmidimetaevent.md)
- [AVMIDISysexEvent](avfaudio/avmidisysexevent.md)
