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. In FL Studio 20 every record is 32 bytes long, so the number of items is the event’s size divided by 32.
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. |
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. An FL Studio 20
arrangement has 500 tracks, so subtract the field from 499 to get the track:
track index = 499 − track
So the first track, index 0, is stored as 499. This is how PyFLP reads FL Studio 20 files. Another reader, FLParser, uses 501 instead of 499 for version 20, so this detail is not settled; check against a known project before relying on it.