---
title: "init(type:data:)"
framework: avfaudio
role: symbol
role_heading: Initializer
path: "avfaudio/avmidimetaevent/init(type:data:)"
---

# init(type:data:)

Creates an event with a MIDI meta event type and data.

## Declaration

```swift
init(type: AVMIDIMetaEvent.EventType, data: Data)
```

## Parameters

- `type`: The meta event type.
- `data`: The data that contains the contents of the meta event.
