---
title: length
framework: audiotoolbox
role: symbol
role_heading: Instance Property
path: audiotoolbox/aumidievent/length
---

# length

The number of valid MIDI bytes in the data field. For most MIDI events this value is usually 1, 2, or 3, but it can be longer for system-exclusive events.

## Declaration

```swift
var length: UInt16
```
