CompuServe Thread

#IFF Specs?

9 messages in this thread
#3209From: Kevin BachusDec 5, 1990 1:30 AM
I'm trying to locate the specifications for the IFF sound format. Can anyone point me to a resource? I'd like to convert sounds from IFF to Macintosh and back, but have been unsuccessful. IFF sounds come out loud and garbled on the Mac. I really don't want to rely on a program like Perfect Sound; I'd like to be able to write a stand-alone utility. –Kevin
#3210From: David ArtDec 5, 1990 2:47 AM
Kevin, The _Amiga ROM Kernal Manual – Includes & Autodocs_ has a good section on IFF. It's published by Addison-Wesley, ISBN 0-201-18177-0. The IFF spec is copyrighted, so it can only be obtained from official sources and cannot be in our data libraries. Hope this helps, 8) David
#3211From: Herbert L. CrowderDec 5, 1990 3:25 AM
Hello Kevin, I have checked the reference books I have on hand and found the following references on IFF: Amiga System Programmer's Guide Abacus ISBN 1-55755-034-4 this is not enough to get started so you would probably not want to get it for the IFF rererence Advanced System Programmer's Guide for the Amiga Abacus ISBN 1-55755-047-6 this has enough (just barely) to get started, 20 pages on IFF with a page and a half on IFF sound I included the first reference because the names are similar enough to confuse the unwary (i.e. me). The Advanced Guide has enough to get started but since I don't have many other Amiga books I can't say it would be best that is out there: someone else will have to give you that answer. If you are going to write the conversion program with AmigaBasic some of the Basic programming books for the Amiga may have the references you would need, but since I am trying to work in C I didn't buy many Basic books. Hope you get a better answer form someone else. Herbert L. Crowder
#3217From: Bob RakoskyDec 5, 1990 9:46 AM
Kevin, Aside from the information about the IFF header blocks, to which others have pointed you to documentation sources, you should also note that the actual sample data needs to be "tweaked". Even though both systems use 8-bit sampling, the value range on the systems differs. For the IFF sounds, each sampled byte is in the value range of -128 to 127 (ie, it is a signed value), while on the Mac, I believe the values are unsigned, in the range of 0 to 255. Consequently, the samples can be adjusted by adding a value of 128 to each byte of the sample. (actually, this formula works when converting in either direction). Hope this helps… …BobR
#3220From: Betty Clay/SYSOPDec 5, 1990 12:27 PM
The IFF specs are available in the ROM Kernal Manuals which you should find at any bookstore that sells Amiga books. You can also order it on disk from Commodore: Commodore Business Machines 1200 Wilson Drive West Chester, PA (sorry – forgot the ZIP) I think the cost is $20 for the disk with the specs. Betty
#3293From: Kevin DarlingDec 7, 1990 2:07 AM
Hi Kevin (nice name ;-)… I used to see a lot of IFF info here, but I think the computer monster <grin> "ate" it over time, most usually during forum reorganizations… altho several newer IFF graphics layouts can be found in the AMIGAVEN forum. As people here have pointed out, a copy of the IFF formats adopted by and/or submitted to CBM (in their "official" role as repository for IFF forms used by Amiga programs), can be found in one of the CBM manuals. Personally I highly recommend getting that manual, if only because most forms are printed there in one easy-to-reference spot. Errr, make that "most Amiga forms". But why aren't the specs posted here to help foster new programs/programmers? I really don't know! Misconceptions, likely. The pages printed as a service in the CBM manual probably fall under a compilation copyright for the manual (and any side comments in there surely do), but the specs themselves are freely available… in fact, you'll find word-for-word copies of the EA IFF intro in the computer manuals of any machine using IFF (it is _not_ an Amiga-only format). For now, I'd suggest you check out local BBS's for the info and PD sample code…. since, as the CBM support people on Internet have also just pointed out, most Amiga IFF docs are there on the Fish public domain disk collection. Many BBS's have copies. Look for these: Disk #16 – complete copy of the CBM IFF developer disk: specs and code Disk #43 – program to convert instrument files to sample files Disk #44 – extra info on sound/inst files <cont'd>
#3294From: Kevin DarlingDec 7, 1990 2:08 AM
<cont'd> Do you understand the basic IFF layout? If not, ask, and I'm sure someone here will help (I'll try to give enuf info that you can figure it out anyway). For most mono samples you're converting, I'll simplify what you need. The FORM used is "8SVX". The two main chunks to worry about are: "VHDR" Voice Header Chunk, which contains: 4 bytes – number of samples 4 bytes – set to zero 4 bytes – set to zero 2 bytes – frequency in cycles/sec 1 byte – set to 01 1 byte – set to 00 if not encoded 4 bytes – volume "BODY" Data body Chunk, which contains -128 to +127 sample data, Stereo data is written left first, then right… equal in size. A one-byte (ridiculous example 😉 sample would therefore look like this: 464f 524d 0000 002A – "FORM", length of Form 3853 5658 – "8SVX" (form type) 5648 4452 0000 0014 – "VHDR", length of VHDR (20 bytes) 0000 0001 – number of samples 0000 0000 0000 0000 – trust me 😉 4764 – 18.276KHz sample rate 0100 – trust me 0001 0000 – example volume 424f 4459 0000 0002 – "BODY", length of BODY (rounded to word!!) 8000 – the data ($80) plus a padding byte to round up Sorry for few details… I'm in the middle of work, but I couldn't stand to make you wait on your project ;-), and it kinda gripes me that this info is no longer around on CIS (seems to me that CBM <hint hint> should post it themselves). Good luck and best – kev PS: most Mac sounds are at 5.4, 7.4, 11 and 22 KHz. Bob already told you about the $80 offset on the values.
#3362From: Kevin BachusDec 8, 1990 8:49 PM
Kevin: Thanks for a truly illuminating reply. I'll check the sample IFF sound files I have right now and see if I have any questions about the way they line up with your example. I'll let you know if I have any questions. Sorry for the brevity of this reply, but I'm on the road and using an unfamiliar computer. Thanks also to everyone else who pointed me to references. I figured out the $80 difference myself by experimentation. That was the biggest hurdle to cross. –Kevin
#3424From: Matthew J. W. RatcliffDec 10, 1990 1:32 PM
Mac sound to IFF converters already exist.. one should be in this loibrary somewhere..