A pattern’s notes are stored in its pattern notes event (224) as a run of 24-byte records, one per note, with nothing between them. The number of notes is the event’s size divided by 24. Controller changes are stored the same way in event 223, as 12-byte records.
Earlier versions wrote 20-byte note records. The 24-byte record has a group field at offset 14, and pan, velocity and the two modulation bytes sit four bytes later than before. No source records which version made the change. This site places it at 9.0, because the new field holds note groups and FL Studio 9.0.0 introduced “note & Playlist clip grouping”, according to Image-Line’s changelog. That is an inference. The FL Studio 10.0.9 file examined for this site has 24-byte records.
The layout below is the one PyFLP reads, checked against FL Studio 20 files. One event size can hold a whole number of either record: 120 bytes is six 20-byte records or five 24-byte ones. So the event size alone cannot tell the two apart, and the version decides. An event that is not a whole number of 24-byte records means the file is damaged or not of this variant.
00000000 00 00 00 00 00 00 00 00 60 00 00 00 3C 00 00 00 ........`...<...
00000010 78 00 40 00 40 64 80 80 x.@.@d..
Note record
Every number is little-endian. Positions and lengths are in ticks; the PPQ in the header says how many ticks make one beat.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | position | Where the note starts, in ticks from the start of the pattern. |
| 4 | 2 | u16 | flags | Note flags. Bit 3 (value 8) marks a slide note. Other bits are unknown. |
| 6 | 2 | u16 | channel | The channel in the rack that plays the note. |
| 8 | 4 | u32 | length | How long the note lasts, in ticks. |
| 12 | 2 | u16 | key | The note number. 60 is C5 in FL Studio’s naming. |
| 14 | 2 | u16 | group | The note group, which ties notes together for editing. |
| 16 | 1 | u8 | fine_pitch | Fine pitch of the note, from FL Studio 3.3. |
| 17 | 1 | byte | unknown | Unknown. |
| 18 | 1 | u8 | release | Release. |
| 19 | 1 | u8 | midi_channel | The MIDI channel. Since FL Studio 6.0.1 it also sets the note colour, according to PyFLP. |
| 20 | 1 | u8 | pan | Panning of the note. |
| 21 | 1 | u8 | velocity | How hard the note is played. |
| 22 | 1 | u8 | mod_x | Modulation X. |
| 23 | 1 | u8 | mod_y | Modulation Y. |
Controller record
Each record in a pattern controllers event (223) is one controller change at one point in the pattern.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | position | Where the change happens, in ticks. |
| 4 | 1 | byte | unknown | Unknown. |
| 5 | 1 | byte | unknown | Unknown. |
| 6 | 1 | u8 | channel | The channel the change applies to. |
| 7 | 1 | u8 | flags | Flags. Their meaning is unknown. |
| 8 | 4 | f32 | value | The controller value, as a 32-bit float. |