<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVExtendedNoteOnEvent",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVExtendedNoteOnEvent"
  },
  "title" : "AVExtendedNoteOnEvent"
}
-->

# AVExtendedNoteOnEvent

An object that represents a custom extension of a MIDI note on event.

```
class AVExtendedNoteOnEvent
```

## Overview

Use this to allow an app to trigger a custom note on event on one of several Apple audio units that support it. The floating point note and velocity numbers allow for optional fractional control of the note’s runtime properties that the system modulates by those inputs. This event supports the possibility of an audio unit with more than the standard 16 MIDI channels.

## Topics

### Creating a Note On Event

[`init(midiNote:velocity:groupID:duration:)`](/documentation/AVFAudio/AVExtendedNoteOnEvent/init(midiNote:velocity:groupID:duration:)-60hve)

Creates an event with a MIDI note, velocity, group identifier, and duration.

[`init(midiNote:velocity:instrumentID:groupID:duration:)`](/documentation/AVFAudio/AVExtendedNoteOnEvent/init(midiNote:velocity:instrumentID:groupID:duration:)-rqr5)

Creates a note on event with the default instrument.

### Configuring a Note On Event

[`midiNote`](/documentation/AVFAudio/AVExtendedNoteOnEvent/midiNote)

The MIDI note number.

[`velocity`](/documentation/AVFAudio/AVExtendedNoteOnEvent/velocity)

The MDI velocity.

[`instrumentID`](/documentation/AVFAudio/AVExtendedNoteOnEvent/instrumentID)

The instrument identifier.

[`groupID`](/documentation/AVFAudio/AVExtendedNoteOnEvent/groupID)

The audio unit channel that handles the event.

[`duration`](/documentation/AVFAudio/AVExtendedNoteOnEvent/duration)

The duration of the event, in beats.

### Getting the Default Instrument

[`defaultInstrument`](/documentation/AVFAudio/AVExtendedNoteOnEvent/defaultInstrument)

A constant that represents the default instrument identifier.



---

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)