TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Fri Aug 17, 2018 3:13 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: AIFF FILES
PostPosted: Fri Mar 23, 2018 10:31 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4773
Location: That country nobody likes (you know the one)
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.


Top
 Profile  
 
 Post subject: Re: AIFF FILES
PostPosted: Fri Mar 23, 2018 11:29 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10816
Location: Lima, Peru
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.

_________________
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files


Top
 Profile  
 
 Post subject: Re: AIFF FILES
PostPosted: Sat Mar 24, 2018 1:57 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4773
Location: That country nobody likes (you know the one)
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-


Top
 Profile  
 
 Post subject: Re: AIFF FILES
PostPosted: Sat Mar 24, 2018 4:34 am 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10816
Location: Lima, Peru
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 77 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

_________________
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files


Top
 Profile  
 
 Post subject: Re: AIFF FILES
PostPosted: Sat Mar 24, 2018 9:15 am 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4773
Location: That country nobody likes (you know the one)
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.


Top
 Profile  
 
 Post subject: Re: AIFF FILES
PostPosted: Sat Mar 24, 2018 11:30 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4773
Location: That country nobody likes (you know the one)
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 64 times
File comment: .voc to wav, drag n' drop utility
creative_to_wav.zip [497.1 KiB]
Downloaded 64 times
File comment: .au drag n' drop app.
au_convert.zip [226.75 KiB]
Downloaded 75 times
File comment: the app.
aiff_to_wav_test.zip [725.85 KiB]
Downloaded 76 times
Top
 Profile  
 
 Post subject: Re: AIFF FILES
PostPosted: Fri Jun 01, 2018 2:37 pm 
Offline
-=TresCom Developer=-
-=TresCom Developer=-
User avatar

Joined: Sun Nov 10, 2002 10:26 pm
Posts: 4773
Location: That country nobody likes (you know the one)
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 46 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group