home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / audio-fmts / diff next >
Encoding:
Text File  |  1995-07-25  |  27.8 KB  |  694 lines

  1. Subject: Changes to: FAQ: Audio File Formats
  2. Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,alt.answers,comp.answers,news.answers
  3. From: guido@cwi.nl (Guido van Rossum)
  4. Date: Mon, 1 Aug 1994 08:45:51 GMT
  5.  
  6. Archive-name: audio-fmts/diff
  7. Submitted-by: Guido van Rossum <guido@cwi.nl>
  8. Version: 3.09
  9. Last-modified: 1-Aug-1994
  10.  
  11. *** 1.8    1994/02/22 10:41:20
  12. --- audio.part1    1994/08/01 08:42:08
  13. ***************
  14. *** 8,11 ****
  15.   Submitted-by: Guido van Rossum <guido@cwi.nl>
  16. ! Version: 3.08
  17. ! Last-modified: 22-Feb-1994
  18.   
  19. --- 8,11 ----
  20.   Submitted-by: Guido van Rossum <guido@cwi.nl>
  21. ! Version: 3.09
  22. ! Last-modified: 1-Aug-1994
  23.   
  24. ***************
  25. *** 59,62 ****
  26.   
  27. ! The entire FAQ is also available by anonymous ftp from ftp.cwi.nl
  28. ! [192.16.184.180], directory pub/audio, files AudioFormats.{part1,part2}.
  29.   
  30. --- 59,62 ----
  31.   
  32. ! The entire FAQ is also available by anonymous ftp from ftp.cwi.nl,
  33. ! directory pub/audio, files AudioFormats.{part1,part2}.
  34.   
  35. ***************
  36. *** 160,163 ****
  37.   
  38. ! 32000           Used in digital radio, NICAM (Nearly-Instantaneous
  39. !                 Companded Audio Multiplex [IBA/BREMA/BBC]) and other
  40.                   TV work, at least in the UK; also long play DAT and
  41. --- 160,163 ----
  42.   
  43. ! 32000           Used in digital radio, NICAM (Nearly Instantaneous
  44. !                 Compandable Audio Matrix [IBA/BREMA/BBC]) and other
  45.                   TV work, at least in the UK; also long play DAT and
  46. ***************
  47. *** 233,236 ****
  48.   WAV and MOD files).  The software is available by anonymous ftp from
  49. ! svr-ftp.eng.cam.ac.uk [129.169.24.20], directory misc, file
  50. ! shorten-1.08.tar.Z.
  51.   
  52. --- 233,235 ----
  53.   WAV and MOD files).  The software is available by anonymous ftp from
  54. ! svr-ftp.eng.cam.ac.uk, directory misc, file shorten-1.08.tar.Z.
  55.   
  56. ***************
  57. *** 261,265 ****
  58.   interesting to note that video compression reaches much higher ratios
  59. ! (like 26:1).  This FAQ is ftp'able from rtfm.mit.edu [18.72.1.58] in
  60. ! directory /pub/usenet/news.answers/compression-faq, files part1 and
  61. ! part2.
  62.   
  63. --- 260,263 ----
  64.   interesting to note that video compression reaches much higher ratios
  65. ! (like 26:1).  This FAQ is ftp'able from rtfm.mit.edu in directory
  66. ! /pub/usenet/news.answers/compression-faq, files part1 and part2.
  67.   
  68. ***************
  69. *** 269,271 ****
  70.   for almost any conceivable <foo>.  Ftp'able from ftp.cso.uiuc.edu
  71. ! (128.174.5.59) in the directory /doc/pcnet as the file compression.
  72.   
  73. --- 267,269 ----
  74.   for almost any conceivable <foo>.  Ftp'able from ftp.cso.uiuc.edu
  75. ! in the directory /doc/pcnet as the file compression.
  76.   
  77. ***************
  78. *** 321,326 ****
  79.   VAXstation 4000     U-LAW           8k                   1
  80. ! DEC 3000/300-500    U-LAW           8k                   1
  81.   DEC 5000/20-25      U-LAW           8k                   1
  82. ! Tandy 1000/*L*      8               22k                  3
  83. ! Tandy 2500          8               22k                  3
  84.   HP9000/705,710,425e U,A-LAW,16      8k                   1
  85. --- 319,324 ----
  86.   VAXstation 4000     U-LAW           8k                   1
  87. ! DEC 3000            U-LAW           8k                   1
  88.   DEC 5000/20-25      U-LAW           8k                   1
  89. ! Tandy 1000/*L*      8               >=44k                1
  90. ! Tandy 2500          8               >=44k                1
  91.   HP9000/705,710,425e U,A-LAW,16      8k                   1
  92. ***************
  93. *** 347,350 ****
  94.   VAXstation, Sun SPARCstation, DECvoice, and DECaudio devices.  Sun
  95. ! sound files work without change.  The Alpha systems (DEC 3000 Model
  96. ! 300, 400, 500) also have DECsound bundled with Motif.
  97.   
  98. --- 345,349 ----
  99.   VAXstation, Sun SPARCstation, DECvoice, and DECaudio devices.  Sun
  100. ! sound files work without change.  The Alpha systems also have DECsound
  101. ! bundled with Motif.  Also, the DEC2000/300 (aka DECpc AXP 150) can use
  102. ! a Microsoft Sound Card, with AudioFile (see below) for sound.
  103.   
  104. ***************
  105. *** 394,395 ****
  106. --- 393,409 ----
  107.   
  108. + Tandy notes (Jeffrey L. Hayes <tvdog@delphi.com>): The maximum
  109. + sampling rate for output is at least 44k.  (I don't know the maximum
  110. + rates; I have recorded at 22k and played at 44k.  Higher rates are
  111. + probably possible.)  There is one output channel, not three.  The
  112. + belief that there are 3 channels probably stems from the fact that
  113. + Music.pdm, bundled with these machines, can create 3- channel music
  114. + modules (analogous to Amiga .mod's).  Music.pdm probably does that
  115. + because it is designed to work with the Tandy's 3-voice tone generator
  116. + circuitry (compatible with the Texas Instruments SN76496 in the IBM
  117. + PC-Jr) if there is insufficient RAM to load sound samples.  The Tandy
  118. + chip is able to record at lower rates than it is able to play back, as
  119. + is the Soundblaster (i.e., the divider used to program the chip to
  120. + record is lower than that used to program the chip to play back).  The
  121. + Tandy DAC can go faster than the original Soundblaster, however.
  122.   The NCD MCX terminal has audio integrated with its X server.  The
  123. ***************
  124. *** 514,517 ****
  125.   Princeton/Stanford extensions is available by anonymous ftp from
  126. ! ftp.cwi.nl [192.16.184.180], in directory /pub/audio/BICSF-info.  This
  127. ! file contains further ftp pointers to software.
  128.   
  129. --- 528,531 ----
  130.   Princeton/Stanford extensions is available by anonymous ftp from
  131. ! ftp.cwi.nl, in directory /pub/audio/BICSF-info.  This file contains
  132. ! further ftp pointers to software.
  133.   
  134. ***************
  135. *** 519,527 ****
  136.   SPHERE standard.  The most recent version of the SPHERE package is
  137. ! available via anonymous ftp from jaguar.ncsl.nist.gov [129.6.48.157]
  138. ! in compressed tar form as "sphere-v.tar.Z" (where "v" is the version
  139. ! code).  The NIST SPHERE header is an object-oriented, 1024-byte
  140. ! blocked, ASCII structure which is prepended to the waveform data.  The
  141. ! header is composed of a fixed-format portion followed by an
  142. ! object-oriented variable portion.  I have placed a short description
  143. ! of NIST SPHERE on ftp.cwi.nl:/pub/audio/NIST-SPHERE.
  144.   
  145. --- 533,541 ----
  146.   SPHERE standard.  The most recent version of the SPHERE package is
  147. ! available via anonymous ftp from jaguar.ncsl.nist.gov in compressed
  148. ! tar form as "sphere-v.tar.Z" (where "v" is the version code).  The
  149. ! NIST SPHERE header is an object-oriented, 1024-byte blocked, ASCII
  150. ! structure which is prepended to the waveform data.  The header is
  151. ! composed of a fixed-format portion followed by an object-oriented
  152. ! variable portion.  I have placed a short description of NIST SPHERE on
  153. ! ftp.cwi.nl:/pub/audio/NIST-SPHERE.
  154.   
  155. ***************
  156. *** 615,619 ****
  157.   A compressed tar file containing the same version of SOX is available
  158. ! by anonymous ftp from ftp.cwi.nl [192.16.184.180], in directory
  159. ! /pub/audio/sox7.tar.Z.  You may be able to locate a nearer version
  160. ! using archie!
  161.   
  162. --- 629,633 ----
  163.   A compressed tar file containing the same version of SOX is available
  164. ! by anonymous ftp from ftp.cwi.nl, in directory
  165. ! /pub/audio/sox<version>.tar.Z.  You may be able to locate a nearer
  166. ! version using archie!
  167.   
  168. ***************
  169. *** 693,699 ****
  170.   
  171. ! The Tandy 1000 uses a (proprietary?) compressed format.  There is a PD
  172. ! Mac to Tandy conversion program called CONVERT.  Leonard Erickson
  173. ! <leonard@qiclab.scn.rain.com> writes: There is a WAV driver from Tandy
  174. ! if people ask.  There also appears to be a program that purports to
  175. ! convert other formats to Tandy, but I haven't tested this one yet.
  176.   
  177. --- 707,743 ----
  178.   
  179. ! The Tandy uses a proprietary format, which can use compression
  180. ! (see appendix).  Jeffrey L. Hayes <tvdog@delphi.com> writes:
  181. ! There is in fact a Windows 3.1 sound driver for the Tandy 2500-series 
  182. ! available from Radio Shack.  My informant says:  "Say that you have a 
  183. ! 2500SX/33 and you lost your Windows Utilities/Drivers disk.  The cost is 
  184. ! $5.00."  (The driver will work on any 2500.)
  185. ! Version 2.00 of Conv2snd by Kenneth Udut by Kenneth Udut is now on
  186. ! Simtel.  It converts any 8-bit mono unsigned PCM file to Tandy
  187. ! DeskMate .snd format.  The new version recognizes RIFF WAVE headers
  188. ! and comes with a utility to convert .snd to .wav, Snd2wav.
  189. ! In addition to the .snd format used by Sound.pdm, Tandy used an .sng format 
  190. ! with Music.pdm for song files.  .sng files are analogous to Amiga .mod 
  191. ! files, but they contain only the sequencing information.  The samples are 
  192. ! expected to be in .snd files in the current directory for Music.pdm.  It 
  193. ! should be possible to convert .sng to .mod - when I get around to it!
  194. ! I am collecting information and programs for the Tandy DAC chip.  I have 
  195. ! written a DOS .wav player for the Tandy DAC, as well as a program to make 
  196. ! the Tandy DAC emulate a Covox DAC for use with programs that support the 
  197. ! Covox or a DAC on a parallel port.  Those interested may write to me and 
  198. ! ask for the "Tandy DAC package" - help is needed!  The package includes 
  199. ! source code and programming information on the Tandy chip.  A DOS .wav 
  200. ! recorder and an Amiga .mod player for the Tandy DAC are in progress.  There 
  201. ! are two other programs (to my knowledge) to record and play back sounds on 
  202. ! a Tandy - Sampler and Tndsnd.  These programs are on Delphi but not on the 
  203. ! Internet as far as I know; users not on Delphi can write to me and ask for 
  204. ! them.  Those wishing to make a public announcement regarding the Tandy DAC 
  205. ! should post to comp.sys.tandy.
  206. ! Tandy now includes Soundblaster support in its machines.  New Tandy's do 
  207. ! not have the proprietary Tandy DAC.
  208.   
  209. ***************
  210. *** 846,848 ****
  211.   AL-capable systems (e.g., Indigo, Indy).  The source kit is located at
  212. ! ftp site crl.dec.com [192.58.206.2] in /pub/DEC/AF.
  213.   
  214. --- 890,892 ----
  215.   AL-capable systems (e.g., Indigo, Indy).  The source kit is located at
  216. ! ftp site crl.dec.com in /pub/DEC/AF.
  217.   
  218. ***************
  219. *** 851,855 ****
  220.   interface (they claim it should be easy to port).  The source it
  221. ! located at ftp.x.org [198.112.44.100] in contrib/netaudio.  It is also
  222. ! ported to SGI (tested on IRIX 5.x), and there are unconfirmed rumors
  223. ! that it is being ported to SCI and Linux.
  224.   
  225. --- 895,899 ----
  226.   interface (they claim it should be easy to port).  The source it
  227. ! located at ftp.x.org in contrib/netaudio.  It is also ported to SGI
  228. ! (tested on IRIX 5.x), and there are unconfirmed rumors that it is
  229. ! being ported to SCI and Linux.
  230.   
  231. ***************
  232. *** 936,938 ****
  233.   For sounds on Atari STs - programs are in the atari/sound/players
  234. ! directory on atari.archive.umich.edu (141.211.164.8).
  235.   
  236. --- 980,982 ----
  237.   For sounds on Atari STs - programs are in the atari/sound/players
  238. ! directory on atari.archive.umich.edu.
  239.   
  240. ***************
  241. *** 966,969 ****
  242.   
  243. !  This software is available for anonymous FTP from ftp.apple.com
  244. !  [IP address 130.43.2.3 -- Guido].
  245.    Look for  ~ftp/pub/TcpPlay/TcpPlay.sit.hqx.
  246. --- 1010,1012 ----
  247.   
  248. !  This software is available for anonymous FTP from ftp.apple.com.
  249.    Look for  ~ftp/pub/TcpPlay/TcpPlay.sit.hqx.
  250. *** 1.6    1994/02/22 10:41:20
  251. --- audio.part2    1994/08/01 08:44:55
  252. ***************
  253. *** 8,11 ****
  254.   Submitted-by: Guido van Rossum <guido@cwi.nl>
  255. ! Version: 3.05
  256. ! Last-modified: 27-Sep-1993
  257.   
  258. --- 8,11 ----
  259.   Submitted-by: Guido van Rossum <guido@cwi.nl>
  260. ! Version: 3.09
  261. ! Last-modified: 1-Aug-1994
  262.   
  263. ***************
  264. *** 32,34 ****
  265. --- 32,38 ----
  266.   The Amiga MOD Format
  267. + The Sample Vision Format
  268. + Some Miscellaneous Formats
  269. + Tandy Deskmate .snd Format Notes
  270.   
  271.   ------------------------------------------------------------------------
  272. ***************
  273. *** 65,69 ****
  274.   it's the same text as mentioned below) available by anonymous ftp from
  275. ! ftp.cwi.nl [192.16.184.180]; the file is /pub/audio/AudioIFF1.2.hqx.
  276. ! A newer version is also available: /pub/audio/AudioIFF1.3.hqx.
  277. ! But you may be better off with the AIFF-C specs, see below.
  278.   
  279. --- 69,73 ----
  280.   it's the same text as mentioned below) available by anonymous ftp from
  281. ! ftp.cwi.nl; the file is /pub/audio/AudioIFF1.2.hqx.  A newer version
  282. ! is also available: /pub/audio/AudioIFF1.3.hqx.  But you may be better
  283. ! off with the AIFF-C specs, see below.
  284.   
  285. ***************
  286. *** 81,83 ****
  287.   A PostScript version of the AIFF-C specification is available via
  288. ! anonymous ftp on FTP.SGI.COM (192.48.153.1) as /sgi/aiff-c.9.26.91.ps.
  289.   
  290. --- 85,87 ----
  291.   A PostScript version of the AIFF-C specification is available via
  292. ! anonymous ftp on ftp.sgi.com as /sgi/aiff-c.9.26.91.ps.
  293.   
  294. ***************
  295. *** 88,92 ****
  296.   contained in the file AIFF.h in the "Apple #Includes" folder that comes
  297. ! on the distribution disks.  I found this out a little too late: I had
  298. ! already coded my own structures.  I assume that this header file comes
  299. ! with Apple programming products like MPW [C|C++] as well.
  300.   
  301. --- 92,98 ----
  302.   contained in the file AIFF.h in the "Apple #Includes" folder that comes
  303. ! on the distribution disks.  I assume that this header file comes with 
  304. ! Apple programming products like MPW [C|C++] as well.  I found this out a 
  305. ! little too late: I had already coded my own structures.  These structures 
  306. ! of mine, along with other useful code for AIFF-based DSP in C, are 
  307. ! available for ftp at ftp.cs.jhu.edu in pub/dsp.
  308.   
  309. ***************
  310. *** 518,521 ****
  311.   
  312. ! The documentation is at grind.isca.uiowa.edu [128.255.19.233], in the
  313. ! directory /amiga/f1/ff185.  The complete file list is as follows:
  314.   
  315. --- 524,527 ----
  316.   
  317. ! The documentation is at grind.isca.uiowa.edu, in the directory
  318. ! /amiga/f1/ff185.  The complete file list is as follows:
  319.   
  320. ***************
  321. *** 652,654 ****
  322.   We have placed an updated version of the FS-1016 CELP 3.2 code in the
  323. ! anonymous FTP area on super.org (192.31.192.1).  It's in:
  324.   
  325. --- 658,660 ----
  326.   We have placed an updated version of the FS-1016 CELP 3.2 code in the
  327. ! anonymous FTP area on super.org.  It's in:
  328.   
  329. ***************
  330. *** 827,838 ****
  331.   
  332. ! And here's a pointer to the official description from Matt Saettler,
  333. ! Microsoft Multimedia:
  334. ! "The complete definition of the WAVE file format as defined by
  335. ! IBM/Microsoft is available for anon. FTP from ftp.uu.net in the
  336. ! vendor/microsoft/multimedia directory."
  337.   
  338. - (Rob Ryan's version may actually be an extract from one of the files
  339. - stored there.)
  340.   ------------------------------------------------------------------------
  341. --- 833,839 ----
  342.   
  343. ! The complete definition of the WAVE file format as defined by IBM and
  344. ! Microsoft is available for anonymous FTP from ftp.microsoft.com, in
  345. ! directory developer/MSDN/CD8 as file RIFFNE.ZIP, which contains a MS
  346. ! help file (riffne.hlp).
  347.   
  348.   ------------------------------------------------------------------------
  349. ***************
  350. *** 1196 ****
  351. --- 1197,1527 ----
  352.   -----------------------------------------------------------------------
  353. + The Sample Vision Format
  354. + ------------------------
  355. + From: "tim.dorcas@enest.com" <KURTZ@URIACC.URI.EDU>
  356. + First, Sample Vision is a program used by professional musicians to
  357. + send and receive samples via a MIDI interface to the PC. While on the
  358. + PC, you can edit several parameters including loop points, pitch, time
  359. + compression, normalize, sample rate, ect.  The list of supported
  360. + samplers include: AKAI {S700,X700,S900, S950,S612,S1000/1100},
  361. + Casio{FZ1,FZ10M,FZ20M}, Ensoniq{EPS,EPS16,ASR10,Mirage},
  362. + Emu{Emax,EmaxII}, Korg{DSS1,DSM1,T workstation}, Oberheim DPX-1,
  363. + Peavey DPM-3, Roland {S10,MKS100,S220,S50,S330,S550}, Sequential
  364. + Circuits Prophet 2000/2002, Sample Dump Standard devices, Yamaha
  365. + TX16W.
  366. + The .smp format breaks down like this:
  367. + Offset     Size        Description
  368. + 000        18          'SOUND SAMPLE DATA ' ASCII FILE ID
  369. + 0018       04          '2.1 '   ASCII FILE VERSION
  370. + 0022       60          USER COMMENTS    60 ASCII CHARACTERS
  371. + 0082       30          SAMPLE NAME    LEFT JUSTIFIED 30 ASCII CHARACTERS
  372. + 0112       04          SAMPLE SIZE   SAMPLE DATA COUNT IN WORDS
  373. + 0116       ??          SAMPLE DATA  1 WORD PER SAMPLE, LEAST SIGNIFICANT BYTE
  374. +                                     FIRST, LSW FIRST; SIGNED 16 BIT INTEGERS
  375. + ??         02(DW)      RESERVED
  376. + ??         04(DD)      LOOP 1 START  USE SAMPLE COUNT NOT BYTE COUNT
  377. + ??         04(DD)      LOOP 1 END
  378. + ??         01(DB)      LOOP 1 TYPE   0=LOOP OFF,1=FORWARD,2=FORWARD/BACKWARD
  379. + ??         02(DW)      LOOP 1 COUNT  TIMES TO EXECUTE LOOP BEFORE NEXT LOOP
  380. + THERE ARE SEVEN MORE IDENTICAL LOOP STRUCTURES FOR A TOTAL OF 8
  381. + ??         10          MARKER 1 NAME ASCII MARKER NAME
  382. + ??         04(DD)      MARKER 1 POSITION  FFFF MEANS UNUSED
  383. + THER ARE SEVEN MORE IDENTICAL MARKER STRUCTURES FOR A TOTAL OF 8
  384. + ??         01(DB)       MIDI UNITY PLAYBACK NOTE         MIDI NOTE TO PLAY
  385. +                                                          THE SAMPLE AT ITS
  386. +                                                          ORIGINAL PITCH
  387. + ??         04(DD)       SAMPLE RATE IN HERTZ
  388. + ??         04(DD)       SMPTE OFFSET IN SUBFRAMES
  389. + ??         04(DD)       CYCLE SIZE         SAMPLE COUNT IN ONE CYCLE OF
  390. +                                            THE SAMPLED SOUND. -1 IF UNKNOWN
  391. + (DD) 4 BYTES, LS BYTE FIRST, LS WORD FIRST
  392. + (DW) 2 BYTES, LS BYTE FIRST
  393. + (DB) 1 BYTE
  394. + That's about it. One thing I have noticed is that Sample Vision only
  395. + writes seven loop structures to file as opposed to the eight
  396. + structures it claims are written.
  397. + -----------------------------------------------------------------------
  398. + Some Miscellaneous Formats
  399. + --------------------------
  400. + From: bil@ccrma.Stanford.EDU (Bill Schottstaedt)
  401. + I thought you might find some of this information amusing -- a few
  402. + header formats I didn't find in your great audio file formats
  403. + documentation.  Some taken from the AFsp sources, or sox, or
  404. + local ancient documentation.  I also have short descriptions
  405. + of BICSF, NeXT/Sun, AIFF, RIFF, SMP, VOC, and so on, plus
  406. + full descriptions of the 2 Sound Designer formats, if you're
  407. + interested.
  408. + /* ------------------------------------ NIST ---------------------------------
  409. +  * 
  410. +  *   0: "NIST_1A"
  411. +  *   8: data_location as ASCII representation of integer
  412. +  *      (apparently always "   1024")
  413. +  *  16: start of complicated header -- full details available upon request
  414. +  *
  415. +  *  here's an example:
  416. +  *
  417. +  *  NIST_1A
  418. +  *     1024
  419. +  *  database_id -s5 TIMIT
  420. +  *  database_version -s3 1.0
  421. +  *  utterance_id -s8 aks0_sa1
  422. +  *  channel_count -i 1
  423. +  *  sample_count -i 63488
  424. +  *  sample_rate -i 16000
  425. +  *  sample_min -i -6967
  426. +  *  sample_max -i 7710
  427. +  *  sample_n_bytes -i 2
  428. +  *  sample_byte_format -s2 01
  429. +  *  sample_sig_bits -i 16
  430. +  *  end_head
  431. +  */
  432. + /* ------------------------------------ SNDT ---------------------------------
  433. +  *
  434. +  * this taken from sndrtool.c (sox-10):
  435. +  *   0: "SOUND"
  436. +  *   6: 0x1a
  437. +  *   8-11: 0
  438. +  *  12-15: nsamples
  439. +  *  16-19: 0
  440. +  *  20-23: nsamples
  441. +  *  24-25: srate
  442. +  *  26-27: 0
  443. +  *  28-29: 10
  444. +  *  30-31: 4
  445. +  *  32-> : <filename> "- File created by Sound Exchange"
  446. +  *  .->95: 0
  447. +  */
  448. + /* ------------------------------------ ESPS ---------------------------------
  449. +  *
  450. +  *   16: 0x00006a1a or 0x1a6a0000
  451. +  *  136: if not 0, chans + format = 32-bit float
  452. +  *  144: if not 0, chans + format = 16-bit linear
  453. +  * 
  454. +  *   from AFgetInfoES.c:
  455. +  * 
  456. +  *       Bytes     Type    Contents
  457. +  *      8 -> 11    --     Header size (bytes)
  458. +  *     12 -> 15    int    Sampled data record size
  459. +  *     16 -> 19    int    File identifier
  460. +  *     40 -> 65    char   File creation date
  461. +  *    124 -> 127   int    Number of samples (may indicate zero)
  462. +  *    132 -> 135   int    Number of doubles in a data record
  463. +  *    136 -> 139   int    Number of floats in a data record
  464. +  *    140 -> 143   int    Number of longs in a data record
  465. +  *    144 -> 147   int    Number of shorts in a data record
  466. +  *    148 -> 151   int    Number of chars in a data record
  467. +  *    160 -> 167   char   User name
  468. +  *    333 -> H-1   --     Generic header items, including "record_freq"
  469. +  *                        {followed by a "double8"}
  470. +  *      H -> ...   --     Audio data
  471. +  */
  472. + /* ------------------------------------ INRS ---------------------------------
  473. +  * 
  474. +  *   from AFgetInfoIN.c:
  475. +  * 
  476. +  *    INRS-Telecommunications audio file:
  477. +  *       Bytes     Type    Contents
  478. +  *      0 ->  3    float  Sampling Frequency (VAX float format)
  479. +  *      6 -> 25    char   Creation time (e.g. Jun 12 16:52:50 1990)
  480. +  *     26 -> 29    int    Number of speech samples in the file
  481. +  *   The data in an INRS-Telecommunications audio file is in 16-bit integer
  482. +  *   format.
  483. +  * 
  484. +  */
  485. + /* old Mus10, SAM formats, just for completeness
  486. +  *
  487. +  * These were used for sound data on the PDP-10s at SAIL and CCRMA in the
  488. +  * 70's and 80's.
  489. +  * The word length was 36-bits.
  490. +  *
  491. +  * "New" format as used by nearly all CCRMA software pre-1990:
  492. +  *
  493. +  *  WD 0 - '525252525252
  494. +  *  WD 1 - Clock rate in Hz (PDP-10 36-bit floating point)
  495. +  *  WD 2 - #samples per word,,pack-code
  496. +  *      (has # samples per word in LH, pack-code in RH)
  497. +  *      0 for 12-bit fixed point
  498. +  *      1 for 18-bit fixed point
  499. +  *      2 for  9-bit floating point incremental
  500. +  *      3 for 36-bit floating point
  501. +  *      4 for 16-bit sambox fixed point, right justified
  502. +  *      5 for 20-bit sambox fixed point
  503. +  *      6 for 20-bit right-adjusted fixed point (sambox SAT format)
  504. +  *      7 for 16-bit fixed point, left justified
  505. +  *      N>9 for N bit bytes in ILDB format
  506. +  *  WD 3 - # channels
  507. +  *      1 for MONO
  508. +  *      2 for STEREO
  509. +  *      4 for QUAD
  510. +  *  WD 4 - Maximum amplitude (if known)
  511. +  *      is a floating point number
  512. +  *      is zero if not known
  513. +  *      is maximum magnitude (abs value) of signal
  514. +  *  WD 5        number of Sambox ticks per pass
  515. +  *              (inverse of Sambox clock rate, sort of)
  516. +  *  WD 6 - Total #samples in file.
  517. +  *         If 0 then #wds_in_file*#samps_per_wd assumed.
  518. +  *  WD 7 - Block size (if any). 0 means sound is not blocked.
  519. +  *  WDs '10-'77 Reserved for EDSND usage
  520. +  *  WDs '100-'177 Text description of file (in ASCIZ format)
  521. +  *
  522. +  *
  523. +  * "Old" format
  524. +  *
  525. +  *  WD 0 - '525252525252
  526. +  *  WD 1 - Clock rate
  527. +  *      has code in LH, actual INTEGER rate in RH
  528. +  *      code=0 for 6.4Kc (or anything else)
  529. +  *          =1 for 12.8Kc, =2 for 25.6Kc, =3 for 51.2Kc
  530. +  *          =5 for 102.4Kc, =6 for 204.8Kc
  531. +  *  WD 2 - pack
  532. +  *      0 for 12 bit
  533. +  *      1 for 16 bit (18 bit)
  534. +  *      2 for 9 bit floating point incremental
  535. +  *      3 for 36-bit floating point
  536. +  *      N>9 for N bit bytes in ILDB format
  537. +  *      has # samples per word in LH.
  538. +  *  WD 3 - # channels
  539. +  *      1 for MONO
  540. +  *      2 for STEREO
  541. +  *      4 for QUAD
  542. +  *  WD 4 - Maximum amplitude (if known)
  543. +  *      is a floating point number
  544. +  *      is zero if not known
  545. +  *      is maximum magnitude (abs value) of signal
  546. +  *  WDs 5-77 Reserved for future expansion
  547. +  *  WDs 100-177 Text description of file (in ASCIZ format)
  548. +  */
  549. + -----------------------------------------------------------------------
  550. + Tandy Deskmate .snd Format Notes
  551. + --------------------------------
  552. + From: Jeffrey L. Hayes <tvdog@delphi.com>
  553. + Tandy .snd files are created by Sound.pdm, a program that came with the 
  554. + proprietary DeskMate environment.  They are used by Music.pdm to create 
  555. + music modules (.sng files).  DeskMate Sound and Music require the Tandy 
  556. + sound chip.  There is a program to convert RIFF WAVE and other 8-bit PCM 
  557. + formats to .snd, Conv2snd, by Kenneth Udut.  Conv2snd v.2.00 comes with 
  558. + Snd2wav, which converts .snd to RIFF WAVE.
  559. + There are two types of DeskMate .snd files, sound files and instrument 
  560. + files.  Both contain 8-bit unsigned PCM samples.
  561. + Sound files are simpler.  These are garden-variety sample files with a 
  562. + fixed-length header giving the name of the sound, the recording frequency, 
  563. + and the length of the sound.  Sound files may be recorded at 5500Hz, 11kHz 
  564. + or 22kHz.
  565. + Instrument files contain samples as well as frequency and looping 
  566. + information used by Music.pdm to represent an instrument.  Instrument files 
  567. + provide for attack, sustain, and decay with several samples having 
  568. + different implied frequencies and being used by Music.pdm to represent the 
  569. + instrument in different pitch ranges.  Up to 16 different notes (with 16 
  570. + different samples) can be contained in one instrument file.  Instrument 
  571. + files are always recorded at 11kHz.  Both sound files and instrument files 
  572. + may be compressed in one of two ways, "music" compression or "speech" 
  573. + compression, or they may be uncompressed.  I don't know the compression 
  574. + algorithms, but simple file comparison reveals that "music" and "speech" 
  575. + compression are almost identical.
  576. + The DeskMate .snd file header consists of 16 bytes of fixed header 
  577. + information followed by one or more 28-byte note records.  The sample 
  578. + information, which may be compressed, follows the header.
  579. + DeskMate .snd File Format - Fixed Header
  580. + ----------------------------------------
  581. +   offset    size      what
  582. +   ------    ----      ----
  583. +   0         byte      1Ah (.snd ID byte)
  584. +   1         byte      Compression code:  0 = no compression; 1 = music
  585. +                       compression; 2 = sound compression.
  586. +   2         byte      Number of notes in the instrument file.  1 if sound
  587. +                       file.
  588. +   3         byte      Instrument number.  0 if sound file; 0FFh if instrument
  589. +                       file with no number set.  Valid instrument numbers in
  590. +                       an instrument file are 1 to 32.  Use this field to
  591. +                       distinguish a sound file from an instrument file.
  592. +   4         10 bytes  Sound or instrument name.  Filled on the right with
  593. +                       nulls if less than 10 characters.
  594. +   0Eh       word      Sampling rate in samples per second.  Note that although
  595. +                       a sampling rate other than 5500, 11000 and 22000 can be
  596. +                       entered here, Sound.pdm will not actually play at other
  597. +                       rates.
  598. +   10h       variable  Note records begin, 28 bytes each.  Number of records
  599. +                       given in byte 2 above.
  600. +  
  601. + DeskMate .snd File Format - Note Record
  602. + ---------------------------------------
  603. +   0         byte      Pitch of the note:  1 = A1 in American Standard Pitch;
  604. +                       2 = A#1; etc.  A1 is lowest note allowed; highest note
  605. +                       allowed is B6 (3Fh).  Sound files have 0FFh here; so do
  606. +                       instrument files with no note set.
  607. +                           Note that Sound.pdm does not designate notes in the
  608. +                       standard manner to the user.  Although A1 and B6 in
  609. +                       Sound.pdm are the same as A1 and B6 in standard pitch,
  610. +                       Sound.pdm starts octaves at A rather than at C (as is
  611. +                       standard).  Thus, middle C, C4 in standard pitch, is C3
  612. +                       in Sound.pdm.
  613. +   1         byte      Sound files, and instrument files with no pitch set,
  614. +                       have 0 here.  If the pitch is set, this byte is 0FFh.
  615. +   2         2 bytes   Range of the note, first byte is lower limit, second
  616. +                       is higher limit.  Byte encoding as for offset 0 (i.e.,
  617. +                       01h to 3Fh).  Sound files have FF FF here; so do
  618. +                       instrument files with no range set.
  619. +   4         dword     Offset in the file where samples for this note begin
  620. +                       (zero-relative), after compression if that was done.
  621. +   8         dword     If compressed, the length of the compressed data in the
  622. +                       file for this note.  Uncompressed files have 0 here.
  623. +   0Ch       4 bytes   Unknown.  Set to zero.
  624. +   10h       dword     Number of samples in the note, after decompression if
  625. +                       necessary.
  626. +   14h       dword     Number of sample at start of sustain region for the
  627. +                       note, relative to the first (zeroth) sample of the note.
  628. +                       For sound files, or if sustain is not set, this field is
  629. +                       0.
  630. +   18h       dword     Number of sample at end of sustain region for the note,
  631. +                       relative to the first (zeroth) sample of the note.  For
  632. +                       sound files, or if sustain is not set, this field is 0.
  633.  
  634.