-
Notifications
You must be signed in to change notification settings - Fork 2
24 August 2026
So in an ‘.a18’ file, we have a 6-byte header (4 bytes for payload length, 2 bytes for frequency) followed by 40-bytes blocks of compressed audio.
What is within each block? In reading John-K’s repo, it seems that the audio information is encoded on the bit level (what bytes are made of). To make it even trickier, the audio bits do not correlate with and entire byte-frame, so a “packet” of information may span 2.3 bytes. This means one cannot delete a single byte without ripping off an uneven amount of compressed data. On the block level, each 40-byte block is its own clean packet you can remove altogether. It’s like a Kit-Kat where there is a deep score between bars —- you can evenly break them apart there (between “blocks”). You could also separate each bar into horizontal chocolate and waffle layers (the “bits”). However, you cannot break a single bar like you did with the scored edge, else the chocolate and waffle layers will be uneven.
One’s next step would be to break down/translate each 40-byte block into its bit representation (1’s and 0’s). Then, one would start analyzing the resulting “bitstream.”
Audio data (at least in this case) is represented by a series of frequencies that harmonize to make sounds. For the A1800 codec, it keeps track of 14 “bands” or frequencies.
The first thing we should do is give each band a starting value —- what is the initial harmony?
This is where the first 5 bits of the bitstream comes in: it is the value of the lowest band.
From here, we have several approaches one could take: keep explicitly recording raw values, or we could cheat like compression does mathematically. Neighbouring bands will have similar frequencies, thus we could record just the small difference between two frequencies in a chain instead of the larger raw value. This saves data space, and helps compress the audio. Instead of recording “36729”, (arbitrarily) as the value, we can see that the band before this value is close: “36730”. We can save space by just recording “+1”, and ensure that the projector’s computer will know to take the last band, and add 1 to get the next band.