home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / Documents / FAQ / Audio-fmts-faq / part1 < prev    next >
Encoding:
Internet Message Format  |  1993-07-20  |  43.2 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!howland.reston.ans.net!usc!cs.utexas.edu!uunet!mcsun!sun4nl!cwi.nl!guido
  2. From: guido@cwi.nl (Guido van Rossum)
  3. Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,news.answers,comp.answers
  4. Subject: FAQ: Audio File Formats (part 1 of 2)
  5. Message-ID: <audio-part1_743091234@charon.cwi.nl>
  6. Date: 19 Jul 93 14:14:05 GMT
  7. Expires: 16 Aug 93 14:13:54 GMT
  8. Sender: news@cwi.nl
  9. Reply-To: guido@cwi.nl
  10. Followup-To: alt.binaries.sounds.d,comp.dsp
  11. Lines: 996
  12. Approved: news-answers-request@MIT.Edu
  13. Supersedes: <audio-part1_740136129@charon.cwi.nl>
  14. Xref: senator-bedfellow.mit.edu alt.binaries.sounds.misc:8708 alt.binaries.sounds.d:3427 comp.dsp:6705 news.answers:10509 comp.answers:1340
  15.  
  16. Archive-name: audio-fmts/part1
  17. Submitted-by: Guido van Rossum <guido@cwi.nl>
  18. Version: 3.04
  19. Last-modified: 19-Jul-1993
  20.  
  21. FAQ: Audio File Formats
  22. =======================
  23.  
  24. Table of contents
  25. -----------------
  26.  
  27. Introduction
  28. Device characteristics
  29. Popular sampling rates
  30. Compression schemes
  31. Current hardware
  32. File formats
  33. File conversions
  34. Playing audio files on UNIX
  35. Playing audio files on micros
  36. The Sound Site Newsletter
  37. Posting sounds
  38.  
  39. Appendices (in part 2):
  40.  
  41. FTP access for non-internet sites
  42. AIFF Format (Audio IFF)
  43. The NeXT/Sun audio file format
  44. IFF/8SVX Format
  45. Playing sound on a PC
  46. The EA-IFF-85 documentation
  47. US Federal Standard 1016 availability
  48. Creative Voice (VOC) file format
  49. RIFF WAVE (.WAV) file format
  50. U-LAW and A-LAW definitions
  51. AVR File Format
  52. The Amiga MOD Format
  53.   
  54.  
  55. Introduction
  56. ------------
  57.  
  58. This is version 3 of this FAQ, which I started in November 1991 under
  59. the name "The audio formats guide".  I bumped the major version number
  60. again at the occasion of the split in two parts: part one is the main
  61. text and part two consists of the collection of appendices.
  62.  
  63. I am posting this about once a fortnight, either unchanged (just to
  64. inform new readers), or updated (if I learn more or when new hardware
  65. or software becomes popular).  I post to alt.binaries.sounds.{misc,d}
  66. and to comp.dsp, for maximal coverage of people interested in audio,
  67. and to {news,comp}.answers, for easy reference.
  68.  
  69. The entire FAQ is also available by anonymous ftp from ftp.cwi.nl
  70. [192.16.184.180], directory pub/audio, files AudioFormats.{part1,part2}.
  71.  
  72. BTW: All FAQs, including this one, are available for anonymous ftp on
  73. the archive site rtfm.mit.edu in directory /pub/usenet/news.answers/.
  74. The name under which a FAQ is archived appears in the "Archive-Name:"
  75. line at the top of the article.  This FAQ is archived as
  76. audio-fmts/part1.
  77.  
  78. A companion posting with subject "Changes to: ..." is occasionally
  79. posted listing the diffs between a new version and the last.  This is
  80. not reposted, and it is suppressed when the diffs are bigger than the
  81. new version.
  82.  
  83. This FAQ is also available in distributed hypertext form.  If you have
  84. a WWW browser and direct Internet access you can point it to
  85. "http://voorn.cwi.nl/audio-formats/a00.html".  (WWW is the CERN
  86. World-Wide Web initiative; for more info, telnet or ftp to
  87. info.cern.ch.)  You can also ftp the files from ftp.cwi.nl, directory
  88. /pub/www/audio-formats/.  (Due to lack of time for maintenance, the
  89. WWW version is currently out of date.  Sorry.)
  90.  
  91. Send updates, comments and questions to <guido@cwi.nl>.  I'd like to
  92. thank everyone who sent updates in the past.
  93.  
  94. --Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
  95.  
  96.  
  97. Device characteristics
  98. ----------------------
  99.  
  100. In this text, I will only use the term "sample" to refer to a single
  101. output value from an A/D converter, i.e., a small integer number
  102. (usually 8 or 16 bits).
  103.  
  104. Audio data is characterized by the following parameters, which
  105. correspond to settings of the A/D converter when the data was
  106. recorded.  Naturally, the same settings must be used to play the data.
  107.  
  108. - sampling rate (in samples per second), e.g. 8000 or 44100
  109.  
  110. - number of bits per sample, e.g. 8 or 16
  111.  
  112. - number of channels (1 for mono, 2 for stereo, etc.)
  113.  
  114. Approximate sampling rates are often quoted in Hz or kHz ([kilo-]
  115. Hertz), however, the politically correct term is samples per second
  116. (samples/sec).  Sampling rates are always measured per channel, so for
  117. stereo data recorded at 8000 samples/sec, there are actually 16000
  118. samples in a second.  I will sometimes write 8 k as a shorthand for
  119. 8000 samples/sec.
  120.  
  121. Multi-channel samples are generally interleaved on a frame-by-frame
  122. basis: if there are N channels, the data is a sequence of frames,
  123. where each frame contains N samples, one from each channel.  (Thus,
  124. the sampling rate is really the number of *frames* per second.)  For
  125. stereo, the left channel usually comes first.
  126.  
  127. The specification of the number of bits for U-LAW (pronounced mu-law
  128. -- the u really stands for the Greek letter mu) samples is somewhat
  129. problematic.  These samples are logarithmically encoded in 8 bits,
  130. like a tiny floating point number; however, their dynamic range is
  131. that of 12 bit linear data.  Source for converting to/from U-LAW
  132. (written by Jef Poskanzer) is distributed as part of the SOX package
  133. mentioned below; it can easily be ripped apart to serve in other
  134. applications.  The official definition is the CCITT standard G.711.
  135.  
  136. There exists another encoding similar to U-LAW, called A-LAW, which
  137. is used as a European telephony standard.  There is less support for
  138. it in UNIX workstations.
  139.  
  140. (See the Appendix for some formulae describing U-LAW and A-LAW.)
  141.  
  142.  
  143. Popular sampling rates
  144. ----------------------
  145.  
  146. Some sampling rates are more popular than others, for various reasons.
  147. Some recording hardware is restricted to (approximations of) some of
  148. these rates, some playback hardware has direct support for some.  The
  149. popularity of divisors of common rates can be explained by the
  150. simplicity of clock frequency dividing circuits :-).
  151.  
  152. Samples/sec     Description
  153.  
  154. 5500            One fourth of the Mac sampling rate (rarely seen).
  155.  
  156. 7333            One third of the Mac sampling rate (rarely seen).
  157.  
  158. 8000            Exactly 8000 samples/sec is a telephony standard that
  159.                 goes together with U-LAW (and also A-LAW) encoding.
  160.                 Some systems use an slightly different rate; in
  161.                 particular, the NeXT workstation uses 8012.8210513,
  162.                 apparently the rate used by Telco CODECs.
  163.  
  164. 11 k            Either 11025, a quarter of the CD sampling rate,
  165.                 or half the Mac sampling rate (perhaps the most
  166.                 popular rate on the Mac).
  167.  
  168. 16000           Used by, e.g. the G.722 compression standard.
  169.  
  170. 18.9 k          CD-ROM/XA standard.
  171.  
  172. 22 k            Either 22050, half the CD sampling rate, or the Mac
  173.                 rate; the latter is precisely 22254.545454545454 but
  174.                 usually misquoted as 22000.  (Historical note:
  175.                 22254.5454... was the horizontal scan rate of the
  176.                 original 128k Mac.)
  177.  
  178. 32000           Used in digital radio, NICAM (Nearly-Instantaneous
  179.                 Companded Audio Multiplex [IBA/BREMA/BBC]) and other
  180.                 TV work, at least in the UK; also long play DAT and
  181.                 Japanese HDTV.
  182.  
  183. 37.8 k          CD-ROM/XA standard for higher quality.
  184.  
  185. 44056           This weird rate is used by professional audio
  186.                 equipment to fit an integral number of samples in a
  187.                 video frame.
  188.  
  189. 44100           The CD sampling rate.  (DAT players recording
  190.                 digitally from CD also use this rate.)
  191.  
  192. 48000           The DAT (Digital Audio Tape) sampling rate for
  193.                 domestic use.
  194.  
  195. Files samples on SoundBlaster hardware have sampling rates that are
  196. divisors of 1000000.
  197.  
  198. While professinal musicians disagree, most people don't have a problem
  199. if recorded sound is played at a slightly different rate, say, 1-2%.
  200. On the other hand, if recorded data is being fed into a playback
  201. device in real time (say, over a network), even the smallest
  202. difference in sampling rate can frustrate the buffering scheme used...
  203.  
  204. There may be an emerging tendency to standardize on only a few
  205. sampling rates and encoding styles, even if the file formats may
  206. differ.  The suggested rates and styles are:
  207.  
  208.     rate (samp/sec) style mono/stereo
  209.  
  210.     8000 8-bit U-LAW mono
  211.     22050 8-bit linear unsigned mono and stereo
  212.     44100 16-bit linear signed mono and stereo
  213.  
  214.  
  215. Compression schemes
  216. -------------------
  217.  
  218. Strange though it seems, audio data is remarkably hard to compress
  219. effectively.  For 8-bit data, a Huffman encoding of the deltas between
  220. successive samples is relatively successful.  For 16-bit data,
  221. companies like Sony and Philips have spent millions to develop
  222. proprietary schemes.  Information about PASC (Philips' scheme) can be
  223. found in Advanced Digital Audio by Ken C. Pohlmann.
  224.  
  225. Public standards for voice compression are slowly gaining popularity,
  226. e.g. CCITT G.721 (ADPCM at 32 kbits/sec) and G.723 (ADPCM at 24 and 40
  227. kbits/sec).  (ADPCM == Adaptive Delta Pulse Code Modulation.)  Sun
  228. Microsoft has placed the source code of a portable implementation of
  229. these algorithms (as well as G.711, which defines A-LAW and U-LAW) in
  230. the public domain (needless to say, their proprietary implementation
  231. distributed in binary form with Solaris is better :-).  One place to
  232. ftp this source code from is ftp.cwi.nl:/pub/audio/ccitt-adpcm.tar.Z.
  233. Source for another 32 kbits/sec ADPCM implementation, assumed to be
  234. compatible with Intel's DVI audio format, can be ftp'ed from
  235. ftp.cwi.nl:/pub/audio/adpcm.shar.  (** NOTE: if you are using v1.0,
  236. you should get v1.1, released 17-Dec-1992, which fixes a serious bug
  237. -- the quality of v1.1 is claimed to be better than U-LAW **)
  238.  
  239. GSM 06.10 is a speech encoding in use in Europe that compresses 160
  240. 13-bit samples into 260 bits (or 33 bytes), i.e. 1650 bytes/sec (at
  241. 8000 samples/sec).  A free implementation can be ftp'ed from
  242. tub.cs.tu-berlin.de, file /pub/tubmik/gsm-1.0.tar.Z.
  243.  
  244. There are also two US federal standards, 1016 (Code excited linear
  245. prediction (CELP), 4800 bits/s) and 1015 (LPC-10E, 2400 bits/s).  See
  246. also the appendix for 1016.
  247.  
  248. Tony Robinson <ajr@eng.cam.ac.uk> has written a good FAST loss-less
  249. compression for lots of different audio formats (particularly good for
  250. WAV and MOD files).  The software is available by anonymous ftp from
  251. svr-ftp.eng.cam.ac.uk [129.169.24.20], directory misc, file
  252. shorten-1.08.tar.Z.
  253.  
  254. (Note that U-LAW and silence detection can also be considered
  255. compression schemes.)
  256.  
  257. Here's a note about audio codings by Van Jacobson <van@ee.lbl.gov>:
  258. Several people used the words "LPC" and "CELP" interchangably.  They
  259. are very different.  An LPC (Linear Predictive Coding) coder fits
  260. speech to a simple, analytic model of the vocal tract, then throws
  261. away the speech & ships the parameters of the best-fit model.  An LPC
  262. decoder uses those parameters to generate synthetic speech that is
  263. usually more-or-less similar to the original.  The result is
  264. intelligible but sounds like a machine is talking.  A CELP (Code
  265. Excited Linear Predictor) coder does the same LPC modeling but then
  266. computes the errors between the original speech & the synthetic model
  267. and transmits both model parameters and a very compressed
  268. representation of the errors (the compressed representation is an
  269. index into a 'code book' shared between coders & decoders -- this is
  270. why it's called "Code Excited").  A CELP coder does much more work
  271. than an LPC coder (usually about an order of magnitude more) but the
  272. result is much higher quality speech: The FIPS-1016 CELP we're working
  273. on is essentially the same quality as the 32Kb/s ADPCM coder but uses
  274. only 4.8Kb/s (the same as the LPC coder).
  275.  
  276. The comp.compression FAQ has some text on the 6:1 audio compression
  277. scheme used by MPEG (a video compression standard-to-be).  It's
  278. interesting to note that video compression reaches much higher ratios
  279. (like 26:1).  This FAQ is ftp'able from rtfm.mit.edu [18.72.1.58] in
  280. directory /pub/usenet/news.answers/compression-faq, files part1 and
  281. part2.
  282.  
  283. Comp.compression also carries a regular posting "How to uncompress
  284. anything" by David Lemson <lemson@uiuc.edu>, which (tersely) hints on
  285. which program you need to uncompress a file whose name ends in .<foo>
  286. for almost any conceivable <foo>.  Ftp'able from ftp.cso.uiuc.edu
  287. (128.174.5.59) in the directory /doc/pcnet as the file compression.
  288.  
  289. Documentation on a digital cellular telephone system by Qualcomm Inc.
  290. can be ftp'ed from ftp.qualcomm.com:/pub/cdma; the vocoder is in
  291. appendix A.
  292.  
  293. Apple has an Audio Compression/Expansion scheme called ACE (on the GS)
  294. / MACE (on the Macintosh).  It's a lossy scheme that attempts to
  295. predict where the wave will go on the next sample. There's very little
  296. quality change on 8:4 compression, somewhat more for 8:3.  It does
  297. guarantee exactly 50% or 62.5% compression, though.  I believe MACE
  298. uses larger ratios/more loss, but I'm unsure of the specific numbers.
  299. (Marc Sira)
  300.  
  301.  
  302. Current hardware
  303. ----------------
  304.  
  305. I am aware of the following computer systems that can play back and
  306. (sometimes) record audio data, with their characteristics.  Note that
  307. for most systems you can also buy "professional" sampling hardware,
  308. which supports much better quality, e.g. >= 44.1 k 16 bits stereo.
  309. The characteristics listed here are a rough estimate of the
  310. capabilities of the basic hardware only (and even here I am on thin
  311. ice, with systems becoming ever more powerful).
  312.  
  313. machine             bits            max sampling rate    #output channels
  314.  
  315. Mac (all types)     8               22k                  1
  316. Mac (newer ones)   16               64k                  4(128)
  317. Apple IIgs          8               32k / >70k           16(st)
  318. PC/Soundblaster v1  8               13k / 22k            1
  319. PC/Soundblaster v2  8               15k / 44.1k          1
  320. PC/PAS-16           16              44.1k                ?(st)
  321. Atari ST            8               22k                  1
  322. Atari STe,TT        8               50k                  2
  323. Atari Falcon 030    16              50k                  8(st)
  324. Amiga               8               varies above 29k     4(st)
  325. Sun Sparc           U-LAW           8k                   1
  326. Sun Sparcst. 10     U-LAW,8,16      48k                  1(st)
  327. NeXT                U-LAW,8,16      44.1k                1(st)
  328. SGI Indigo          8,16            48k                  4(st)
  329. SGI Indigo2         8,16            48k                  16(st,4-channel)
  330. Acorn Archimedes    ~U-LAW          ~180k                8(st)
  331. Sony NWS-3xxx       U,A,8,16        8-37.8k              1(st)
  332. Sony NWS-5xxx       U,A,8,16        8-48k                1(st)
  333. VAXstation 4000     U-LAW           8k                   1
  334. DEC 3000/300-500    U-LAW           8k                   1
  335. DEC 5000/20-25      U-LAW           8k                   1
  336. Tandy 1000/*L*      8               22k                  3
  337. Tandy 2500          8               22k                  3
  338. HP9000/705,710,425e U,A-LAW,16      8k                   1
  339. HP9000/715,725,735  U,A-LAW,16      48k                  1(st)
  340. HP9000/755 option:  U,A-LAW,16      48k                  1(st)
  341.  
  342. 4(st) means "four voices, stereo"; sampling rates xx/yy are
  343. different recording/playback rates; *L* is any type with 'L' in it.
  344.  
  345. All these machines can play back sound without additional hardware,
  346. although the needed software is not always standard; also, some
  347. machines need external hardware to record sound (or to record at
  348. higher quality, like the NeXT, whose built-in sampling hardware only
  349. does 8000 samples/sec in U-LAW).  Please don't send me details on
  350. optional or 3rd party hardware, there is too much and it is really
  351. beyond the scope of this FAQ.  In particular, there is a separate
  352. newsgroup devoted to PC sound cards: comp.sys.ibm.pc.soundcard, which
  353. includes FAQ of its own.
  354.  
  355. The new VAXstation 4000 (VLC and model 60) series lets you PLAY audio
  356. (.au) files, and the package DECsound will let you do the recording.
  357. In fact, DECsound is given away free with Motif 1.1 and supports the
  358. VAXstation, Sun SPARCstation, DECvoice, and DECaudio devices.  Sun
  359. sound files work without change.  The Alpha systems (DEC 3000 Model
  360. 300, 400, 500) also have DECsound bundled with Motif.
  361.  
  362. Notes for the DECstation 5000/20-25: You need either XMedia tools from
  363. DEC ($$$$), or the AudioFile package (which works nicely) from
  364. crl.dec.com (see below). The audio device is "/dev/bba", you cannot
  365. send ".au" files directly to the device, the Xmedia/AF software
  366. provide an "audioserver" which must be run to play/record sounds.
  367.  
  368. The SGI Personal IRIS 4D/30 and 4D/35 have the same capabilities as
  369. the Indigo. The audio board was optional on the 4D/30.
  370. The Indigo2 features are a superset of the Indigo features.
  371.  
  372. The new Apple Macs have more powerful audio hardware; the latest
  373. models have built-in microphones.
  374.  
  375. Software exists for the PC that can play sound on its 1-bit speaker
  376. using pulse width modulation (see appendix); the Soundblaster board
  377. records at rates up to 13 k and plays back up to 22 k (weird
  378. combination, but that's the way it is).
  379.  
  380. Here's some info about the newest Atari machine, the Falcon030.  This
  381. machine has stereo 16 bit CODECs and a 32 MHz Motorola 56001 that can
  382. handle 8 channels of 16 bit audio, up to 50 khz/channel with
  383. simultaneous playback and record.  The Falcon DMA sound engine is also
  384. compatible with the 8 bit stereo DMA used on the STe and TT. All of
  385. these systems use signed data.
  386.  
  387. On the NeXT, the Motorola 56001 DSP chip is programmable and you can
  388. (in principle) do what you want.  The SGI Indigo uses the same DSP chip but
  389. it can't be programmed by users -- SGI prefers to offer it as a shared
  390. system resource to multiple applications, thus enabling developers to
  391. program audio with their Audio Library and avoid code modifications
  392. for execution on future machines with different audio hardware, i.e. a
  393. different DSP. For example, the Indigo2 does not have a DSP chip.
  394.  
  395. The Amiga also has a 6-bit volume, which can be used to produce
  396. something like a 14-bit output for each voice.  The hardware can also
  397. use one of each voice-pair to modulate the other in FM (period) or AM
  398. (volume, 6-bits).
  399.  
  400. The Acorn Archimedes uses a variation on U-LAW with the bit order
  401. reversed and the sign bit in bit 0.  Being a 'minority' architecture,
  402. Arc owners are quite adept at converting sound/image formats from
  403. other machines, and it is unlikely that you'll ever encounter sound in
  404. one of the Arc's own formats (there are several).
  405.  
  406. CD-I machines form a special category.  The following formats are used:
  407.  
  408.      - PCM 44.1 kHz standard CD format
  409.      - ADPCM - Addaptive Delta PCM
  410.        - Level A 37.8 kHz 8-bit
  411.        - Level B 37.8 kHz 4-bit
  412.        - Level C 18.9 kHz 4-bit
  413.  
  414.  
  415. File formats
  416. ------------
  417.  
  418. Historically, almost every type of machine used its own file format
  419. for audio data, but some file formats are more generally applicable,
  420. and in general it is possible to define conversions between almost any
  421. pair of file formats -- sometimes losing information, however.
  422.  
  423. File formats are a separate issue from device characteristics.  There
  424. are two types of file formats: self-describing formats, where the
  425. device parameters and encoding are made explicit in some form of
  426. header, and "raw" formats, where the device parameters and encoding
  427. are fixed.
  428.  
  429. Self-describing file formats generally define a family of data
  430. encodings, where a header fields indicates the particular encoding
  431. variant used.  Headerless formats define a single encoding and usually
  432. allows no variation in device parameters (except sometimes sampling
  433. rate, which can be a pain to figure out other than by listening to the
  434. sample).
  435.  
  436. The header of self-describing formats contains the parameters of the
  437. sampling device and sometimes other information (e.g. a
  438. human-readable description of the sound, or a copyright notice).  Most
  439. headers begin with a simple "magic word".  (Some formats do not simply
  440. define a header format, but may contain chunks of data intermingled
  441. with chunks of encoding info.)  The data encoding defines how the
  442. actual samples are stored in the file, e.g. signed or unsigned, as
  443. bytes or short integers, in little-endian or big-endian byte order,
  444. etc.  Strictly spoken, channel interleaving is also part of the
  445. encoding, although so far I have seen little variation in this area.
  446.  
  447. Some file formats apply some kind of compression to the data, e.g.
  448. Huffman encoding, or simple silence deletion.
  449.  
  450. Here's an overview of popular file formats.
  451.  
  452.         Self-describing file formats
  453.         ----------------------------
  454.  
  455. extension, name   origin          variable parameters (fixed; comments)
  456.  
  457. .au or .snd       NeXT, Sun       rate, #channels, encoding, info string
  458. .aif(f), AIFF     Apple, SGI      rate, #channels, sample width, lots of info
  459. .aif(f), AIFC     Apple, SGI      same (extension of AIFF with compression)
  460. .iff, IFF/8SVX    Amiga           rate, #channels, instrument info (8 bits)
  461. .voc              Soundblaster    rate (8 bits/1 ch; can use silence deletion)
  462. .wav, WAVE        Microsoft       rate, #channels, sample width, lots of info
  463. .sf               IRCAM           rate, #channels, encoding, info
  464. none, HCOM        Mac             rate (8 bits/1 ch; uses Huffman compression)
  465. none, MIME        Internet        (see below)
  466. .mod or .nst      Amiga           (see below)
  467.  
  468. Note that the filename extension ".snd" is ambiguous: it can be either
  469. the self-describing NeXT format or the headerless Mac/PC format, or
  470. even a headerless Amiga format.
  471.  
  472. I know nothing for sure about the origin of HCOM files, only that
  473. there are a lot of them floating around on our system and probably at
  474. FTP sites over the world.  The filenames usually don't have a ".hcom"
  475. extension, but this is what SOX (see below) uses.  The file format
  476. recognized by SOX includes a MacBinary header, where the file
  477. type field is "FSSD".  The data fork begins with the magic word "HCOM"
  478. and contains Huffman compressed data; after decompression it it is 8
  479. bits unsigned data.
  480.  
  481. IFF/8SVX allows for amplitude contours for sounds (attack/decay/etc).
  482. Compression is optional (and extensible); volume is variable; author,
  483. notes and copyright properties; etc.
  484.  
  485. AIFF, AIFC and WAVE are similar in spirit but allow more freedom in
  486. encoding style (other than 8 bit/sample), amongst others.
  487.  
  488. There are other sound formats in use on Amiga by digitizers and music
  489. programs, such as IFF/SMUS.
  490.  
  491. Appendices describes the NeXT and VOC formats; pointers to more info
  492. about AIFF, AIFC, 8SVX and WAVE (which are too complex to describe
  493. here) are also in appendices.
  494.  
  495. DEC systems (e.g. DECstation 5000) use a variant of the NeXT format
  496. that uses little-endian encoding and has a different magic number
  497. (0x0064732E in little-endian encoding).
  498.  
  499. Standard file formats used in the CD-I world are IFF but on the disc
  500. they're in realtime files.
  501.  
  502. An interesting "interchange format" for audio data is described in the
  503. proposed Internet Standard "MIME", which describes a family of
  504. transport encodings and structuring devices for electronic mail.  This
  505. is an extensible format, and initially standardizes a type of audio
  506. data dubbed "audio/basic", which is 8-bit U-LAW data sampled at 8000
  507. samples/sec.
  508.  
  509. The "IRCAM" sound file system has now been superseded by the so-called
  510. "BICSF" (for Berkeley/IRCAM/CARL Sound File system) software release.
  511. More recently, there has been an effort at Princeton (Prof. Paul
  512. Lansky) and Stanford (Stephen Travis Pope) to standardize several
  513. extensions to BICSF.  A description of BICSF and the
  514. Princeton/Stanford extensions is available by anonymous ftp from
  515. ftp.cwi.nl [192.16.184.180], in directory /pub/audio/BICSF-info.  This
  516. file contains further ftp pointers to software.
  517.  
  518. Finally, a somewhat different but popular format are "MOD" files,
  519. usually with extension ".mod" or ".nst" (they can also have a prefix
  520. of "mod.").  This originated at the Amiga but players now exist for
  521. many platforms.  MOD files are music files containing 2 parts: (1) a
  522. bank of digitized samples; (2) sequencing information describing how
  523. and when to play the samples.  See the appendix "The Amiga MOD Format"
  524. for a description of this file format (and pointers to ftp'able
  525. players and example MOD files).
  526.  
  527.         Headerless file formats
  528.         -----------------------
  529.  
  530. extension       origin          parameters
  531. or name
  532.  
  533. .snd, .fssd     Mac, PC         variable rate, 1 channel, 8 bits unsigned
  534. .ul             US telephony    8 k, 1 channel, 8 bit "U-LAW" encoding
  535. .snd?           Amiga           variable rate, 1 channel, 8 bits signed
  536.  
  537. It is usually easy to distinguish 8-bit signed formats from unsigned
  538. by looking at the beginning of the data with 'od -b <file | head';
  539. since most sounds start with a little bit of silence containing small
  540. amounts of background noise, the signed formats will have an abundance
  541. of bytes with values 0376, 0377, 0, 1, 2, while the unsigned formats
  542. will have 0176, 0177, 0200, 0201, 0202 instead.  (Using "od -c" will
  543. also show any headers that are tacked in front of the file.)
  544.  
  545. The Apple IIgs records raw data in the same format as the Mac, but
  546. uses a 0 byte as a terminator; samples with value 0 are replaced by 1.
  547.  
  548.         Sound formats and the Apple Macintosh
  549.         -------------------------------------
  550.  
  551. (Thanks to Bill Houle, <Bill.Houle@SanDiegoCA.NCR.COM>)
  552.  
  553.                              SOX/DOS   MAC
  554. Sound Format           file ext  type  Mac program: convert to 'snd'
  555. ---------------------- --------  ----  ------------------------------
  556. Mac snd                .snd      sfil  n/a
  557. Amiga IFF/8SVX         .iff            AmigaSndConverter
  558. Amiga SoundTracker     .mod      STrk  ModVoicer
  559. Audio IFF              .aiff     AIFF  SoundExtractor, Sample Editor,
  560. UUTool
  561. DSP Designer                     DSPs  SoundHack
  562. IRCAM                  .sf       IRCM  SoundHack
  563. MacMix                           MSND  SoundHack
  564. RIFF WAVE              .wav            SoundExtractor
  565. SoundBlaster           .voc            SoundExtractor
  566. SoundDesigner/AudioMedia         Sd2f  SoundHack
  567. Sound[Edit|Cap|Wave]   .hcom     FSSD  SoundExtractor, SoundEdit
  568. Wavicle
  569. Sun uLaw/Next .snd     .au/.snd  NxTS  SoundExtractor, SoundHack
  570. au<->snd, UUTool
  571.  
  572.  
  573. File conversions
  574. ----------------
  575.  
  576.         SOX (UNIX, PC, Amiga)
  577.         ---------------------
  578.  
  579. The most versatile tool for converting between various audio formats
  580. is SOX ("Sound Exchange").  It can read and write various types of
  581. audio files, and optionally applies some special effects (e.g. echo,
  582. channel averaging, or rate conversion).
  583.  
  584. SOX recognizes all filename extensions listed above except ".snd",
  585. which would be ambiguous anyway, and ".wav" (but there's a patch, see
  586. below).  Use type ".au" for NeXT ".snd" files.  Mac and PC ".snd"
  587. files are completely described by these parameters:
  588.  
  589.         -t raw -b -u -r 11000
  590.  
  591. (or -r 22000 or -r 7333 or -r 5500; 11000 seems to be the most common
  592. rate).
  593.  
  594. The source for SOX, version 6, platchlevel 8, was posted to
  595. alt.sources, and should be widely archived.  (Patch 9 was posted later
  596. and incporporates some important .wav fixes.)  To save you the trouble
  597. of hunting it down, it can be gotten by anonymous ftp from
  598. wuarchive.wustl.edu, in the directory usenet/alt.sources/articles,
  599. files 7288.Z through 7295.Z.  (These files are compressed news
  600. articles containing shar files, if you hadn't guessed.)  I am sure
  601. many sites have similar archives, I'm just listing one that I know of
  602. and which carries a lot of this kind of stuff.  (Also see the appendix
  603. if you don't have Internet access.)
  604.  
  605. A compressed tar file containing the same version of SOX is available
  606. by anonymous ftp from ftp.cwi.nl [192.16.184.180], in directory
  607. /pub/audio/sox7.tar.Z.  You may be able to locate a nearer version
  608. using archie!
  609.  
  610. Ports of SOX:
  611.  
  612. - The source as posted should compile on any UNIX and PC system.
  613.  
  614. - A PC version is available by ftp from ftp.cwi.nl (see above) as
  615.   pub/audio/sox5dos.zip; also available from the garbo mail server.
  616.  
  617. - The latest Amiga SOX is available via anonymous ftp to
  618.   wuarchive.wustl.edu, files systems/amiga/audio/utils/amisox*.  (See
  619.   below for a non-SOX solution.)
  620.   The final release of r6 will compile as distributed on the Amiga with
  621.   SAS/C version 6.  Binaries (since many Amiga users do not own
  622.   compilers) will continue to be available for FTP.
  623.  
  624. SOX usage hints:
  625.  
  626. - Often, the filename extension of sound files posted on the net is
  627.   wrong.  Don't give up, try a few other possibilities using the
  628.   "-t <type>" option.  Remember that the most common file type is
  629.   unsigned bytes, which can be indicated with "-t ub".  You'll have to
  630.   guess the proper sampling rate, but often it's 11k or 22k.
  631.  
  632. - In particular, with SOX version 4 (or earlier), you have to
  633.   specify "-t 8svx" for files with an .iff extension.
  634.  
  635. - When converting linear samples to U-LAW using the .au type for the
  636.   output file, you must specify "-U" for the output file, otherwise
  637.   you will end up with a file containing a NeXT/Sun header but linear
  638.   samples -- only the NeXT will play such files correctly.  Also, you
  639.   must explicitly specify an output sampling rate with "-r 8000".
  640.   (This may seem fixed for most cases in version 5, but it is still
  641.   occasionally necessary, so I'm keeping this warning in.)
  642.  
  643.         Sun Sparc
  644.         ---------
  645.  
  646. On Sun Sparcs, starting at SunOS 4.1, a program "raw2audio" is
  647. provided by Sun (in /usr/demo/SOUND -- see below) which takes a raw
  648. U-LAW file and turns it into a ".au" file by prefixing it with an
  649. appropriate header.
  650.  
  651.         NeXT
  652.         ----
  653.  
  654. On NeXTs, you can usually rename .au files to .snd and it'll work like
  655. a charm, but some .au files lack header info that the NeXT needs.
  656. This can be fixed by using sndconvert:
  657.  
  658.         sndconvert -c 1 -f 1 -s 8012.8210513 -o nextfile.snd sunfile.au
  659.  
  660.         SGI Indigo and Personal IRIS
  661.         ----------------------------
  662.  
  663. SGI supports "soundfiler" (in /usr/sbin), a program similar in
  664. spirit to SOX but with a GUI.  Soundfiler plays aiff, aifc, NeXT/Sun
  665. and .wav formats.  It can do conversions between any of these formats
  666. and to and from raw formats including mulaw.  It also does sample rate
  667. conversions.
  668.  
  669. Three shell commands are also provided that give the same functionality:
  670. "sfplay", "sfconvert", and "aifcresample" (all in /usr/sbin).
  671.  
  672.         Amiga
  673.         -----
  674.  
  675. Mike Cramer's SoundZAP can do no effects except rate change and it
  676. only does conversions to IFF, but it is generally much faster than
  677. SOX.  (Ftp'able from the same directory as amisox above.)
  678.  
  679. Newer versions of OmniPlay (see below) will also convert to IFF.
  680.  
  681.         Tandy
  682.         -----
  683.  
  684. The Tandy 1000 uses a (proprietary?) compressed format.  There is a PD
  685. Mac to Tandy conversion program called CONVERT.  Leonard Erickson
  686. <leonard@qiclab.scn.rain.com> writes: There is a WAV driver from Tandy
  687. if people ask.  There also appears to be a program that purports to
  688. convert other formats to Tandy, but I haven't tested this one yet.
  689.  
  690.         Apple Macintosh
  691.         ---------------
  692.  
  693. Bill Houle sent the following list:
  694.  
  695. SoundHack, Tom Erbe: can read/write Sound Designer II, Audio IFF,
  696. IRCAM, DSP Designer and NeXT .snd (or Sun .au); 8-bit uLaw, 8-bit
  697. linear, 32-bit floating point and 16-bit linear data encoding.  Can
  698. read (but not write) raw data files.  Implements soundfile
  699. convolution, a phase vocoder, a binaural filter and an amplitude
  700. analysis & gain change module.
  701.  
  702. AmigaSndConverter, Povl H. Pederson: converts Amiga IFF/8SVX to Mac 'snd'.
  703.  
  704. SoundExtractor, Alberto Ricci: extracts 'snd' resources, AIFF, SoundEdit,
  705. VOC, and WAV data from practically anything, converting to 'snd' files.
  706.  
  707. au<->Mac, Victor J. Heinz: converts Sun uLaw files to Mac 'snd' files.
  708.  
  709. UUTool, Bernie Wieser: primarily a uuencode/decode program, but can
  710. also read/write Sun uLaw, AIFF, and 'snd' files.
  711.  
  712. ModVoicer, Kip Walker: converts Amiga MOD voices into SoundEdit files
  713. or 'snd' resources.
  714.  
  715. Most programs mentioned are shareware/freeware available from SUMEX
  716. and the various mirror sites, or check archie for the nearest FTP
  717. site.
  718.  
  719.  
  720. Playing audio files on UNIX
  721. ---------------------------
  722.  
  723. The commands needed to play an audio file depend on the file format
  724. and the available hardware and software.  Most systems can only
  725. directly play sound in their native format; use a conversion program
  726. (see above) to play other formats.
  727.  
  728.         Sun Sparcstation running SunOS 4.x
  729.         ----------------------------------
  730.  
  731. Raw U-LAW files can be played using "cat file >/dev/audio".
  732.  
  733. A whole package for dealing with ".au" files is provided by Sun on an
  734. experimental basis, in /usr/demo/SOUND.  You may have to compile the
  735. programs first.  (If you can't find this directory, either you are not
  736. running SunOS 4.1 yet, or your system administrator hasn't installed
  737. it -- go ask him for it, not me!)  The program "play" in this
  738. directory recognizes all files in Sun/NeXT format, but a SS 1 or 2 can
  739. play only those using U-LAW encoding at 8 k -- the SS 10 hardware
  740. plays other encodings, too.
  741.  
  742. If you ca't find "play", you can also cat a ".au" file to /dev/audio,
  743. if it uses U-LAW; the header will sound like a short burst of noise
  744. but the rest of the data will sound OK (really, the only difference in
  745. this case between raw U-LAW and ".au" files is the header; the U-LAW
  746. data is exactly the same).
  747.  
  748. Finally, OpenWindows 3.0 has a full-fledged audio tool.  You can drop
  749. audio file icons into it, edit them, etc.
  750.  
  751.         Sun Sparcstation running Solaris 2.0
  752.         ------------------------------------
  753.  
  754. Under SVR4 (and hence Solaris 2.0), writing to /dev/audio from the
  755. shell is a bad idea, because the device driver will flush its queue as
  756. soon as the file is closed.  Use "audioplay" instead.  The supported
  757. formats and sampling rates are the same as above.
  758.  
  759.         NeXT
  760.         ----
  761.  
  762. On NeXT machines, the standard "sndplay" program can play all NeXT
  763. format files (this include Sun ".au" files).  It supports at least
  764. U-LAW at 8 k and 16 bits samples at 22 or 44.1 k.  It attempts
  765. on-the-fly conversions for other formats.
  766.  
  767. Sound files are also played if you double-click on them in the file
  768. browser.
  769.  
  770.         SGI Indigo and Personal IRIS
  771.         ----------------------------
  772.  
  773. On SGI Indigo, Indigo2 and the 4D/30 and /35 Personal IRIS workstations,
  774. "WorkSpace" plays audio files in .aiff, .aifc, .au, and .wav formats if
  775. you double click them and the sampling rate is one of 8000, 11025,
  776. 16000, 22050, 32000, 44100, or 48000.  On the Personal IRIS, you need
  777. to have the audio board installed (check the output from hinv) and you
  778. must run IRIX 3.3.2 or 4.0 or higher.  These files can also be played
  779. with "soundfiler" and "sfplay".  ".aiff" and ".aifc" files at the above
  780. sampling rates can also be played with playaifc.  (All in /usr/sbin)
  781.  
  782. There is no simple /dev/audio interface on these SGI machines.  (There
  783. was one on 4D/25 machines, reading and writing signed linear 8-bit
  784. samples at rates of 8, 16 and 32 k.)
  785.  
  786. A program "playulaw" was posted as part of the "radio 2.0" release
  787. that I posted to several source groups; it plays raw U-LAW files on
  788. the Indigo, Indigo2 or Personal IRIS audio hardware.
  789.  
  790.         Sony NEWS
  791.         ---------
  792.  
  793. The Sony RISC-NEWS line (NWS-3250 laptop, NWS-37xx desktop, NWS-38xx
  794. desktop w/ IOP) also has builtin sound capabilities.  You can also buy
  795. external boards for the older NEWS machines or to add extra channels
  796. to the new machines.  In the default mode (8k/8-bit), Sun .au files
  797. are directly supported (you can 'cat' .au files to /dev/sb and have
  798. them play).
  799.  
  800.         Others
  801.         ------
  802.  
  803. Most other UNIX boxes don't have audio hardware and thus can't play
  804. audio data.  This is actually rapidly changing and most new hardware
  805. that hits the market has some form of audio support.  Unfortunately
  806. there is nothing like X11 that provides a portable interface.  Perhaps
  807. DEC CRL's AudioFile system can fill the gap; it is network-transparent
  808. and supports at least Digital RISC systems running Ultrix, Digital
  809. Alpha AXP systems running OSF/1, Sun Microsystems SPARCstations
  810. running SunOS, and SGI Indigos.  The source kit is located at ftp site
  811. crl.dec.com (Internet 192.58.206.2) in /pub/DEC/AF.
  812.  
  813.  
  814. Playing audio files on the Vaxstation 4000 (VMS)
  815. ------------------------------------------------
  816.  
  817. 1) Without DECsound
  818.  
  819. ".au" files can be played by COPYING them to device "SOA0:".  This
  820. device is set up by enabling the driver SODRIVER.  You can use the
  821. following command file:
  822.  
  823. $!---------------- cut here -------------------------------
  824. $! sound_setup.com    enable SOUND driver
  825. $ run sys$system:sysgen
  826. connect soa0 /adapter=0 /csr=%x0e00 /vector=%o304 /driver=sodriver
  827. exit
  828. $ exit
  829. $!----------------- cut here ------------------------------------
  830.  
  831. 2) With DECsound (bundled with motif)
  832.  
  833. Just start DECsound by selecting it from the session manager in the 
  834. applications menu. (Not there use "@vue$library:sound$vue_startup").
  835. Make sure settings; device type (vaxstation 4000) and play settings
  836. (headphone jack) are selected.  To play files from the DCL prompt 
  837. (handy if you want to play sounds on a remote workstation) set a 
  838. symbol up as follows; 
  839. PLAY == "$DECSOUND -VOLUME 50 -PLAY"
  840. usage;
  841. DCL> play sound.au
  842.  
  843. 3) Audio port
  844.  
  845. The external audio port comes with a telephone-jack-like port.   For
  846. starters, you can plug a telephone RECEIVER right into this port to
  847. hear your first sound files.   After that, you can use the adapter
  848. (that came with the VaxStation), and plug in a small set of stereo
  849. speakers or headphones (the kind you'd plug into a WALKMAN, for 
  850. example), for more volume.  The adapter also has a microphone plug so
  851. that you can record sounds if DECsound is installed.
  852.  
  853.  
  854. Playing audio files on micros
  855. -----------------------------
  856.  
  857. Most micros have at least a speaker built in, so theoretically all you
  858. need is the right software.  Unfortunately most systems don't come
  859. bundled with sound-playing software, so there are many public domain
  860. or shareware software packages, each with their own bugs and features.
  861. Most separate sound recording hardware also comes with playing
  862. software, most of which can play sound (in the file format used by
  863. that hardware) even on machines that don't have that hardware
  864. installed.
  865.  
  866.         PC or compatible
  867.         ----------------
  868.  
  869. Chris S. Craig announces the following software for PCs:
  870.  
  871. ScopeTrax       This is a complete PC sound player/editor package.  Sounds
  872.                 can be played back at ANY rate between 1kHz to 65kHz through
  873.                 the PC speaker or the Sound Blaster.  It supports several
  874.                 file formats including VOC, IFF/8SVX, raw signed and raw
  875.                 unsigned.  A separate executable is provided to convert
  876.                 .au and mu-law to raw format.  ScopeTrax requires EGA/VGA
  877.                 graphics for editing and displaying sounds on a REALTIME
  878.                 oscilloscope.  The package also includes:
  879.                       * An expanded memory player which can play sounds
  880.                         larger than 640K in size.
  881.                       * Basic (rough) sound compression/uncompression
  882.                         utilities.
  883.                       * Complete documentation.
  884.                 The package is FREEWARE!  It is available on SIMTEL in the
  885.                 PD1:[MSDOS.SOUND] directory.
  886.  
  887. One of the appendices below contains a list of more programs to play
  888. sound on the PC.
  889.  
  890.         Atari
  891.         -----
  892.  
  893. For sounds on Atari STs - programs are in the atari/sound/players
  894. directory on atari.archive.umich.edu (141.211.164.8).
  895.  
  896.         Tandy
  897.         -----
  898.  
  899. On a Tandy 1000, sounds can be played and recorded with DeskMate Sound
  900. (SOUND.PDM), or if they not stored in compressed format, they can also
  901. be played be a program called PLAYSND.  No indication of whether
  902. PLAYSND is PD or not. It hasn't been updated since March of 89.
  903.  
  904.         Amiga
  905.         -----
  906.  
  907. On the Amiga, OmniPlay by David Champion <dgc3@midway.uchicago.edu>
  908. plays and converts IFF-8SVX, AIFF, WAV, VOC, .au, .snd, and 8 bit raw
  909. (signed, unsigned, u-law) samples.  As of version 1.23, OmniPlay will
  910. also convert any playable sample to 8SVX.  Files: wuarchive.wustl.edu
  911. in /systems/amiga/audio/sampleplayers/oplay123.lha (?)
  912. amiga.physik.unizh.ch in mus/play/oplay123.lha
  913.  
  914.         Apple Macintosh
  915.         ---------------
  916.  
  917. Malcolm Slaney from Apple writes:
  918.  
  919.  "We do have tools to play sound back on most of our Unix hosts.  We wrote
  920.  a program called TcpPlay that lets us read a sound file on a Unix host,
  921.  open a TCP/IP connection to the Mac on my desk, and plays the file.  We
  922.  think of it as X windows for sound (at least a step in that direction.)
  923.  
  924.  This software is available for anonymous FTP from ftp.apple.com
  925.  [IP address 130.43.2.3 -- Guido].
  926.  Look for  ~ftp/pub/TcpPlay/TcpPlay.sit.hqx.
  927.  
  928.  Finally, there are MANY tools for working with sound on the Macintosh. Three
  929.  applications that come to mind immediately are SoundEdit (formerly by
  930.  Farralon and now by MacroMind/Paracomp), Alchemy and Eric Keller's Signalyze.
  931.  There are lots of other tools available for sound editing (including some
  932.  of the QuickTime Movie tools.)"
  933.  
  934. Bill Houle sent the following lists:
  935.  
  936. EDITORS:
  937.  
  938. Sample Editor, Garrick McFarlane: plays AIFF and 'snd' sounds.  Can convert
  939. between AIFF and 'snd'.  Can record from built-in mic.  Can add effects such
  940. as fade, normalize, delay, etc.
  941.  
  942. Wavicle, Lee Fyock: plays SoundEdit files.  Can convert to 'snd'.  Can record
  943. from built-in mic.  Can add effects such as fade, filter, reverb, etc.
  944.  
  945. [*]SoundEdit, Farallon: plays SoundEdit and 'snd' sounds.  Can read/write 
  946. SoundEdit files and 'snd' sounds.  Can record from built-in mic.  Can add 
  947. effects such as echo, filter, reverb, etc.
  948.  
  949. PLAYERS:
  950.  
  951. The Player, Antoine Rosset & Mike Venturi: plays AIFF, SoundEdit, MOD, and 
  952. 'snd' files.
  953.  
  954. SoundMaster (aka [*]Kaboom!), Bruce Tomlin: associates SoundEdit files to 
  955. MacOS events.
  956.  
  957. SndControl, Riccardo Ettore: associates 'snd' sounds to MacOS events.
  958.  
  959. Most programs mentioned are shareware/freeware available from SUMEX
  960. and the various mirror sites, or check archie for the nearest FTP
  961. site.  Popular commercial apps are indicated with a [*].
  962.  
  963.  
  964. The Sound Site Newsletter
  965. -------------------------
  966.  
  967. An electronic publication with lots of info about digitised sound and
  968. sound formats, albeit mostly on micros, is "The Sound Site
  969. Newsletter".  Issue 12 appeared in March 1993.  This used to be
  970. available by anonymouse ftp from saffron, but I have been informed
  971. that saffron is no longer providing this service.  If you know of a
  972. different site carrying recent issues of the Sound Site newsletter,
  973. please let me know!)
  974.  
  975.  
  976. Posting sounds
  977. --------------
  978.  
  979. The newsgroup alt.binaries.sounds.misc is dedicated to postings
  980. containing sound.  (Discussions related to such postings belong in
  981. alt.binaries.sounds.d.)
  982.  
  983. There is no set standard for posting sounds; uuencoded files in most
  984. popular formats are welcome, if split in parts under 50 kBytes.  To
  985. accomodate automatic decoding software (such as the ":decode" command
  986. of the nn newsreader), please place a part indicator of the form
  987. (mm/nn) at the end of your subject meaning this is number mm of a
  988. total of nn part.
  989.  
  990. It is recommended to post sounds in the format that was used for the
  991. original recording; conversions to other formats often lose
  992. information and would do people with identical hardware as the poster
  993. no favor.  For instance, convering 8-bit linear sound to U-LAW loses
  994. the lower few bits of the data, and rate changing conversions almost
  995. always add noise.  Converting from U-LAW to linear requires expansion
  996. to 16 bit samples if no information loss is allowed!
  997.  
  998. U-LAW data is best posted with a NeXT/Sun header.
  999.  
  1000. If you have to post a file in a headerless format (usually 8-bit
  1001. linear, like ".snd"), please add a description giving at least the
  1002. sampling rate and whether the bytes are signed (zero at 0) or unsigned
  1003. (zero at 0200).  However, it is highly recommended to add a header
  1004. that indicates the sampling rate and encoding scheme; if necessary you
  1005. can use SOX to add a header of your choice to raw data.
  1006.  
  1007. Compression of sound files usually isn't worth it; the standard
  1008. "compress" algorithm doesn't save much when applied to sound data
  1009. (typically at most 10-20 percent), and compression algorithms
  1010. specifically designed for sound (e.g. NeXT's) are usually
  1011. proprietary.  (See also the section "Compression schemes" earlier.)
  1012.