* X-NEWS: fps alt.binaries.sounds.misc: 1277H Relay-Version: VMS News - V6.0-3 14/03/90 VAX/VMS V5.5; site fps.mcw.eduH Path: fps.mcw.edu!uwm.edu!caen!destroyer!uunet!mcsun!sun4nl!cwi.nl!guidoP Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,news.answers. Subject: FAQ: Audio File Formats (version 2.3)0 Message-ID: <audio-fmts_710671975@charon.cwi.nl>% From: guido@cwi.nl (Guido van Rossum)  Date: 9 Jul 92 08:52:57 GMT  Reply-To: guido@cwi.nl Sender: news@cwi.nl + Followup-To: alt.binaries.sounds.d,comp.dsp  Expires: 6 Aug 92 08:52:55 GMT& Approved: news-answers-request@MIT.Edu0 Supersedes: <audio-fmts_709299213@charon.cwi.nl> Lines: 1365 A Xref: fps alt.binaries.sounds.misc:1277 alt.binaries.sounds.d:464    Archive-name: audio-fmts/part1- Submitted-by: Guido van Rossum <guido@cwi.nl>  Version: 2.3 Last-modified: 9-Jul-1992   % FAQ: Audio File Formats (version 2.3) % =====================================    Table of contents  -----------------    Introduction Device characteristics Popular sampling rates Compression schemes  Current hardware File formats File conversions Playing audio files on UNIX  Playing audio files on micros  The Sound Site Newsletter  Posting sounds   Appendices:   #   FTP access for non-internet sites    AIFF Format (Audio IFF)     The NeXT/Sun audio file format   IFF/8SVX Format    Playing sound on a PC    The EA-IFF-85 documentation '   US Federal Standard 1016 availability "   Creative Voice (VOC) file format   RIFF WAVE (.WAV) file format      Introduction ------------  E This is version 2 of this FAQ, which I started in November 1991 under F the name "The audio formats guide".  I bumped the major version numberA since the Subject and Newsgroups headers have changed to make the E subject more informative and give the guide a wider audience.  I also - added a Table of contents section at the top.   C I am posting this about once a fortnight, either unchanged (just to E inform new readers), or updated (if I learn more or when new hardware E or software becomes popular).  I post to alt.binaries.sounds.{misc,d} D and to comp.dsp, for maximal coverage of people interested in audio,( and to news.answers, for easy reference.  A A companion posting with subject "Change to: ..." is occasionally E posted listing the diffs between a new version and the last.  This is E not reposted, and it is suppressed when the diffs are bigger than the  new version.  A Send updates, comments and questions to <guido@cwi.nl>; flames to 
 /dev/null.  E I'd like to thank everyone who sent me mail with updates for previous B versions.  The list of names is really too long to list you all...  3   --Guido van Rossum, CWI, Amsterdam <guido@cwi.nl> C   "Fear, surprise, ruthless efficiency, a fanatical devotion to the    pope, and nice red uniforms."      Device characteristics ----------------------  D In this text, I will only use the term "sample" to refer to a single@ output value from an A/D converter, i.e., a small integer number (usually 8 or 16 bits).   > Audio data is characterized by the following parameters, which= correspond to settings of the A/D converter when the data was F recorded.  Naturally, the same settings must be used to play the data.  ; - sampling rate (in samples per second), e.g. 8000 or 44100   ) - number of bits per sample, e.g. 8 or 16   5 - number of channels (1 for mono, 2 for stereo, etc.)   A Approximate sampling rates are often quoted in Hz or kHz ([kilo-] C Hertz), however, the politically correct term is samples per second F (samples/sec).  Sampling rates are always measured per channel, so forB stereo data recorded at 8000 samples/sec, there are actually 16000C samples in a second.  I will sometimes write 8 k as a shorthand for  8000 samples/sec.   C Multi-channel samples are generally interleaved on a frame-by-frame A basis: if there are N channels, the data is a sequence of frames, C where each frame contains N samples, one from each channel.  (Thus, D the sampling rate is really the number of *frames* per second.)  For- stereo, the left channel usually comes first.   D The specification of the number of bits for U-LAW (pronounced mu-lawC -- the u really stands for the Greek letter mu) samples is somewhat B problematic.  These samples are logarithmically encoded in 8 bits,B like a tiny floating point number; however, their dynamic range is@ that of 14 bit linear data.  Source for converting to/from U-LAWD (written by Jef Poskanzer) is distributed as part of the SOX package@ mentioned below; it can easily be ripped apart to serve in otherC applications.  The official definition is the CCITT standard G.711.   D (There exists another encoding similar to U-LAW, called A-LAW, whichF is used as a European telephony standard.  I don't know how it differs@ from U-LAW.  There is less support for it in UNIX workstations.)     Popular sampling rates ----------------------  F Some sampling rates are more popular than others, for various reasons.D Some recording hardware is restricted to (approximations of) some ofE these rates, some playback hardware has direct support for some.  The > popularity of divisors of common rates can be explained by the4 simplicity of clock frequency dividing circuits :-).   Samples/sec     Description   B 5500            One fourth of the Mac sampling rate (rarely seen).  A 7333            One third of the Mac sampling rate (rarely seen).   E 8000            Exactly 8000 samples/sec is a telephony standard that C                 goes together with U-LAW (and also A-LAW) encoding. E                 Some systems use an approximation; in particular, the ?                 NeXT workstation uses 8012.8210513 samples/sec. F                 (Can anyone explain why?  SGI software calls this rate                 "codec-rate".)  @ 11 k            Either 11025, a quarter of the CD sampling rate,?                 or half the Mac sampling rate (perhaps the most )                 popular rate on the Mac).   = 16000           Used by, e.g. the G.722 compression standard.   C 22 k            Either 22050, half the CD sampling rate, or the Mac D                 rate; the latter is precisely 22254.545454545454 but+                 usually misquoted as 22000.   B 32000           Used in digital radio, NICAM (Nearly-InstantaneousD                 Companded Audio Multiplex [IBA/BREMA/BBC]) and other5 		TV work, at least in the UK; also some DAT machines 5 		can do it.  It is also the standard long play speed  		for DAT non linear encoding.  = 44056           This weird rate is used by professional audio C                 equipment to fit an integral number of samples in a                  video frame.  F 44100           The CD sampling rate.  (Professional DAT also supports
 		this rate.)   > 48000           The DAT (Digital Audio Tape) sampling rate for 		domestic use.   C Files samples on SoundBlaster hardware have sampling rates that are  divisors of 1000000.  F While professinal musicians disagree, most people don't have a problemD if recorded sound is played at a slightly different rate, say, 1-2%.@ On the other hand, if recorded data is being fed into a playback< device in real time (say, over a network), even the smallestF difference in sampling rate can frustrate the buffering scheme used...  > There may be an emerging tendency to standardize on only a few@ sampling rates and encoding styles, even if the file formats may, differ.  The suggested rates and styles are:  %     rate (samp/sec) style mono/stereo        8000 8-bit U-LAW mono /     22050 8-bit linear unsigned mono and stereo .     44100 16-bit linear signed mono and stereo     Compression schemes  -------------------   B Strange though it seems, audio data is remarkably hard to compressF effectively.  For 8-bit data, a Huffman encoding of the deltas between> successive samples is relatively successful.  For 16-bit data,> companies like Sony and Philips have spent millions to develop proprietary schemes.  E Public standards for voice compression are slowly gaining popularity, E e.g. CCITT G.721 and G.723 (ADPCM at 32 and 24 kbits/sec).  (ADPCM == E Adaptive Delta Pulse Code Modulation.)  Free source code for a *fast*cC 32 kbits/sec ADPCM algorithm is available by ftp from ftp.cwi.nl asf /pub/adpcm.shar.  B There are also two US federal standards, 1016 (Code excited linearE prediction (CELP), 4800 bits/s) and 1015 (LPC-10E, 2400 bits/s).  Seea also the appendix for 1016.i  = (Note that U-LAW and silence detection can also be consideredn compression schemes.)w  @ Finally, the comp.compression FAQ has some text on the 6:1 audioE compression scheme used by MPEG (a video compression standard-to-be).mC It's interesting to note that video compression reaches much highert ratios (like 26:1).      Current hardware ----------------  C I am aware of the following computer systems that can play back and.E (sometimes) record audio data, with their characteristics.  Note thatmC for most systems you can also buy "professional" sampling hardware,dB which supports much better quality, e.g. >= 44.1 k 16 bits stereo.; The characteristics listed here are a rough estimate of the C capabilities of the basic hardware only (and even here I am on thin / ice, with systems becoming ever more powerful).   I machine             bits            max sampling rate    #output channelsN  : Mac                 8               22k                  1> Apple IIgs          8               32k / >70k           8(st): PC/Soundblaster     8               13k  /22k            1: Atari ST            8               22k                  1: Atari STe,TT        8               50k                  2> Amiga               8               ~29k                 4(st): Sun Sparc           U-LAW           8k                   1> NeXT                U-LAW,8,16      44.1k                1(st)> SGI Indigo          8,16            48k                  4(st)> Acorn Archimedes    ~U-LAW          ~180k                8(st)> Sony RISC-NEWS      8, 16           37.8k                ?(st): VAXstation 4000     U-LAW           8k                   1: Tandy 1000/[TS]L    8-bit           22k                  3  ; 4(st) means "four voices, stereo"; sampling rates xx/yy areu# different recording/playback rates.{  C All these machines can play back sound without additional hardware, B although the needed software is not always standard; only the Sun,@ NeXT and SGI come with standard sampling hardware (the NeXT onlyD samples U-LAW at 8000 samples/sec from the built-in microphone port;+ you need a separate board for other rates).g  C The new VAXstation 4000 series lets you PLAY audio (.au) files, andg? the as-of-yet-unreleased package, DECsound, will let you do thee
 recording.  C The SGI Personal IRIS 4D/30 and 4D/35 have the same capabilities asy the Indigo.l  @ The new Apple Macs have more powerful audio hardware; the latest! models have built-in microphones.i  C Software exists for the PC that can play sound on its 1-bit speaker C using pulse width modulation (see appendix); the Soundblaster board < records at rates up to 13 k and plays back up to 22 k (weird' combination, but that's the way it is).   D On the NeXT, the Motorola 56001 DSP chip is programmable and you canD (in principle) do what you want.  The SGI uses the same DSP chip butF it can't be programmed by users -- SGI prefers to offer it as a sharedE system resource to multiple applications, thus enabling developers to,C program audio with their Audio Library and avoid code modifications F for execution on future machines with different audio hardware, i.e. a different DSP.  ? The Amiga also has a 6-bit volume, which can be used to producelE something like a 14-bit output for each voice.  The hardware can alsoaE use one of each voice-pair to modulate the other in FM (period) or AMm (volume, 6-bits).   A The Acorn Archimedes uses a variation on U-LAW with the bit order E reversed and the sign bit in bit 0.  Being a 'minority' architecture,lA Arc owners are quite adept at converting sound/image formats from F other machines, and it is unlikely that you'll ever encounter sound in1 one of the Arc's own formats (there are several).   G CD-I machines form a special category.  The following formats are used:l  &      - PCM 44.1 kHz standard CD format"      - ADPCM - Addaptive Delta PCM        - Level A 37.8 kHz 8-bit         - Level B 37.8 kHz 4-bita        - Level C 18.9 kHz 4-bit      File formats ------------  C Historically, almost every type of machine used its own file format D for audio data, but some file formats are more generally applicable,F and in general it is possible to define conversions between almost any> pair of file formats -- sometimes losing information, however.  E File formats are a separate issue from device characteristics.  TheredA are two types of file formats: self-describing formats, where the @ device parameters and encoding are made explicit in some form ofC header, and "raw" formats, where the device parameters and encoding 
 are fixed.  > Self-describing file formats generally define a family of dataB encodings, where a header fields indicates the particular encodingF variant used.  Headerless formats define a single encoding and usuallyC allows no variation in device parameters (except sometimes samplinguF rate, which can be a pain to figure out other than by listening to the sample).  D The header of self-describing formats contains the parameters of the7 sampling device and sometimes other information (e.g. anF human-readable description of the sound, or a copyright notice).  MostF headers begin with a simple "magic word".  (Some formats do not simplyC define a header format, but may contain chunks of data intermingledgA with chunks of encoding info.)  The data encoding defines how therB actual samples are stored in the file, e.g. signed or unsigned, asC bytes or short integers, in little-endian or big-endian byte order,i? etc.  Strictly spoken, channel interleaving is also part of the1D encoding, although so far I have seen little variation in this area.  B Some file formats apply some kind of compression to the data, e.g.- Huffman encoding, or simple silence deletion.   + Here's an overview of popular file formats.   $         Self-describing file formats$         ----------------------------  G extension, name   origin          variable parameters (fixed; comments)o  H .au or .snd       NeXT, Sun       rate, #channels, encoding, info stringM .aif(f), AIFF     Apple, SGI      rate, #channels, sample width, lots of info K .aif(f), AIFC     Apple, SGI      same (extension of AIFF with compression)lK .iff, IFF/8SVX    Amiga           rate, #channels, instrument info (8 bits) N .voc              Soundblaster    rate (8 bits/1 ch; can use silence deletion)M .wav, WAVE        Microsoft       rate, #channels, sample width, lots of info0A .sf               IRCAM           rate, #channels, encoding, info N none, HCOM        Mac             rate (8 bits/1 ch; uses Huffman compression)- none, MIME        Internet        (see below)s- .mod or .nst      Amiga           (see below)i  F Note that the filename extension ".snd" is ambiguous: it can be eitherC the self-describing NeXT format or the headerless Mac/PC format, or  even a headerless Amiga format.n  A I know nothing for sure about the origin of HCOM files, only that E there are a lot of them floating around on our system and probably ataE FTP sites over the world.  The filenames usually don't have a ".hcom"nB extension, but this is what SOX (see below) uses.  The file format= recognized by SOX includes a MacBinary header, where the fileaF type field is "FSSD".  The data fork begins with the magic word "HCOM"D and contains Huffman compressed data; after decompression it it is 8 bits unsigned data.i  E IFF/8SVX allows for amplitude contours for sounds (attack/decay/etc).tE Compression is optional (and extensible); volume is variable; author,t$ notes and copyright properties; etc.  C AIFF, AIFC and WAVE are similar in spirit but allow more freedom in.9 encoding style (other than 8 bit/sample), amongst others.e  E There are other sound formats in use on Amiga by digitizers and musice programs, such as IFF/SMUS.n  D Appendices describes the NeXT and VOC formats; pointers to more infoB about AIFF, AIFC, 8SVX and WAVE (which are too complex to describe here) are also in appendices.c  C DEC systems (e.g. DECstation 5000) use a variant of the NeXT formataA that uses little-endian encoding and has a different magic numberi' (0x0064732E in little-endian encoding).   D Standard file formats used in the CD-I world are IFF but on the disc they're in realtime files.  F An interesting "interchange format" for audio data is described in the> proposed Internet Standard "MIME", which describes a family ofF transport encodings and structuring devices for electronic mail.  ThisC is an extensible format, and initially standardizes a type of audio2D data dubbed "audio/basic", which is 8-bit U-LAW data sampled at 8000 samples/sec.  B Finally, a format that doesn't really belong here are "MOD" files,E usually with extension ".mod" or ".nst" (on PCs, that is -- on Amigas @ they have a *prefix* of "mod.").  These files are short clips ofB sounds with sequencing information.  This makes for fairly compactA files but is limitted to making music with samples of a piano ando
 trumpet, etc.e           Headerless file formats          -----------------------   * extension       origin          parameters or name   I .snd, .fssd     Mac, PC         variable rate, 1 channel, 8 bits unsigned F .ul             US telephony    8 k, 1 channel, 8 bit "U-LAW" encodingG .snd?           Amiga           variable rate, 1 channel, 8 bits signed   D It is usually easy to distinguish 8-bit signed formats from unsignedB by looking at the beginning of the data with 'od -b <file | head';E since most sounds start with a little bit of silence containing small F amounts of background noise, the signed formats will have an abundanceD of bytes with values 0376, 0377, 0, 1, 2, while the unsigned formatsD will have 0176, 0177, 0200, 0201, 0202 instead.  (Using "od -c" will< also show any headers that are tacked in front of the file.)  B The Apple IIgs records raw data in the same format as the Mac, butF uses a 0 byte as a terminator; samples with value 0 are replaced by 1.     File conversions ----------------       SOXo     ---y  D The most versatile tool for converting between various audio formatsB is SOX ("Sound Exchange").  It can read and write various types ofD audio files, and optionally applies some special effects (e.g. echo,' channel averaging, or rate conversion).e  B SOX recognizes all filename extensions listed above except ".snd",E which would be ambiguous anyway, and ".wav" (but there's a patch, see)A below).  Use type ".au" for NeXT ".snd" files.  Mac and PC ".snd"y3 files are completely described by these parameters:          -t raw -b -u -r 11000i  E (or -r 22000 or -r 7333 or -r 5500; 11000 seems to be the most commond rate).  D The source for SOX, version 5, was posted to alt.sources, and shouldC be widely archived.  To save you the trouble of hunting it down, ita? can be gotten by anonymous ftp from wuarchive.wustl.edu, in the C directory usenet/alt.sources/articles, files 5581.Z through 5585.Z. C (These files are compressed news articles containing shar files, ifbE you hadn't guessed.)  I am sure many sites have similar archives, I'm D just listing one that I know of and which carries a lot of this kindE of stuff.  (Also see the appendix if you don't have Internet access.)   E A compressed tar file containing the same version of SOX is availableiF by anonymous ftp from ftp.cwi.nl [192.16.184.180], in /pub/sox*.tar.Z.8 You may be able to locate a nearer version using archie!  
 Ports of SOX:b  D - The source as posted should compile on any UNIX system with 4-byte   integers.a  A - A PC version is available by ftp from ftp.cwi.nl (see above) as ;   pub/sox4*.zip; also available from the garbo mail server.i  D - The latest Amiga SOX (corresponding to version 5) is available via-   anonymous ftp to wuarchive.wustl.edu, filesa>   systems/amiga/audio/utils/amisox*.  (See below for a non-SOX   solution.)  ? - Work is currently in progress to get SOX ported to VMS (watcho!   comp.os.vms for announcements).    SOX usage hints:  C - Often, the filename extension of sound files posted on the net is @   wrong.  Don't give up, try a few other possibilities using theA   "-t <type>" option.  Remember that the most common file type is F   unsigned bytes, which can be indicated with "-t ub".  You'll have to<   guess the proper sampling rate, but often it's 11k or 22k.  = - In particular, with SOX version 4 (or earlier), you have to,5   specify "-t 8svx" for files with an .iff extension.e  D - When converting linear samples to U-LAW using the .au type for theC   output file, you must specify "-U" for the output file, otherwisetE   you will end up with a file containing a NeXT/Sun header but linearhE   samples -- only the NeXT will play such files correctly.  Also, you A   must explicitly specify an output sampling rate with "-r 8000".dC   (This may seem fixed for most cases in version 5, but it is stilla:   occasionally necessary, so I'm keeping this warning in.)           Sun Sparc          ---------e  > On Sun Sparcs, starting at SunOS 4.1, a program "raw2audio" isC provided by Sun (in /usr/demo/SOUND -- see below) which takes a rawaA U-LAW file and turns it into a ".au" file by prefixing it with an  appropriate header.d           NeXT         ----  F On NeXTs, you can usually rename .au files to .snd and it'll work likeA a charm, but some .au files lack header info that the NeXT needs..& This can be fixed by using sndconvert:  G         sndconvert -c 1 -f 1 -s 8012.8210513 -o nextfile.snd sunfile.aut  $         SGI Indigo and Personal IRIS$         ----------------------------  > SGI supports a program sfconvert, similar in spirit to SOX (inB /usr/sbin in IRIX version 4.0).  Also note that the sfplay program? (see the next section) can do on-the-fly conversion for severale popular formats.  
         Amigag
         -----a  B Mike Cramer's SoundZAP can do no effects except rate change and itB only does conversions to IFF, but it is generally much faster than9 SOX.  (Ftp'able from the same directory as amisox above.)i   	Tandy 	-----  C The Tandy 1000 uses a (proprietary?) compressed format.  There is a-2 PD Mac to Tandy conversion program called CONVERT.     Playing audio files on UNIXr ---------------------------a  C The commands needed to play an audio file depend on the file format ? and the available hardware and software.  Most systems can onlypD directly play sound in their native format; use a conversion program" (see above) to play other formats.           Sun Sparc          ---------   ; Raw U-LAW files can be played using "cat file >/dev/audio".o  E A whole package for dealing with ".au" files is provided by Sun on an D experimental basis, in /usr/demo/SOUND.  You may have to compile theF programs first.  (If you can't find this directory, either you are notD running SunOS 4.1 yet, or your system administrator hasn't installed= it -- go ask him for it, not me!)  The program "play" in thisaD directory recognizes all files in Sun/NeXT format, but can play only" those using U-LAW encoding at 8 k.  B You can also cat a ".au" file to /dev/audio, if it uses U-LAW; theF header will sound like a short burst of noise but the rest of the dataC will sound OK (really, the only difference in this case between rawwB U-LAW and ".au" files is the header; the U-LAW data is exactly the same).  E Finally, OpenWindows 3.0 has a full-fledged audio tool.  You can dropM) audio file icons into it, edit them, etc.d           NeXT         ----  B On NeXT machines, the standard "sndplay" program can play all NeXTB format files (this include Sun ".au" files).  It supports at least> U-LAW at 8 k and 16 bits samples at 22 or 44.1 k.  It attempts) on-the-fly conversions for other formats.e  C Sound files are also played if you double-click on them in the fileI browser.  $         SGI Indigo and Personal IRIS$         ----------------------------  C On SGI Indigo and the 4D/30 and /35 Personal IRIS workstations, theeF program "sfplay" (in /usr/sbin) plays AIFF files, if the sampling rate@ is one of 8000, 11025, 16000, 22050, 32000, 44100, or 48000 (theB library interface to the hardware doesn't support other rates -- IF don't know what the hardward is actually capable of).  On the PersonalB IRIS, you need to have the audio board installed (check the output8 from hinv) and you must run IRIX 3.3.2 or 4.0 or higher.  F There is no simple /dev/audio interface on these SGI machines.  (ThereB was one on 4D/25 machines, reading and writing signed linear 8-bitB samples at rates of 8, 16 and 32 k; unfortunately the board designG caused a lot of noise from the CPU board to clutter the audio signals.)t  B A program "playulaw" was posted as part of the "radio 1.0" releaseF that I posted to alt.sources recently; it plays raw U-LAW files on the' Indigo or Personal IRIS audio hardware.a           Sony NEWS,         ---------n  D The Sony RISC-NEWS line (NWS-3250 laptop, NWS-37xx desktop, NWS-38xxF desktop w/ IOP) also has builtin sound capabilities.  You can also buyD external boards for the older NEWS machines or to add extra channelsC to the new machines.  In the default mode (8k/8-bit), Sun .au files C are directly supported (you can 'cat' .au files to /dev/sb and havel them play).            Vaxstation 4000-         ---------------g  B ".au" files can be played by COPYING them to device "SOA0:".  ThisE device is set up by enabling the driver SODRIVER, as described below:   G DEC's sound stuff is like most other new toy.  Hardware first, THEN theaI software.   DEC will soon be releasing a layered product called DECsound, G which will let you record, play, and (possibly) manipulate sound files.t3 Third party product(s) have ALREADY hit the market.   = Enabling SODRIVER:   (you can use the following command file)o  ; $!---------------- cut here -------------------------------w) $! sound_setup.com    enable SOUND drivern $ run sys$system:sysgen B connect soa0 /adapter=0 /csr=%x0e00 /vector=%o304 /driver=sodriver exit $ exitA $!----------------- cut here ------------------------------------w  D The external audio port comes with a telephone-jack-like port.   ForC starters, you can plug a telephone RECEIVER right into this port to-B hear your first sound files.   After that, you can use the adapterB (that came with the VaxStation), and plug in a small set of stereoD speakers (the kind you'd plug into a WALKMAN, for example), for more volume.s           Others         ------  C Most other UNIX boxes don't have audio hardware and thus can't plays audio data.b     Playing audio files on microsa -----------------------------t  F Most micros have at least a speaker built in, so theoretically all youB need is the right software.  Unfortunately most systems don't comeD bundled with sound-playing software, so there are many public domainF or shareware software packages, each with their own bugs and features.> Most separate sound recording hardware also comes with playingB software, most of which can play sound (in the file format used by= that hardware) even on machines that don't have that hardwares
 installed.  8 Chris S. Craig announces the following software for PCs:  J ScopeTrax       This is a complete PC sound player/editor package.  SoundsL                 can be played back at ANY rate between 1kHz to 65kHz throughI                 the PC speaker or the Sound Blaster.  It supports several H                 file formats including VOC, IFF/8SVX, raw signed and rawG                 unsigned.  A separate executable is provided to convert9I                 .au and mu-law to raw format.  ScopeTrax requires EGA/VGAiH                 graphics for editing and displaying sounds on a REALTIME9                 oscilloscope.  The package also includes:rG                       * An expanded memory player which can play sounds;1                         larger than 640K in size.hE                       * Basic (rough) sound compression/uncompressionn"                         utilities./                       * Complete documentation.bJ                 The package is FREEWARE!  It is available on SIMTEL in the,                 PD1:[MSDOS.SOUND] directory.  D One of the appendices below contains a list of more programs to play sound on the PC.  A For sounds on Atari STs - programs are in the atari/sound/playersi5 directory on atari.archive.umich.edu (141.211.164.8).m  ! Malcolm Slaney from Apple writes:b  J  "We do have tools to play sound back on most of our Unix hosts.  We wroteH  a program called TcpPlay that lets us read a sound file on a Unix host,H  open a TCP/IP connection to the Mac on my desk, and plays the file.  WeH  think of it as X windows for sound (at least a step in that direction.)  A  This software is available for anonymous FTP from ftp.apple.com.i,  Look for  ~ftp/pub/TcpPlay/TcpPlay.sit.hqx.  M  Finally, there are MANY tools for working with sound on the Macintosh. ThreecF  applications that come to mind immediately are SoundEdit (formerly byN  Farralon and now by MacroMind/Paracomp), Alchemy and Eric Keller's Signalyze.J  There are lots of other tools available for sound editing (including some   of the QuickTime Movie tools.)"  F On a Tandy 1000, sounds can be played and recorded with DeskMate SoundF (SOUND.PDM), or if they not stored in compressed format, they can also@ be played be a program called PLAYSND.  No indication of whether? PLAYSND is PD or not. It hasn't been updated since March of 89.    The Sound Site Newsletterl -------------------------i  E An electronic publication with lots of info about digitised sound andh: sound formats, albeit mostly on micros, is "The Sound SiteA Newsletter".  So far, 8 issues have appeared, the last in January = 1992.  Issues can be ftp'ed from saffron.inset.com, directory 6 directory pub/rogue/newsletters, or from ccb.ucsf.edu,! Pub/Sound_list/Sound.Newsletters.      Posting sounds --------------  ? The newsgroup alt.binaries.sounds.misc is dedicated to postingsaB containing sound.  (Discussions related to such postings belong in alt.binaries.sounds.d.)f  D There is no set standard for posting sounds; uuencoded files in mostC popular formats are welcome, if split in parts under 50 kBytes.  TosE accomodate automatic decoding software (such as the ":decode" commandy@ of the nn newsreader), please place a part indicator of the formA (mm/nn) at the end of your subject meaning this is number mm of a- total of nn part.   D It is recommended to post sounds in the format that was used for the; original recording; conversions to other formats often losepE information and would do people with identical hardware as the poster D no favor.  For instance, convering 8-bit linear sound to U-LAW losesD the lower few bits of the data, and rate changing conversions almostE always add noise.  Converting from U-LAW to linear requires expansiona4 to 16 bit samples if no information loss is allowed!  1 U-LAW data is best posted with a NeXT/Sun header.n  @ If you have to post a file in a headerless format (usually 8-bitB linear, like ".snd"), please add a description giving at least theF sampling rate and whether the bytes are signed (zero at 0) or unsignedB (zero at 0200).  However, it is highly recommended to add a headerF that indicates the sampling rate and encoding scheme; if necessary you7 can use SOX to add a header of your choice to raw data.t  ? Compression of sound files usually isn't worth it; the standardsA "compress" algorithm doesn't save much when applied to sound data = (typically at most 10-20 percent), and compression algorithmsl9 specifically designed for sound (e.g. NeXT's) are usually C proprietary.  (See also the section "Compression schemes" earlier.)h    
 Appendices
 ==========  E Here are some more detailed pieces of info that I received by e-mail.o8 They are reproduced here virtually without much editing.  H ------------------------------------------------------------------------! FTP access for non-internet sitesc! ---------------------------------    From the sci.space FAQ:o  D     Sites not connected to the Internet cannot use FTP directly, butB     there are a few automated FTP servers which operate via email.E     Send mail containing only the word HELP to ftpmail@decwrl.dec.com2?     or bitftp@pucc.princeton.edu, and the servers will send youo(     instructions on how to make requests   Also:'  E     FAQ lists are available by anonymous FTP from pit-manager.mit.edu H     (18.72.1.58) and by email from mail-server@pit-manager.mit.edu (sendH     a message containing "help" for instructions about the mail server).    H ------------------------------------------------------------------------  AIFF Format (Audio IFF) and AIFC  --------------------------------  C This format was developed by Apple for storing high-quality sampledbE sound and musical instrument info; it is also used by SGI and several D professional audio packages (sorry, I know no names).  An extension,F called AIFC or AIFF-C, supports compression (see the last item below).  C I've made a BinHex'ed MacWrite version of the AIFF spec (no idea iflF it's the same text as mentioned below) available by anonymous ftp fromC ftp.cwi.nl [192.16.184.180]; the file is /pub/AudioIFF1.2.hqx.  But 7 you may be better off with the AIFF-C specs, see below.n  - Mike Brindley (brindley@ece.orst.edu) writes:   B "The complete AIFF spec by Steve Milne, Matt Deatherage (Apple) isG available in 'AMIGA ROM Kernal Reference Manual: Devices (3rd Edition)'-> 1991 by Commodore-Amiga, Inc.; Addison-Wesley Publishing Co.; E ISBN 0-201-56775-X, starting on page 435 (this edition has a charcoalbB grey cover).  It is available in most bookstores, and soon in many good librairies."   . Finally, Mark Callow writes (in comp.sys.sgi):  B "I have placed a PostScript version of the AIFF-C specification onE sgi.sgi.com for public ftp.  It is in the file sgi/aiff-c.9.26.91.ps.h  > sgi.sgi.com's internet host number is (I think) 192.48.153.1."  H ------------------------------------------------------------------------ The NeXT/Sun audio file format ------------------------------  ; Here's the complete story on the file format, from the NeXT=C documentation.  (Note that the "magic" number is ((int)0x2e736e64),-D which equals ".snd".)  Also, at the end, I've added a litte documentD that someone posted to the net a couple of years ago, that describes6 the format in a bit-by-bit fashion rather than from C.  C I received this from Doug Keislar, NeXT Computer.  This is also thedF Sun format, except that Sun doesn't recognize as many format codes.  I> added the numeric codes to the table of formats and sorted it.    5 SNDSoundStruct:  How a NeXT Computer Represents Sound   A The NeXT sound software defines the SNDSoundStruct structure to  aC represent sound.  This structure defines the soundfile and Mach-O  eF sound segment formats and the sound pasteboard type.  It's also used  F to describe sounds in Interface Builder.  In addition, each instance  B of the Sound Kit's Sound class encapsulates a SNDSoundStruct and  5 provides methods to access and modify its attributes.   G Basic sound operations, such as playing, recording, and cut-and-paste  yG editing, are most easily performed by a Sound object.  In many cases,  dC the Sound Kit obviates the need for in-depth understanding of the  fB SNDSoundStruct architecture.  For example, if you simply want to  G incorporate sound effects into an application, or to provide a simple  aE graphic sound editor (such as the one in the Mail application), you  rE needn't be aware of the details of the SNDSoundStruct.  However, if  aD you want to closely examine or manipulate sound data you should be   familiar with this structure.r  F The SNDSoundStruct contains a header, information that describes the  D attributes of a sound, followed by the data (usually samples) that  5 represents the sound.  The structure is defined (in    sound/soundstruct.h) as:   typedef struct {9     int magic;               /* magic number SND_MAGIC */ @     int dataLocation;        /* offset or pointer to the data */:     int dataSize;            /* number of bytes of data */7     int dataFormat;          /* the data format code */o4     int samplingRate;        /* the sampling rate */9     int channelCount;        /* the number of channels */ <     char info[4];            /* optional text information */ } SNDSoundStruct;m         SNDSoundStruct Fieldst       magic   D magic is a magic number that's used to identify the structure as a  C SNDSoundStruct.  Keep in mind that the structure also defines the   D soundfile and Mach-O sound segment formats, so the magic number is  ; also used to identify these entities as containing a sound.s           dataLocation  B It was mentioned above that the SNDSoundStruct contains a header  F followed by sound data.  In reality, the structure only contains the  E header; the data itself is external to, although usually contiguous  fG with, the structure.  (Nonetheless, it's often useful to speak of the   F SNDSoundStruct as the header and the data.)  dataLocation is used to  F point to the data.  Usually, this value is an offset (in bytes) from  G the beginning of the SNDSoundStruct to the first byte of sound data.   z? The data, in this case, immediately follows the structure, so  nD dataLocation can also be thought of as the size of the structure's  D header.  The other use of dataLocation, as an address that locates  @ data that isn't contiguous with the structure, is described in   "Format Codes," below.          4 dataSize, dataFormat, samplingRate, and channelCount  % These fields describe the sound data.n  > dataSize is its size in bytes (not including the size of the   SNDSoundStruct).  F dataFormat is a code that identifies the type of sound.  For sampled  F sounds, this is the quantization format.  However, the data can also  E be instructions for synthesizing a sound on the DSP.  The codes are   . listed and explained in "Format Codes," below.  D samplingRate is the sampling rate (if the data is samples).  Three  D sampling rates, represented as integer constants, are supported by  
 the hardware:a  , Constant        Sampling Rate (samples/sec)   - SND_RATE_CODEC  8012.821        (CODEC input) 2 SND_RATE_LOW    22050.0 (low sampling rate output)3 SND_RATE_HIGH   44100.0 (high sampling rate output)i  8 channelCount is the number of channels of sampled sound.           info  C info is a NULL-terminated string that you can supply to provide a  tF textual description of the sound.  The size of the info field is set  G when the structure is created and thereafter can't be enlarged.  It's  s/ at least four bytes long (even if it's unused).c           Format Codes  E A sound's format is represented as a positive 32-bit integer.  NeXT  hE reserves the integers 0 through 255; you can define your own format   A and represent it with an integer greater than 255.  Most of the  g@ formats defined by NeXT describe the amplitude quantization of   sampled sound data:a   Value   Code    Format f  3 0       SND_FORMAT_UNSPECIFIED  unspecified format p4 1       SND_FORMAT_MULAW_8      8-bit mu-law samples4 2       SND_FORMAT_LINEAR_8     8-bit linear samples5 3       SND_FORMAT_LINEAR_16    16-bit linear samplest5 4       SND_FORMAT_LINEAR_24    24-bit linear sampleso5 5       SND_FORMAT_LINEAR_32    32-bit linear samplesh6 6       SND_FORMAT_FLOAT        floating-point samples> 7       SND_FORMAT_DOUBLE       double-precision float samples7 8       SND_FORMAT_INDIRECT     fragmented sampled dataf! 9       SND_FORMAT_NESTED       ?;+ 10      SND_FORMAT_DSP_CORE     DSP programs9 11      SND_FORMAT_DSP_DATA_8   8-bit fixed-point samples-: 12      SND_FORMAT_DSP_DATA_16  16-bit fixed-point samples: 13      SND_FORMAT_DSP_DATA_24  24-bit fixed-point samples: 14      SND_FORMAT_DSP_DATA_32  32-bit fixed-point samples	 15      ?=6 16      SND_FORMAT_DISPLAY      non-audio display data) 17      SND_FORMAT_MULAW_SQUELCH        ?e; 18      SND_FORMAT_EMPHASIZED   16-bit linear with emphasis-> 19      SND_FORMAT_COMPRESSED   16-bit linear with compressionN 20      SND_FORMAT_COMPRESSED_EMPHASIZED        A combination of the two above6 21      SND_FORMAT_DSP_COMMANDS Music Kit DSP commands1 22      SND_FORMAT_DSP_COMMANDS_SAMPLES         ?a    4 Most formats identify different sizes and types of  + sampled data.  Some deserve special note:  .    D --      SND_FORMAT_DSP_CORE format contains data that represents a  G loadable DSP core program.  Sounds in this format are required by the   7 SNDBootDSP() and SNDRunDSP() functions.  You create a   A SND_FORMAT_DSP_CORE sound by reading a DSP load file (extension  d+ ".lod") with the SNDReadDSPfile() function.t  D --      SND_FORMAT_DSP_COMMANDS is used to distinguish sounds that  G contain DSP commands created by the Music Kit.  Sounds in this format  -F can only be created through the Music Kit's Orchestra class, but can  6 be played back through the SNDStartPlaying() function.  > --      SND_FORMAT_DISPLAY format is used by the Sound Kit's  0 SoundView class.  Such sounds can't be played.      < --      SND_FORMAT_INDIRECT indicates data that has become  8 fragmented, as described in a separate section, below.      @ --      SND_FORMAT_UNSPECIFIED is used for unrecognized formats.           Fragmented Sound Data[  @ Sound data is usually stored in a contiguous block of memory.   D However, when sampled sound data is edited (such that a portion of  B the sound is deleted or a portion inserted), the data may become  G discontiguous, or fragmented.  Each fragment of data is given its own  n? SNDSoundStruct header; thus, each fragment becomes a separate  sF SNDSoundStruct structure.  The addresses of these new structures are  F collected into a contiguous, NULL-terminated block; the dataLocation  D field of the original SNDSoundStruct is set to the address of this  D block, while the original format, sampling rate, and channel count  * are copied into the new SNDSoundStructs.      F Fragmentation serves one purpose:  It avoids the high cost of moving  C data when the sound is edited.  Playback of a fragmented sound is  -D transparent-you never need to know whether the sound is fragmented  E before playing it.  However, playback of a heavily fragmented sound  n9 is less efficient than that of a contiguous sound.  The  tB SNDCompactSamples() C function can be used to compact fragmented   sound data.n  G Sampled sound data is naturally unfragmented.  A sound that's freshly  yD recorded or retrieved from a soundfile, the Mach-O segment, or the  F pasteboard won't be fragmented.  Keep in mind that only sampled data   can become fragmented.       _________________________ G >From mentor.cc.purdue.edu!purdue!decwrl!ucbvax!ziploc!eps Wed Apr  4    23:56:23 EST 1990  Article 5779 of comp.sys.next:: Path: mentor.cc.purdue.edu!purdue!decwrl!ucbvax!ziploc!eps+ >From: eps@toaster.SFSU.EDU (Eric P. Scott)o Newsgroups: comp.sys.nexts, Subject: Re: Format of NeXT sndfile headers?" Message-ID: <445@toaster.SFSU.EDU> Date: 31 Mar 90 21:36:17 GMT) References: <14978@phoenix.Princeton.EDU>,) Reply-To: eps@cs.SFSU.EDU (Eric P. Scott)c, Organization: San Francisco State University	 Lines: 42s  ( In article <14978@phoenix.Princeton.EDU>=         bskendig@phoenix.Princeton.EDU (Brian Kendig) writes:aB >I'd like to take a program I have that converts Macintosh sound   filessE >to NeXT sndfiles and polish it up a bit to go the other direction as  >well.  7 Two people have already submitted programs that do thiso5 (Christopher Lane and Robert Hood); check the variouso NeXT archive sites.   A >       Could someone please give me the format of a NeXT sndfiler >header?   "big-endian"!         0       1       2       3e)         +-------+-------+-------+-------+m> 0       | 0x2e  | 0x73  | 0x6e  | 0x64  |       "magic" number)         +-------+-------+-------+-------+r= 4       |                               |       data locationo)         +-------+-------+-------+-------+e9 8       |                               |       data size/)         +-------+-------+-------+-------+ B 12      |                               |       data format (enum))         +-------+-------+-------+-------+eC 16      |                               |       sampling rate (int) )         +-------+-------+-------+-------+r= 20      |                               |       channel count )         +-------+-------+-------+-------+bA 24      |       |       |       |       |       (optional) info  n string  $ 28 = minimum value for data location  C data format values can be found in /usr/include/sound/soundstruct.ho   Most common combinations:   "          sampling  channel    data0              rate    count  format              2 voice file   8012        1       1 =  8-bit mu-law2 system beep 22050        2       3 = 16-bit linear2 CD-quality  44100        2       3 = 16-bit linear  H ------------------------------------------------------------------------ IFF/8SVX Formate ---------------o  0 Newsgroups: alt.binaries.sounds.d,alt.sex.sounds0 Subject: Format of the IFF header (Amiga sounds)$ Message-ID: <2509@tardis.Tymnet.COM>' From: jms@tardis.Tymnet.COM (Joe Smith)  Date: 23 Oct 91 23:54:38 GMT" Followup-To: alt.binaries.sounds.d' Organization: BT North America (Tymnet)b  J The first 12 bytes of an IFF file are used to distinguish between an AmigaE picture (FORM-ILBM), an Amiga sound sample (FORM-8SVX), or other file H conforming to the IFF specification.  The middle 4 bytes is the count ofK bytes that follow the "FORM" and byte count longwords.  (Numbers are storeda' in M68000 form, high order byte first.)   :                 ------------------------------------------  M FutureSound audio file, 15000 samples at 10.000KHz, file is 15048 bytes long.n  = 0000: 464F524D 00003AC0 38535658 56484452    FORM..:.8SVXVHDR (       F O R M     15040 8 S V X  V H D R= 0010: 00000014 00003A98 00000000 00000000    ......:.........s)             20    15000        0        0d= 0020: 27100100 00010000 424F4459 00003A98    '.......BODY..:. )      10000 1 0    1.0   B O D Y     15000d  < 0000000..03 = "FORM", identifies this as an IFF format file.H FORM+00..03 (ULONG) = number of bytes that follow.  (Unsigned long int.)@ FORM+03..07 = "8SVX", identifies this as an 8-bit sampled voice.  J ????+00..03 = "VHDR", Voice8Header, describes the parameters for the BODY.1 VHDR+00..03 (ULONG) = number of bytes to follow. )= VHDR+04..07 (ULONG) = samples in the high octave 1-shot part.e= VHDR+08..0B (ULONG) = samples in the high octave repeat part.nN VHDR+0C..0F (ULONG) = samples per cycle in high octave (if repeating), else 0.F VHDR+10..11 (UWORD) = samples per second.  (Unsigned 16-bit quantity.)? VHDR+12     (UBYTE) = number of octaves of waveforms in sample. L VHDR+13     (UBYTE) = data compression (0=none, 1=Fibonacci-delta encoding).K VHDR+14..17 (FIXED) = volume.  (The number 65536 means 1.0 or full volume.)e  = ????+00..03 = "BODY", identifies the start of the audio data. 0 BODY+00..03 (ULONG) = number of bytes to follow.< BODY+04..NNNNN      = Data, signed bytes, from -128 to +127.  ) 0030: 04030201 02030303 04050605 05060605 ) 0040: 06080806 07060505 04020202 01FF0000O) 0050: 00000000 FF00FFFF FFFEFDFD FDFEFFFF ) 0060: FDFDFF00 00FFFFFF 00000000 00FFFF00m) 0070: 00000000 00FF0000 00FFFEFF 00000000 ) 0080: 00010000 000101FF FF0000FE FEFFFFFE6) 0090: FDFDFEFD FDFFFFFC FDFEFDFD FEFFFEFEM) 00A0: FFFEFEFE FEFEFEFF FFFFFEFF 00FFFF01   N This small section of the audio sample shows the number ranging from -5 (0xFD)L to +8 (0x08).  Warning: Do not assume that the BODY starts 48 bytes into theH file.  In addition to "VHDR", chunks labeled "NAME", "AUTH", "ANNO", or K "(c) " may be present, and may be in any order.  You will have to check the = byte count in each chunk to determine how many bytes to skip.   H ------------------------------------------------------------------------ Playing sound on a PCd ---------------------    From: Eric A Rasmussen  N Any turbo PC (8088 at 8 Mhz or greater)/286/386/486/etc. can produce a qualityJ playback of single channel 8 bit sounds on the internal (1 bit, 1 channel)M speaker by utilizing Pulse-Width-Modulation, which toggles the speaker fastertL than it can physically move to simulate positions between fully on and fullyB off.  There are several PD programs of this nature that I know of:  L REMAC  - Plays MAC format sound files.  Files on the Macintosh, at least theJ          sound files that I've ripped apart, seem to contain 3 parts.  TheH          first two are info like what the file icon looks like and otherL          header type info.  The third part contains the raw sample data, andJ          it is this portion of the file which is saved to a seperate file,M          often named with the .snd extension by PC users.  Personally, I likeSN          to name the files .s1, .s2, .s3, or .s4 to indicate the sampling rateI          of the file. (-s# is how to specify the playback rate in REMAC.)iK          REMAC provides playback rates of 5550hz, 7333hz, 11 khz, & 22 khz.,C REMAC2 - Same as REMAC, but sounds better on higher speed machines. G REPLAY - Basically same as REMAC, but for playback of Atari ST sounds.  N          Apparently, the Atari has two sound formats, one of which sounds likeI          garbage if played by REMAC or REPLAY in the incorrect mode.  TheeN          other file format works fine with REMAC and so appears to be 'normal'J          unsigned 8-bit data.  REPLAY provides playback rates of 11.5 khz,=          12.5 khz, 14 khz, 16 khz, 18.5 khz, 22khz, & 27 khz.t  K These three programs are all by the same author, Richard E. Zobell who doesdN not have an internet mail address to my knowledge, but does have a GEnie email address of R.ZOBELL. u  H Additionally, there are various stand-alone demos which use the internalF speaker, of which there is one called mushroom which plays a 30 secondF advertising jingle for magic mushroom room deoderizers which is prettyM humerous.  I've used this player to playback samples that I ripped out of thetN commercial game program Mean Streets, which uses something they call RealSoundO (tm) to playback digital samples on the internal speaker. (Of course, I only doaL this on my own system, and since I own the game, I see no problems with it.)  N For owners of 8 Mhz 286's and above, the option to play 4 channel 8 bit soundsI (with decent quality) on the internal speaker is also a reality.  Quite a F number of PD programs exist to do this, including, but not limited to:  M ModEdit, ModPlay, ScreamTracker, STM, Star Trekker, Tetra, and probably a fewg more.  A  J All these programs basically make use of various sound formats used by the> Amiga line of computers.  These include .stm files, .mod filesB [a.k.a. mod. files], and .nst files [really the same hing].  Also,? these programs pretty much all have the option to playback the iK sound to add-on hardware such as the SoundBlaster card, the Covox series ofaF devices, and also to direct the data to either one or two (for stereo)L parallel ports, which you could attach your own D/A's to.  (From what I haveN seen, the Covox is basically an small amplified speaker with a D/A which plugsM into the parallel port.  This sounds very similiar to the Disney Sound System.7 (DSS) which people have been talking about recently.)  n  H ------------------------------------------------------------------------ The EA-IFF-85 documentation( ---------------------------l   From: dgc3@midway.uchicago.edu  J As promised, here's an ftp location for the EA-IFF-85 documentation.  It'sL the November 1988 release as revised by Commodore (the last public release),J with specifications for IFF FORMs for graphics, sound, formatted text, andM more.  IFF FORMS now exist for other media, including structured drawing, andX7 new documentation is now available only from Commodore.   E The documentation is at grind.isca.uiowa.edu [128.255.19.233], in theeA directory /amiga/f1/ff185.  The complete file list is as follows:-   DOCUMENTS.zoo    - EXAMPLES.zoo       EXECUTABLE.zoo     INCLUDE.zoo      c LINKER_INFO.zoo  - OBJECT.zoo       - SOURCE.zoo         TP_IFF_Specs.zoo    M All files except DOCUMENTS.zoo are Amiga-specific, but may be used as a basis J for conversion to other platforms.  Well, I take that tentatively back.  IM don't know what TP_IFF_Specs.zoo contains, so it might be non-Amiga-specific.a  H ------------------------------------------------------------------------% US Federal Standard 1016 availabilityn% --------------------------------------  O From: Joe Campbell  N3JBC  jpcampb@afterlife.ncsc.mil  74040.305@compuserve.com   L The U.S. DoD's Federal-Standard-1016 4800 bps code excited linear predictionL voice coder version 3.2 (CELP 3.2) Fortran and C simulation source codes areH now available for worldwide distribution at no charge (on DOS diskettes,6 but configured to compile on Sun SPARC stations) from:   Bob Fenichel National Communications System Washington, D.C.  20305  1-703-692-2124 1-703-746-4960 (fax)  I In addition to the source codes, example input and processed speech filesXE are included along with a technical information bulletin to assist in.K implementation of FS-1016 CELP.  (An anonymous ftp site is being considereda for future releases.)   A Copies of the FS-1016 document are available for $2.50 each from:l   GSA Rm 6654n
 7th & D St SW  Washington, D.C.  20407e 1-202-708-9205  G The following articles describe the Federal-Standard-1016 4.8-kbps CELPa/ coder (it's unnecessary to read more than one):M  > Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch,E "The Federal Standard 1016 4800 bps CELP Voice Coder," Digital Signalo< Processing, Academic Press, 1991, Vol. 1, No. 3, p. 145-155.  > Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch,= "The DoD 4.8 kbps Standard (Proposed Federal Standard 1016),"K< in Advances in Speech Coding, ed. Atal, Cuperman and Gersho,9 Kluwer Academic Publishers, 1991, Chapter 12, p. 121-133.   C Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, "The.C Proposed Federal Standard 1016 4800 bps Voice Coder:  CELP," Speech0. Technology Magazine, April/May 1990, p. 58-64.  9 For U.S. FED-STD-1016 (4800 bps CELP) _realtime_ DSP codeF8 and information about products using this code, contact:   John DellaMorte  DSP Software Engineering 165 Middlesex Tpk, Suite 206 Bedford, MA  01730 1-617-275-3733 1-617-275-4323 (fax) dspse.bedford@channel1.com  J DSP Software Engineering's code can run on a DSP Research's Tiger 30 boardM (a PC board with a TMS320C3x and analog interface suited to development work)e: or on Intellibit's AE2000 TMS320C31 based 3" by 2.5" card.  & DSP Research                Intellibit) 1095 E. Duane Ave.          P.O. Box 9785 2 Sunnyvale, CA  94086        McLean, VA  22102-0785) (408)773-1042               (703)442-4781u/ (408)736-3451 (fax)         (703)442-4784 (fax)   H ------------------------------------------------------------------------  Creative Voice (VOC) file format  --------------------------------   From: galt@dsd.es.com"   (byte numbers are hex!)h       HEADER (bytes 00-19)D     Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]  A - ---------------------------------------------------------------0   HEADER:  =======0      byte #     Description0:      ------     ------------------------------------------%      00-12      "Creative Voice File"0+      13		1A (eof to abort printing of file)0A      14-15      Offset of first datablock in .voc file (std 1A 00F 		in Intel Notation)A      16-17      Version number (minor,major) (VOC-HDR puts 0A 01)s?      18-19      2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)o  A - ---------------------------------------------------------------n   DATA BLOCK:n ===========A  ;    Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)aG    NOTE: Terminator Block is an exception -- it has only the TYPE byte.m  5       TYPE   Description     Size (3-byte int)   Info-H       ----   -----------     -----------------   -----------------------7       00     Terminator      (NONE)              (NONE)b2       01     Sound data      2+length of data    *;       02     Sound continue  length of data      Voice Datan3       03     Silence         3                   **gB       04     Marker          2                   Marker# (2 bytes)G       05     ASCII           length of string    null terminated string.A       06     Repeat          2                   Count# (2 bytes)E7       07     End repeat      0                   (NONE)o  6       *Sound Info Format:       **Silence Info Format:>        ---------------------      ---------------------------->        00   Sample Rate           00-01  Length of silence - 14        01   Compression Type      02     Sample Rate        02+  Voice Data    K   Marker#           -- Driver keeps the most recent marker in a status bytet0   Count#            -- Number of repetitions + 1I                          Count# may be 1 to FFFE for 0 - FFFD repetitionsl8                          or FFFF for endless repetitions:   Sample Rate       -- SR byte = 256-(1000000/sample_rate)1   Length of silence -- in units of sampling cycle2$   Compression Type  -- of voice data&                          8-bits    = 0&                          4-bits    = 1&                          2.6-bits  = 2&                          2-bits    = 3E                          Multi DAC = 3+(# of channels) [interesting--eL                                        this isn't in the developer's manual]  H ------------------------------------------------------------------------ RIFF WAVE (.WAV) file format ----------------------------  D RIFF is a format by Microsoft and IBM which is similar in spirit and; functionality as EA-IFF-85, but not compatible (and it's iniF little-endian byte order, of course :-).  WAVE is RIFF's equivalent ofE AIFF, and its inclusion in Microsoft Windows 3.1 has suddenly made ith important to know about.  E Rob Ryan was kind enough to send me a description of the RIFF format.gE Unfortunately, it is too big to include here (27 k), but I've made it ; available for anonymous ftp as ftp.cwi.nl:/pub/RIFF-format.t  D And here's a pointer to the official description from Matt Saettler, Microsoft Multimedia:a  > "The complete definition of the WAVE file format as defined by? IBM/Microsoft is available for anon. FTP from ftp.uu.net in thee' vendor/microsoft/multimedia directory."   D (Rob Ryan's version may actually be an extract from one of the files stored there.)  H ------------------------------------------------------------------------