The data chunk is a list of events, one after another with nothing between them. Each event is one ID byte and a value. The ID says what the value means and also how big it is, so a reader can step over any event, including ones it does not recognise. In these files the ID 172 is an escape for a four-byte extended ID; see Event 172.
Size classes
The ID byte falls into one of five ranges. The range sets the size of the value.
| IDs | Class | Value |
|---|---|---|
| 0x00 (0) to 0x3F (63) | Byte | 1 byte |
| 0x40 (64) to 0x7F (127) | Word | 2 bytes, little-endian |
| 0x80 (128) to 0xBF (191) | Dword | 4 bytes, little-endian |
| 0xC0 (192) to 0xCF (207) | Text | a variable-length size, then that many bytes of text |
| 0xD0 (208) to 0xFF (255) | Data | a variable-length size, then that many bytes of data |
Three IDs in the data range hold text: 231 (display group name), 239 (track name) and 241 (arrangement name). They were added after the text range was full. They are stored exactly like data events, so the size rule still holds.
Event 172: the escape for extended IDs
Event 172 (0xAC) is not an event with a value of its own. In FL Studio
2026 for Mac (26.1.7.5421, read statically from its engine library, not run) the writer
gives an event whose ID is outside 0 to 255 by writing the byte 0xAC and
then the ID as a four-byte little-endian number; the reader does the reverse: it reads
a byte and, if that is 0xAC, reads a dword ID. The top four bits of the
extended ID choose the size class, as the ID byte’s range does for 0 to 255.
| Top bits | Class | Value |
|---|---|---|
| 0x0 | Byte | 1 byte |
| 0x4 | Word | 2 bytes |
| 0x8 | Dword | 4 bytes |
| 0xC | Data or text | a variable-length size, then that many bytes |
The IDs that occur:
| Extended ID | Class | What it holds |
|---|---|---|
| 0x100 (256) | Byte | One byte of the program’s main object, written once, after 0xC0000100. FL’s own name for it is not known. |
| 0xC0000100 | UTF-16 text | A string property of the main object, written after the web address (event 197). FL’s own name for it is not known. |
| 0xC0000101 | UTF-16 text | The program banner: “FL Studio”, a space, the version string, a full stop and the build, such as “FL Studio 26.1.6.5639.5639”. Written once at the start of the file; FL Studio 2026’s reader skips it. |
| 0xC0000102 | UTF-16 text | A channel’s list of strings, one item per line, written among the channel’s events. |
AC 01 01 00 C0 36 46 00 4C 00 20 00 53 00 …
This settles what the published readers disagreed about. flpkit and dawparse read
one byte after 172, PyFLP pull request 208, flpdiff and ts-flp three (01 01
00), and a reviewer on PyFLP’s pull request 205 four; all of them stayed in step
only by accident. The three bytes are the start of the ID, the byte C0
after them is its top byte, and what readers called “event 192 with the program text”
is the value of this one event. Event 172 has no meaning besides being the escape. The
explorer reads the escape, the ID and the value as three parts of one event.
The escape first occurs in 25.2.3.5164 (the banner 0xC0000101) and 0x100 in 26.1.0.5528, in a corpus of 9,740 FL Studio 2 to 26 files; 0xC0000100 and 0xC0000102 occur in none (only the 2026 writer has them). Earlier 2024 and 2025 files have no escaped ID.
Fixed-size events
Byte, word and dword events are the ID followed straight away by the value.
09 01 loop active: 1
40 00 00 new channel: index 0
9C E0 22 02 00 tempo: 140000, which is 140 BPM
Variable-length size
Text and data events give their size as a variable-length number between the ID and the bytes. Each byte carries seven bits of the number, lowest bits first. The top bit of a byte is set when another byte follows. Sizes under 128 take one byte.
300 in binary = 10 0101100
low seven bits = 0101100 = 0x2C, more follows → 0x2C + 0x80 = 0xAC
next seven bits = 10 = 0x02, last byte → 0x02
stored as = AC 02
To read a size, start at zero and a shift of zero. Take a byte, add its low seven bits shifted left by the shift, and add seven to the shift. Stop after a byte whose top bit is clear.
Text
Text events hold a string followed by a terminating zero. There are two encodings:
- The FL Studio version string (event 199) is ASCII, ending in one zero byte, so a reader can always find out which version saved the file.
- Every other string is UTF-16LE, two bytes per character, ending in two zero bytes.
C7 0C 32 30 2E 38 2E 33 2E 32 33 30 34 00 20.8.3.2304
C2 0A 53 00 6F 00 6E 00 67 00 00 00 Song
How events are grouped
The stream has no nesting. Items such as channels and patterns are built from runs of events: a New event opens an item, and the events after it set that item’s properties until the next New event of the same kind.
| Event | ID | Opens |
|---|---|---|
| Channel New | 0x40 (64) | a channel in the channel rack; the value is its index |
| Pattern New | 0x41 (65) | a pattern; the value is its index |
| Arrangement New | 0x63 (99) | a playlist arrangement, with its tracks and time markers |
| Slot Index | 0x62 (98) | an effect slot in a mixer insert |
Each pattern’s New event appears twice in a project, so one pattern’s events can come in two separate runs. Join them by the pattern index. A pattern notes event can also appear before any New pattern event; see Note records. Mixer inserts have no New event; their events appear insert by insert, in mixer order. Plugin events follow the channel or slot that holds the plugin.
Project events, such as the tempo and the title, can appear anywhere in the stream and always belong to the project as a whole. The event reference lists every known event by the item it belongs to.