diff --git a/src/webpage/audio/audio.md b/src/webpage/audio/audio.md index a14e732..ca399b1 100644 --- a/src/webpage/audio/audio.md +++ b/src/webpage/audio/audio.md @@ -1,8 +1,8 @@ -# Jank Audio format -This is a markdown file that will try to describe the jank client audio format in sufficient detail so people will know how this weird custom format works into the future. -This is a byte-aligned format, which uses the sequence jasf in asci as a magic number at the start. +# Fermi Audio format +This is a markdown file that will try to describe the Fermi client audio format in sufficient detail so people will know how this weird custom format works into the future. +This is a byte-aligned format, which uses the sequence jasf in ASCI as a magic number at the start. -the next 8 bits will decide how many voices this file has/will provide, if the value is 255 you'll instead have a 16 bit number that follows for how many voices there are, this *should* be unused, but I wouldn't be totally surprised if it did get used. +The next 8 bits will decide how many voices this file has/will provide, if the value is 255 you'll instead have a 16 bit number that follows for how many voices there are, this *should* be unused, but I wouldn't be totally surprised if it did get used. then it'll parse for that many voices, which will be formatted like the following: name:String8; @@ -25,14 +25,14 @@ Given a non-zero length, this will parse the sounds as following: | 011 | absolute power of the next expression | | 012 | round the next expression | | 013 | Math.cos() on the next expression | -> note: -> -> this is likely to expand in the future as more things are needed, but this is just how it is right now. + +> [!NOTE] +> This is likely to expand in the future as more things are needed, but this is just how it is currently. Once you've read all of the sounds in the file, you can move on to parsing the tracks. This starts out by reading a u16 to find out how many tracks there are, then you'll go on to try and parse that many. -each track will then read a u16 to find out how long it is, then it'll read bytes as the following. -it'll first read the index(which is either a u8 or u16 depending on if the amount of voices was u8 or u16), which is the index of the voice 1-indexed, then if it's not 0 it'll parse two float32s in this order, the volume then the pitch of the sound, if it was 0 it'll instead read one 32f as a delay in the track. if it's a default sound it'll also read a third 32f for length +Each track will then read a u16 to find out how long it is, then it'll read bytes as the following. +It'll first read the index (which is either a u8 or u16 depending on if the amount of voices was u8 or u16), which is the index of the voice 1-indexed, then if it's not 0 it'll parse two float32s in this order, the volume then the pitch of the sound, if it was 0 it'll instead read one 32f as a delay in the track. If it's a default sound it'll also read a third 32f for length -then finally you'll parse the audios which are the complete tracks. you'll first parse a u16 to get how many audios there are, then for each audio you'll first parse a string8 for the name, then a u16 for the length then according to the length you'll go on to parse a u16 to get the track (1-indexed again) where if it's 0 you'll instead add a delay according to the next f32, how many ever times according to the length. +Then finally you'll parse the audios which are the complete tracks. You'll first parse a u16 to get how many audios there are, then for each audio you'll first parse a string8 for the name, then a u16 for the length then according to the length you'll go on to parse a u16 to get the track (1-indexed again) where if it's 0 you'll instead add a delay according to the next f32, how many ever times according to the length.