TresCom Forums
http://www.trescomforum.org/

AIFF FILES
http://www.trescomforum.org/viewtopic.php?f=20&t=11210
Page 1 of 1

Author:  Rebel [ Fri Mar 23, 2018 10:31 pm ]
Post subject:  AIFF FILES

Maybe machf knows this. ;) I can't seem to find a straight answer as to whether or not a
file with extension .aiff is the same as .aif. I wrote a quick n' dirty drag n' drop to convert
a aiff into a pcm, but this .aif / .aiff is an unanswered question of mine. If anyone has an
opinion on this or can shed some light on the subject, be glad to hear it as I can't seem to
find one .aif file to look at.

Author:  machf [ Fri Mar 23, 2018 11:29 pm ]
Post subject:  Re: AIFF FILES

Hmmm. Well, .aiff, IIRC, is a Mac sound file extension. At the time, DOS on PCs was limited to 3-character extensions, so I guess maybe .aif is the same, after the trailing f was chopped down.

Author:  Rebel [ Sat Mar 24, 2018 1:57 am ]
Post subject:  Re: AIFF FILES

That makes sense. My one sticking point is I can't fathom how to read 10 bytes as a floating
point number and convert that into an unsigned long so I can decipher the sample rates. Who
the hell came up with it s**t?!

I know you're a math whiz, but I sure as hell am not-

Author:  machf [ Sat Mar 24, 2018 4:34 am ]
Post subject:  Re: AIFF FILES

10 bytes? What an odd choice... 80-bit floating-point numbers. Hmmm...

Well, if they all follow the same pattern, maybe you could treat them as 128-bit (16-bytes) values, filled with trailing 0s.

I know I have the file format specs lying around, from a long time ago. Bacj then when I wanted to make a mulimediaplayer that could replay .WAV and .AIFF files on a Atari 8-bit computer, I think.

EDIT: never mind, I found an archived copy of the specs at the Internet Archive...

Attachment:
AIFFSpecs.zip [45.46 KiB]
Downloaded 105 times


Here's some info about the "80 bit IEEE Standard 754 floating point number":
https://en.wikipedia.org/wiki/Extended_precision

And here's the ""IEEE 754 quadruple-precision binary floating-point format" for comparison:
https://en.wikipedia.org/wiki/Quadruple ... int_format

EDIT2: and aooarently, here's some conversion code icnluded:

http://muratnkonar.com/aiff/index.html

Author:  Rebel [ Sat Mar 24, 2018 9:15 am ]
Post subject:  Re: AIFF FILES

Thanks for the info machf. I'll give it a further look, maybe I can figure out how to
read those 10bytes into a long. I've seen that conversion code though, it specifies
that it 'tricks' the compiler into accepting a 10 byte buffer as an unsigned long, but
it doesn't trick it at all; won't compile. I didn't think it would -

* I was going to send you the drag n' drop code, but apparently you can't attach a
zip to a pm msg.

Author:  Rebel [ Sat Mar 24, 2018 11:30 pm ]
Post subject:  Re: AIFF FILES

Well, I couldn't figure it out, machf, so I just compared a few bytes and came up
with a dummy hack that seems to work.

I attached a drag n' drop test. I included a few .aiff files in the zip.

@Edit. I added a drag n' drop for .au (Sun/NeXT) 16 bit files (format 3). Seems
to be the only format used or bothered with by audio programs (like audacity).

@Edit2: I added a drag n' drop for .voc files (creative lab (16bit)), stereo or mono.
A few sample voc file are inside the zip as examples. Code is inside the zip too.

@Edit3: Added a drag n' drop for .htk files(HMM Toolkit (16bit stereo/mono).

Attachments:
File comment: .htk to wav, drag n' drop app
htk_to_wav.zip [429.09 KiB]
Downloaded 85 times
File comment: .voc to wav, drag n' drop utility
creative_to_wav.zip [497.1 KiB]
Downloaded 85 times
File comment: .au drag n' drop app.
au_convert.zip [226.75 KiB]
Downloaded 91 times
File comment: the app.
aiff_to_wav_test.zip [725.85 KiB]
Downloaded 101 times

Author:  Rebel [ Fri Jun 01, 2018 2:37 pm ]
Post subject:  Re: AIFF FILES

Inside the zip are two more drag n' drops. One converts 24bit .aif files into wav, and the other
converts 1bit .caf files into a wav.

Attachments:
File comment: 24aif to wav/ 16bitcaf to wav
converts.zip [664.27 KiB]
Downloaded 65 times

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/