Help with filein, peek~ 8bit raw Amiga IFF samples

Fora's icon

Solved...

I wasn't taking into account the High and Low Bytes. [-256] & [%256]

---------------------

Hey Max'ers!

I am hoping if somebody on here has some experience in dealing with Amiga raw 8-bit audio, the issue I’m facing is that the audio sounds terrible when played back.

The samples are typically raw 8-bit PCM data, sample rates of 16726 or 8363hz, 256 amplitude steps ranging from signed (-128 127)

I have successfully managed to create a patch that imports Amiga IFF samples using filein and peek~ and [scale 0 255 -1. 1.] but playing back the samples sound degraded and distorted due to conversion errors.

Does anybody know how to interpolate / dither 8bit single byte values (0 - 255) to floating point? I'm sure I am missing some crucial conversion maths which I can’t seem to figure out!

Thanks in advance