Article History
 
 
 

7411 views
41% goluigi

panda (format)
 

Panda Tracker
token - panda

points - Chipist

file types -

max filesize - 10mb

description - setrodox's ohc machine
::|CONTENTS
  1. About
  2. Structure
  3. Panda Pattern Compression Format
  4. See Also

About



The filetype used for songs made with PandaTracker. It consists of 8 channels, each with their own unique instruments. They are generated through synthesis. Channels 1-6 are melodic and channels 7 and 8 are percussive. Check out PandaTracker for more infos about the tracker.

Structure



0x00: PANDADEV (8 bytes)
0x08: 0x00 (3 bytes)
0x0B: 0x02 (version?)
0x0C: song data size (file size - 0x10) (4 bytes)
0x10: compression byte (explained later on)
0x11: pretty colors~ (3 bytes)
0x14: speed (1 byte)
0x15: order list (compressed)
0x??: pattern data (also compressed)

The order list is 64 bytes when uncompressed. 0xFF is used for empty orders.

Pattern data is 131072 bytes when uncompressed.
Pattern data is divided into 8 channels, each 16384 bytes when uncompressed.
Each channel is divided into 4 "sub-channels": note, volume, fx command, fx value, each 4096 bytes large.
Empty pattern cells use value 0x00

Panda Pattern Compression Format



Compression occurs in the order list and pattern data, and is responsible for making the panda files nice and small. ;)

Anything that is not a compression byte, is an order list entry, note, volume (or fx) value depending on where you are in the file)

After encountering a compression byte, a variable length encoded value follows (similar to delta values in MIDI files), and 1 data byte. Then (variable length encoded value+1) bytes are set to this data byte. This is most commonly at the end of orderlist where the remaining bytes in the orderlist are set to 0xFF, and the end of a channel, where the remaining bytes are set to 0x00

I'm not entirely sure, but I think the variable length encoded value maxes out at 0xFFFF. It's then followed by another compression byte/VLE/data byte pair.

See additional format notes from Jangler on GitHub
.

See Also



PandaTracker