Every FLP file starts with a 14-byte header chunk. Its ID is FLhd, and it
says what kind of FL Studio file this is, how many channels it has and how finely time is
divided.
00000000 46 4C 68 64 06 00 00 00 00 00 10 00 60 00 46 4C FLhd........`.FL
00000010 64 74 3A 9C 01 00 dt:...
Fields
All numbers are little-endian.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ASCII | magic | Always FLhd (46 4C 68 64). |
| 4 | 4 | u32 | length | The size of the rest of the header. Always 6. |
| 8 | 2 | i16 | format | What kind of file this is. See File type. |
| 10 | 2 | u16 | channels | The number of channels in the channel rack. |
| 12 | 2 | u16 | ppq | Pulses per quarter note: the number of ticks in one beat. See PPQ. |
The data chunk follows straight after, at offset 14.
File type
The same container is used for whole projects and for the smaller files FL Studio saves
from parts of a project, such as channel and plugin presets. The format
field tells them apart. It is a signed number.
| Value | File type |
|---|---|
| 0xFFFF (−1) | None |
| 0x0000 (0) | Project |
| 0x0010 (16) | Score |
| 0x0018 (24) | Automation |
| 0x0020 (32) | Channel state |
| 0x0030 (48) | Plugin state |
| 0x0031 (49) | Generator state |
| 0x0032 (50) | Effect state |
| 0x0040 (64) | Insert state |
| 0x0050 (80) | Probably Patcher; Patcher presets are saved as plugin state |
PPQ
Every position and length in the file, such as where a note starts and how long it
lasts, is counted in ticks. The ppq field says how many ticks make one beat.
At 96 PPQ a note one beat long has a length of 96. FL Studio uses one of these values:
24, 48, 72, 96, 120, 144, 168, 192, 384, 768 and 960.