Playlist items
Every clip placed in an arrangement’s playlist is one playlist item. An arrangement’s playlist items event (233) holds them all, as fixed-size records with nothing between them. FL Studio 21 made each record longer, from 32 bytes to 60.
Record
Every number is little-endian. Positions and lengths are in ticks.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | position | Where the item starts in the playlist, in ticks. |
| 4 | 2 | u16 | pattern_base | Always 20480. See What an item plays. |
| 6 | 2 | u16 | item_index | What the item plays: a pattern or a channel. |
| 8 | 4 | u32 | length | The item’s length, in ticks. |
| 12 | 2 | u16 | track | The track the item sits on, counted backwards. See Track numbers. |
| 14 | 2 | u16 | group | The item group. |
| 16 | 2 | bytes | unknown | Unknown. Usually 78 00. |
| 18 | 2 | u16 | item_flags | Item flags. Usually 64. |
| 20 | 4 | bytes | unknown | Unknown. Usually 40 64 80 80. |
| 24 | 4 | f32 | start_offset | Start offset within the item. |
| 28 | 4 | f32 | end_offset | End offset within the item. |
| 32 | 28 | bytes | unknown | Unknown. Only in the 60-byte records of FL Studio 21 and later. |
32 or 60 bytes
The event’s size is a multiple of the record size. When it divides by 60 and not by 32, the records are 60 bytes; when it divides by 32 and not by 60, they are 32 bytes. Some sizes divide by both, such as 480. For those, use the FL Studio version in the project events: version 21 and later writes 60-byte records.
What an item plays
An item plays either a pattern or a channel’s clip, such as an audio or automation
clip. The item_index tells them apart by comparing it with
pattern_base, which is always 20480:
- Greater than 20480: a pattern. The pattern index is
item_indexminus 20480. - 20480 or less: a channel. The value is the channel index.
Track numbers
The track field counts down from the last track. Subtract it from the
highest track index to get the track:
track index = 499 − track (FL Studio 12.9.1 and later)
track index = 198 − track (earlier versions)
So in a current project the first track, index 0, is stored as 499.