Hello,
I have just tested a little bit the structure of a .p8 file. There are some sections like lua or label. Concerning section sfx, I have notice that there are 64 lines (for 64 sfx) of 168 nibbles. Each line seems to be dedicated to one sfx, with 8 nibbles for global parameters followed by 5 nibbles for each note (32 notes per sfx)
global nibbles:
0:1 effect
2:3 speed
4:5 loop start
6:7 loop end
note nibbles:
0:1 note number
2: waveform
3: volume
4: effect
Global nibbles 0:1 have bits dedicated to each effect. For instance noiz and buzz arre a single on-off bit, bit 0 of nibble 1 for noiz and bit 1 of nibble 1 for buzz. But the 3 other effects (detune, reverb and damper) are a bit complicated, they have each 3 value, 0, 1 and 2. I fail to retro-engine them. Their bits mismatch together, some of them seem to be shared between 2 effects. Here are some tested values.
0000 0001 0000 nothing
0000 0011 0001 noi
0000 0111 0001 noi+buz
0000 1111 0001 noi+buz+det1
0001 0111 0001 noi+buz+det2
0010 1111 0001 noi+buz+det2+rev1
0100 0111 0001 noi+buz+det2+rev2
1000 1111 0001 noi+buz+det2+rev2+dam1
1101 0111 0001 noi+buz+det2+rev2+dam2
Does somebody know how it really works? Does somebody know if there is a technical documentation on the web?
Kind of related, I made a diagram one time that broke down the way PICO-8 handles audio copied to the clipboard. No idea if it'll help you gain any more understanding, but I realized I don't think I ever posted it here to the BBS.
[Please log in to post a comment]