Log In  

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?

P#124843 2023-01-25 18:13 ( Edited 2023-01-25 18:19)

1

Thank you. I didn't know about the wiki. Very good address! ;)

P#124849 2023-01-25 18:47
1

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.

P#124856 2023-01-25 20:58

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-08 09:51:07 | 0.004s | Q:10