Clips placed in the playlist are stored as playlist items in event 233, as fixed-size records with nothing between them. Two readers describe this event for files of this age, and they disagree, so this page sets out both. Neither has been checked against a range of files from these versions.
What PyFLP reads
PyFLP reads every file from before FL Studio 21 with one 32-byte record, little-endian, with positions and lengths 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 | 20480 in the files PyFLP was tested on. |
| 6 | 2 | u16 | item_index | Above pattern_base, a pattern (subtract it to get the index); otherwise a channel index. |
| 8 | 4 | u32 | length | The item’s length, in ticks. |
| 12 | 2 | u16 | track | The track, counted backwards. See Track numbers. |
| 14 | 2 | u16 | group | The item group. |
| 16 | 2 | bytes | unknown | Unknown. |
| 18 | 2 | u16 | item_flags | Item flags. PyFLP notes a muted flag from version 9.0. |
| 20 | 4 | bytes | unknown | Unknown. |
| 24 | 4 | f32 | start_offset | Start offset within the item. |
| 28 | 4 | f32 | end_offset | End offset within the item. |
PyFLP also notes that channel clips appear in this event from version 2.0.1 and pattern items from 7.0, so in FL Studio 6 the patterns in the playlist may be stored some other way.
What LMMS read
LMMS’s old importer, removed after LMMS 1.0, read 28-byte records from the same event. It took the position from the first four bytes and the length from bytes 8 to 11, and found the pattern in the low 12 bits of bytes 12 to 15, as a code from which it subtracted 2278; its own comments call these “magic numbers”. No source says when the 28-byte form gave way to the 32-byte one.
So divide the event size by both 32 and 28. If only one divides evenly, that settles the record size.
Track numbers
In the 32-byte form the track field counts down from the last of the
playlist’s 199 tracks:
track index = 198 − track