<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDIEventListInit(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:@F@MIDIEventListInit"
  },
  "title" : "MIDIEventListInit(_:_:)"
}
-->

# MIDIEventListInit(_:_:)

Initializes an event list.

```
func MIDIEventListInit(_ evtlist: UnsafeMutablePointer<MIDIEventList>, _ protocol: MIDIProtocolID) -> UnsafeMutablePointer<MIDIEventPacket>
```

## Parameters

`evtlist`

The event list to initialize.

`protocol`

The MIDI protocol variant.

## Return Value

A pointer to the first [`MIDIEventPacket`](/documentation/CoreMIDI/MIDIEventPacket) in the event list.

## 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)