Subject: Changes to: FAQ: Audio File Formats Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,alt.answers,comp.answers,news.answers From: guido@cwi.nl (Guido van Rossum) Date: Mon, 1 Aug 1994 08:45:51 GMT Archive-name: audio-fmts/diff Submitted-by: Guido van Rossum Version: 3.09 Last-modified: 1-Aug-1994 *** 1.8 1994/02/22 10:41:20 --- audio.part1 1994/08/01 08:42:08 *************** *** 8,11 **** Submitted-by: Guido van Rossum ! Version: 3.08 ! Last-modified: 22-Feb-1994 --- 8,11 ---- Submitted-by: Guido van Rossum ! Version: 3.09 ! Last-modified: 1-Aug-1994 *************** *** 59,62 **** ! The entire FAQ is also available by anonymous ftp from ftp.cwi.nl ! [192.16.184.180], directory pub/audio, files AudioFormats.{part1,part2}. --- 59,62 ---- ! The entire FAQ is also available by anonymous ftp from ftp.cwi.nl, ! directory pub/audio, files AudioFormats.{part1,part2}. *************** *** 160,163 **** ! 32000 Used in digital radio, NICAM (Nearly-Instantaneous ! Companded Audio Multiplex [IBA/BREMA/BBC]) and other TV work, at least in the UK; also long play DAT and --- 160,163 ---- ! 32000 Used in digital radio, NICAM (Nearly Instantaneous ! Compandable Audio Matrix [IBA/BREMA/BBC]) and other TV work, at least in the UK; also long play DAT and *************** *** 233,236 **** WAV and MOD files). The software is available by anonymous ftp from ! svr-ftp.eng.cam.ac.uk [129.169.24.20], directory misc, file ! shorten-1.08.tar.Z. --- 233,235 ---- WAV and MOD files). The software is available by anonymous ftp from ! svr-ftp.eng.cam.ac.uk, directory misc, file shorten-1.08.tar.Z. *************** *** 261,265 **** interesting to note that video compression reaches much higher ratios ! (like 26:1). This FAQ is ftp'able from rtfm.mit.edu [18.72.1.58] in ! directory /pub/usenet/news.answers/compression-faq, files part1 and ! part2. --- 260,263 ---- interesting to note that video compression reaches much higher ratios ! (like 26:1). This FAQ is ftp'able from rtfm.mit.edu in directory ! /pub/usenet/news.answers/compression-faq, files part1 and part2. *************** *** 269,271 **** for almost any conceivable . Ftp'able from ftp.cso.uiuc.edu ! (128.174.5.59) in the directory /doc/pcnet as the file compression. --- 267,269 ---- for almost any conceivable . Ftp'able from ftp.cso.uiuc.edu ! in the directory /doc/pcnet as the file compression. *************** *** 321,326 **** VAXstation 4000 U-LAW 8k 1 ! DEC 3000/300-500 U-LAW 8k 1 DEC 5000/20-25 U-LAW 8k 1 ! Tandy 1000/*L* 8 22k 3 ! Tandy 2500 8 22k 3 HP9000/705,710,425e U,A-LAW,16 8k 1 --- 319,324 ---- VAXstation 4000 U-LAW 8k 1 ! DEC 3000 U-LAW 8k 1 DEC 5000/20-25 U-LAW 8k 1 ! Tandy 1000/*L* 8 >=44k 1 ! Tandy 2500 8 >=44k 1 HP9000/705,710,425e U,A-LAW,16 8k 1 *************** *** 347,350 **** VAXstation, Sun SPARCstation, DECvoice, and DECaudio devices. Sun ! sound files work without change. The Alpha systems (DEC 3000 Model ! 300, 400, 500) also have DECsound bundled with Motif. --- 345,349 ---- VAXstation, Sun SPARCstation, DECvoice, and DECaudio devices. Sun ! sound files work without change. The Alpha systems also have DECsound ! bundled with Motif. Also, the DEC2000/300 (aka DECpc AXP 150) can use ! a Microsoft Sound Card, with AudioFile (see below) for sound. *************** *** 394,395 **** --- 393,409 ---- + Tandy notes (Jeffrey L. Hayes ): The maximum + sampling rate for output is at least 44k. (I don't know the maximum + rates; I have recorded at 22k and played at 44k. Higher rates are + probably possible.) There is one output channel, not three. The + belief that there are 3 channels probably stems from the fact that + Music.pdm, bundled with these machines, can create 3- channel music + modules (analogous to Amiga .mod's). Music.pdm probably does that + because it is designed to work with the Tandy's 3-voice tone generator + circuitry (compatible with the Texas Instruments SN76496 in the IBM + PC-Jr) if there is insufficient RAM to load sound samples. The Tandy + chip is able to record at lower rates than it is able to play back, as + is the Soundblaster (i.e., the divider used to program the chip to + record is lower than that used to program the chip to play back). The + Tandy DAC can go faster than the original Soundblaster, however. + The NCD MCX terminal has audio integrated with its X server. The *************** *** 514,517 **** Princeton/Stanford extensions is available by anonymous ftp from ! ftp.cwi.nl [192.16.184.180], in directory /pub/audio/BICSF-info. This ! file contains further ftp pointers to software. --- 528,531 ---- Princeton/Stanford extensions is available by anonymous ftp from ! ftp.cwi.nl, in directory /pub/audio/BICSF-info. This file contains ! further ftp pointers to software. *************** *** 519,527 **** SPHERE standard. The most recent version of the SPHERE package is ! available via anonymous ftp from jaguar.ncsl.nist.gov [129.6.48.157] ! in compressed tar form as "sphere-v.tar.Z" (where "v" is the version ! code). The NIST SPHERE header is an object-oriented, 1024-byte ! blocked, ASCII structure which is prepended to the waveform data. The ! header is composed of a fixed-format portion followed by an ! object-oriented variable portion. I have placed a short description ! of NIST SPHERE on ftp.cwi.nl:/pub/audio/NIST-SPHERE. --- 533,541 ---- SPHERE standard. The most recent version of the SPHERE package is ! available via anonymous ftp from jaguar.ncsl.nist.gov in compressed ! tar form as "sphere-v.tar.Z" (where "v" is the version code). The ! NIST SPHERE header is an object-oriented, 1024-byte blocked, ASCII ! structure which is prepended to the waveform data. The header is ! composed of a fixed-format portion followed by an object-oriented ! variable portion. I have placed a short description of NIST SPHERE on ! ftp.cwi.nl:/pub/audio/NIST-SPHERE. *************** *** 615,619 **** A compressed tar file containing the same version of SOX is available ! by anonymous ftp from ftp.cwi.nl [192.16.184.180], in directory ! /pub/audio/sox7.tar.Z. You may be able to locate a nearer version ! using archie! --- 629,633 ---- A compressed tar file containing the same version of SOX is available ! by anonymous ftp from ftp.cwi.nl, in directory ! /pub/audio/sox.tar.Z. You may be able to locate a nearer ! version using archie! *************** *** 693,699 **** ! The Tandy 1000 uses a (proprietary?) compressed format. There is a PD ! Mac to Tandy conversion program called CONVERT. Leonard Erickson ! writes: There is a WAV driver from Tandy ! if people ask. There also appears to be a program that purports to ! convert other formats to Tandy, but I haven't tested this one yet. --- 707,743 ---- ! The Tandy uses a proprietary format, which can use compression ! (see appendix). Jeffrey L. Hayes writes: ! ! There is in fact a Windows 3.1 sound driver for the Tandy 2500-series ! available from Radio Shack. My informant says: "Say that you have a ! 2500SX/33 and you lost your Windows Utilities/Drivers disk. The cost is ! $5.00." (The driver will work on any 2500.) ! ! Version 2.00 of Conv2snd by Kenneth Udut by Kenneth Udut is now on ! Simtel. It converts any 8-bit mono unsigned PCM file to Tandy ! DeskMate .snd format. The new version recognizes RIFF WAVE headers ! and comes with a utility to convert .snd to .wav, Snd2wav. ! ! In addition to the .snd format used by Sound.pdm, Tandy used an .sng format ! with Music.pdm for song files. .sng files are analogous to Amiga .mod ! files, but they contain only the sequencing information. The samples are ! expected to be in .snd files in the current directory for Music.pdm. It ! should be possible to convert .sng to .mod - when I get around to it! ! ! I am collecting information and programs for the Tandy DAC chip. I have ! written a DOS .wav player for the Tandy DAC, as well as a program to make ! the Tandy DAC emulate a Covox DAC for use with programs that support the ! Covox or a DAC on a parallel port. Those interested may write to me and ! ask for the "Tandy DAC package" - help is needed! The package includes ! source code and programming information on the Tandy chip. A DOS .wav ! recorder and an Amiga .mod player for the Tandy DAC are in progress. There ! are two other programs (to my knowledge) to record and play back sounds on ! a Tandy - Sampler and Tndsnd. These programs are on Delphi but not on the ! Internet as far as I know; users not on Delphi can write to me and ask for ! them. Those wishing to make a public announcement regarding the Tandy DAC ! should post to comp.sys.tandy. ! ! Tandy now includes Soundblaster support in its machines. New Tandy's do ! not have the proprietary Tandy DAC. ! *************** *** 846,848 **** AL-capable systems (e.g., Indigo, Indy). The source kit is located at ! ftp site crl.dec.com [192.58.206.2] in /pub/DEC/AF. --- 890,892 ---- AL-capable systems (e.g., Indigo, Indy). The source kit is located at ! ftp site crl.dec.com in /pub/DEC/AF. *************** *** 851,855 **** interface (they claim it should be easy to port). The source it ! located at ftp.x.org [198.112.44.100] in contrib/netaudio. It is also ! ported to SGI (tested on IRIX 5.x), and there are unconfirmed rumors ! that it is being ported to SCI and Linux. --- 895,899 ---- interface (they claim it should be easy to port). The source it ! located at ftp.x.org in contrib/netaudio. It is also ported to SGI ! (tested on IRIX 5.x), and there are unconfirmed rumors that it is ! being ported to SCI and Linux. *************** *** 936,938 **** For sounds on Atari STs - programs are in the atari/sound/players ! directory on atari.archive.umich.edu (141.211.164.8). --- 980,982 ---- For sounds on Atari STs - programs are in the atari/sound/players ! directory on atari.archive.umich.edu. *************** *** 966,969 **** ! This software is available for anonymous FTP from ftp.apple.com ! [IP address 130.43.2.3 -- Guido]. Look for ~ftp/pub/TcpPlay/TcpPlay.sit.hqx. --- 1010,1012 ---- ! This software is available for anonymous FTP from ftp.apple.com. Look for ~ftp/pub/TcpPlay/TcpPlay.sit.hqx. *** 1.6 1994/02/22 10:41:20 --- audio.part2 1994/08/01 08:44:55 *************** *** 8,11 **** Submitted-by: Guido van Rossum ! Version: 3.05 ! Last-modified: 27-Sep-1993 --- 8,11 ---- Submitted-by: Guido van Rossum ! Version: 3.09 ! Last-modified: 1-Aug-1994 *************** *** 32,34 **** --- 32,38 ---- The Amiga MOD Format + The Sample Vision Format + Some Miscellaneous Formats + Tandy Deskmate .snd Format Notes + ------------------------------------------------------------------------ *************** *** 65,69 **** it's the same text as mentioned below) available by anonymous ftp from ! ftp.cwi.nl [192.16.184.180]; the file is /pub/audio/AudioIFF1.2.hqx. ! A newer version is also available: /pub/audio/AudioIFF1.3.hqx. ! But you may be better off with the AIFF-C specs, see below. --- 69,73 ---- it's the same text as mentioned below) available by anonymous ftp from ! ftp.cwi.nl; the file is /pub/audio/AudioIFF1.2.hqx. A newer version ! is also available: /pub/audio/AudioIFF1.3.hqx. But you may be better ! off with the AIFF-C specs, see below. *************** *** 81,83 **** A PostScript version of the AIFF-C specification is available via ! anonymous ftp on FTP.SGI.COM (192.48.153.1) as /sgi/aiff-c.9.26.91.ps. --- 85,87 ---- A PostScript version of the AIFF-C specification is available via ! anonymous ftp on ftp.sgi.com as /sgi/aiff-c.9.26.91.ps. *************** *** 88,92 **** contained in the file AIFF.h in the "Apple #Includes" folder that comes ! on the distribution disks. I found this out a little too late: I had ! already coded my own structures. I assume that this header file comes ! with Apple programming products like MPW [C|C++] as well. --- 92,98 ---- contained in the file AIFF.h in the "Apple #Includes" folder that comes ! on the distribution disks. I assume that this header file comes with ! Apple programming products like MPW [C|C++] as well. I found this out a ! little too late: I had already coded my own structures. These structures ! of mine, along with other useful code for AIFF-based DSP in C, are ! available for ftp at ftp.cs.jhu.edu in pub/dsp. *************** *** 518,521 **** ! The documentation is at grind.isca.uiowa.edu [128.255.19.233], in the ! directory /amiga/f1/ff185. The complete file list is as follows: --- 524,527 ---- ! The documentation is at grind.isca.uiowa.edu, in the directory ! /amiga/f1/ff185. The complete file list is as follows: *************** *** 652,654 **** We have placed an updated version of the FS-1016 CELP 3.2 code in the ! anonymous FTP area on super.org (192.31.192.1). It's in: --- 658,660 ---- We have placed an updated version of the FS-1016 CELP 3.2 code in the ! anonymous FTP area on super.org. It's in: *************** *** 827,838 **** ! And here's a pointer to the official description from Matt Saettler, ! Microsoft Multimedia: ! ! "The complete definition of the WAVE file format as defined by ! IBM/Microsoft is available for anon. FTP from ftp.uu.net in the ! vendor/microsoft/multimedia directory." - (Rob Ryan's version may actually be an extract from one of the files - stored there.) - ------------------------------------------------------------------------ --- 833,839 ---- ! The complete definition of the WAVE file format as defined by IBM and ! Microsoft is available for anonymous FTP from ftp.microsoft.com, in ! directory developer/MSDN/CD8 as file RIFFNE.ZIP, which contains a MS ! help file (riffne.hlp). ------------------------------------------------------------------------ *************** *** 1196 **** --- 1197,1527 ---- ----------------------------------------------------------------------- + The Sample Vision Format + ------------------------ + + From: "tim.dorcas@enest.com" + + First, Sample Vision is a program used by professional musicians to + send and receive samples via a MIDI interface to the PC. While on the + PC, you can edit several parameters including loop points, pitch, time + compression, normalize, sample rate, ect. The list of supported + samplers include: AKAI {S700,X700,S900, S950,S612,S1000/1100}, + Casio{FZ1,FZ10M,FZ20M}, Ensoniq{EPS,EPS16,ASR10,Mirage}, + Emu{Emax,EmaxII}, Korg{DSS1,DSM1,T workstation}, Oberheim DPX-1, + Peavey DPM-3, Roland {S10,MKS100,S220,S50,S330,S550}, Sequential + Circuits Prophet 2000/2002, Sample Dump Standard devices, Yamaha + TX16W. + + The .smp format breaks down like this: + + Offset Size Description + 000 18 'SOUND SAMPLE DATA ' ASCII FILE ID + 0018 04 '2.1 ' ASCII FILE VERSION + 0022 60 USER COMMENTS 60 ASCII CHARACTERS + 0082 30 SAMPLE NAME LEFT JUSTIFIED 30 ASCII CHARACTERS + 0112 04 SAMPLE SIZE SAMPLE DATA COUNT IN WORDS + 0116 ?? SAMPLE DATA 1 WORD PER SAMPLE, LEAST SIGNIFICANT BYTE + FIRST, LSW FIRST; SIGNED 16 BIT INTEGERS + + ?? 02(DW) RESERVED + ?? 04(DD) LOOP 1 START USE SAMPLE COUNT NOT BYTE COUNT + ?? 04(DD) LOOP 1 END + ?? 01(DB) LOOP 1 TYPE 0=LOOP OFF,1=FORWARD,2=FORWARD/BACKWARD + ?? 02(DW) LOOP 1 COUNT TIMES TO EXECUTE LOOP BEFORE NEXT LOOP + + THERE ARE SEVEN MORE IDENTICAL LOOP STRUCTURES FOR A TOTAL OF 8 + + ?? 10 MARKER 1 NAME ASCII MARKER NAME + ?? 04(DD) MARKER 1 POSITION FFFF MEANS UNUSED + + THER ARE SEVEN MORE IDENTICAL MARKER STRUCTURES FOR A TOTAL OF 8 + + ?? 01(DB) MIDI UNITY PLAYBACK NOTE MIDI NOTE TO PLAY + THE SAMPLE AT ITS + ORIGINAL PITCH + ?? 04(DD) SAMPLE RATE IN HERTZ + ?? 04(DD) SMPTE OFFSET IN SUBFRAMES + ?? 04(DD) CYCLE SIZE SAMPLE COUNT IN ONE CYCLE OF + THE SAMPLED SOUND. -1 IF UNKNOWN + + (DD) 4 BYTES, LS BYTE FIRST, LS WORD FIRST + (DW) 2 BYTES, LS BYTE FIRST + (DB) 1 BYTE + + That's about it. One thing I have noticed is that Sample Vision only + writes seven loop structures to file as opposed to the eight + structures it claims are written. + ----------------------------------------------------------------------- + Some Miscellaneous Formats + -------------------------- + + From: bil@ccrma.Stanford.EDU (Bill Schottstaedt) + + I thought you might find some of this information amusing -- a few + header formats I didn't find in your great audio file formats + documentation. Some taken from the AFsp sources, or sox, or + local ancient documentation. I also have short descriptions + of BICSF, NeXT/Sun, AIFF, RIFF, SMP, VOC, and so on, plus + full descriptions of the 2 Sound Designer formats, if you're + interested. + + + /* ------------------------------------ NIST --------------------------------- + + * + + * 0: "NIST_1A" + * 8: data_location as ASCII representation of integer + * (apparently always " 1024") + * 16: start of complicated header -- full details available upon request + * + * here's an example: + * + * NIST_1A + * 1024 + * database_id -s5 TIMIT + * database_version -s3 1.0 + * utterance_id -s8 aks0_sa1 + * channel_count -i 1 + * sample_count -i 63488 + * sample_rate -i 16000 + * sample_min -i -6967 + * sample_max -i 7710 + * sample_n_bytes -i 2 + * sample_byte_format -s2 01 + * sample_sig_bits -i 16 + * end_head + */ + /* ------------------------------------ SNDT --------------------------------- + * + * this taken from sndrtool.c (sox-10): + * 0: "SOUND" + * 6: 0x1a + * 8-11: 0 + * 12-15: nsamples + * 16-19: 0 + * 20-23: nsamples + * 24-25: srate + * 26-27: 0 + * 28-29: 10 + * 30-31: 4 + * 32-> : "- File created by Sound Exchange" + * .->95: 0 + */ + /* ------------------------------------ ESPS --------------------------------- + + * + * 16: 0x00006a1a or 0x1a6a0000 + * 136: if not 0, chans + format = 32-bit float + * 144: if not 0, chans + format = 16-bit linear + * + + * from AFgetInfoES.c: + * + + * Bytes Type Contents + * 8 -> 11 -- Header size (bytes) + * 12 -> 15 int Sampled data record size + * 16 -> 19 int File identifier + * 40 -> 65 char File creation date + * 124 -> 127 int Number of samples (may indicate zero) + * 132 -> 135 int Number of doubles in a data record + * 136 -> 139 int Number of floats in a data record + * 140 -> 143 int Number of longs in a data record + * 144 -> 147 int Number of shorts in a data record + * 148 -> 151 int Number of chars in a data record + * 160 -> 167 char User name + * 333 -> H-1 -- Generic header items, including "record_freq" + * {followed by a "double8"} + * H -> ... -- Audio data + */ + /* ------------------------------------ INRS --------------------------------- + + * + + * from AFgetInfoIN.c: + * + + * INRS-Telecommunications audio file: + * Bytes Type Contents + * 0 -> 3 float Sampling Frequency (VAX float format) + * 6 -> 25 char Creation time (e.g. Jun 12 16:52:50 1990) + * 26 -> 29 int Number of speech samples in the file + * The data in an INRS-Telecommunications audio file is in 16-bit integer + * format. + * + + */ + /* old Mus10, SAM formats, just for completeness + * + * These were used for sound data on the PDP-10s at SAIL and CCRMA in the + * 70's and 80's. + * The word length was 36-bits. + * + * "New" format as used by nearly all CCRMA software pre-1990: + * + * WD 0 - '525252525252 + * WD 1 - Clock rate in Hz (PDP-10 36-bit floating point) + * WD 2 - #samples per word,,pack-code + * (has # samples per word in LH, pack-code in RH) + * 0 for 12-bit fixed point + * 1 for 18-bit fixed point + * 2 for 9-bit floating point incremental + * 3 for 36-bit floating point + * 4 for 16-bit sambox fixed point, right justified + * 5 for 20-bit sambox fixed point + * 6 for 20-bit right-adjusted fixed point (sambox SAT format) + * 7 for 16-bit fixed point, left justified + * N>9 for N bit bytes in ILDB format + * WD 3 - # channels + * 1 for MONO + * 2 for STEREO + * 4 for QUAD + * WD 4 - Maximum amplitude (if known) + * is a floating point number + * is zero if not known + * is maximum magnitude (abs value) of signal + * WD 5 number of Sambox ticks per pass + * (inverse of Sambox clock rate, sort of) + * WD 6 - Total #samples in file. + * If 0 then #wds_in_file*#samps_per_wd assumed. + * WD 7 - Block size (if any). 0 means sound is not blocked. + * WDs '10-'77 Reserved for EDSND usage + * WDs '100-'177 Text description of file (in ASCIZ format) + * + * + * "Old" format + * + * WD 0 - '525252525252 + * WD 1 - Clock rate + * has code in LH, actual INTEGER rate in RH + * code=0 for 6.4Kc (or anything else) + * =1 for 12.8Kc, =2 for 25.6Kc, =3 for 51.2Kc + * =5 for 102.4Kc, =6 for 204.8Kc + * WD 2 - pack + * 0 for 12 bit + * 1 for 16 bit (18 bit) + * 2 for 9 bit floating point incremental + * 3 for 36-bit floating point + * N>9 for N bit bytes in ILDB format + * has # samples per word in LH. + * WD 3 - # channels + * 1 for MONO + * 2 for STEREO + * 4 for QUAD + * WD 4 - Maximum amplitude (if known) + * is a floating point number + * is zero if not known + * is maximum magnitude (abs value) of signal + * WDs 5-77 Reserved for future expansion + * WDs 100-177 Text description of file (in ASCIZ format) + */ + + ----------------------------------------------------------------------- + Tandy Deskmate .snd Format Notes + -------------------------------- + + From: Jeffrey L. Hayes + + Tandy .snd files are created by Sound.pdm, a program that came with the + proprietary DeskMate environment. They are used by Music.pdm to create + music modules (.sng files). DeskMate Sound and Music require the Tandy + sound chip. There is a program to convert RIFF WAVE and other 8-bit PCM + formats to .snd, Conv2snd, by Kenneth Udut. Conv2snd v.2.00 comes with + Snd2wav, which converts .snd to RIFF WAVE. + + There are two types of DeskMate .snd files, sound files and instrument + files. Both contain 8-bit unsigned PCM samples. + + Sound files are simpler. These are garden-variety sample files with a + fixed-length header giving the name of the sound, the recording frequency, + and the length of the sound. Sound files may be recorded at 5500Hz, 11kHz + or 22kHz. + + Instrument files contain samples as well as frequency and looping + information used by Music.pdm to represent an instrument. Instrument files + provide for attack, sustain, and decay with several samples having + different implied frequencies and being used by Music.pdm to represent the + instrument in different pitch ranges. Up to 16 different notes (with 16 + different samples) can be contained in one instrument file. Instrument + files are always recorded at 11kHz. Both sound files and instrument files + may be compressed in one of two ways, "music" compression or "speech" + compression, or they may be uncompressed. I don't know the compression + algorithms, but simple file comparison reveals that "music" and "speech" + compression are almost identical. + + The DeskMate .snd file header consists of 16 bytes of fixed header + information followed by one or more 28-byte note records. The sample + information, which may be compressed, follows the header. + + DeskMate .snd File Format - Fixed Header + ---------------------------------------- + + offset size what + ------ ---- ---- + + 0 byte 1Ah (.snd ID byte) + + 1 byte Compression code: 0 = no compression; 1 = music + compression; 2 = sound compression. + + 2 byte Number of notes in the instrument file. 1 if sound + file. + + 3 byte Instrument number. 0 if sound file; 0FFh if instrument + file with no number set. Valid instrument numbers in + an instrument file are 1 to 32. Use this field to + distinguish a sound file from an instrument file. + + 4 10 bytes Sound or instrument name. Filled on the right with + nulls if less than 10 characters. + + 0Eh word Sampling rate in samples per second. Note that although + a sampling rate other than 5500, 11000 and 22000 can be + entered here, Sound.pdm will not actually play at other + rates. + + 10h variable Note records begin, 28 bytes each. Number of records + given in byte 2 above. + + + DeskMate .snd File Format - Note Record + --------------------------------------- + + 0 byte Pitch of the note: 1 = A1 in American Standard Pitch; + 2 = A#1; etc. A1 is lowest note allowed; highest note + allowed is B6 (3Fh). Sound files have 0FFh here; so do + instrument files with no note set. + Note that Sound.pdm does not designate notes in the + standard manner to the user. Although A1 and B6 in + Sound.pdm are the same as A1 and B6 in standard pitch, + Sound.pdm starts octaves at A rather than at C (as is + standard). Thus, middle C, C4 in standard pitch, is C3 + in Sound.pdm. + + 1 byte Sound files, and instrument files with no pitch set, + have 0 here. If the pitch is set, this byte is 0FFh. + + 2 2 bytes Range of the note, first byte is lower limit, second + is higher limit. Byte encoding as for offset 0 (i.e., + 01h to 3Fh). Sound files have FF FF here; so do + instrument files with no range set. + + 4 dword Offset in the file where samples for this note begin + (zero-relative), after compression if that was done. + + 8 dword If compressed, the length of the compressed data in the + file for this note. Uncompressed files have 0 here. + + 0Ch 4 bytes Unknown. Set to zero. + + 10h dword Number of samples in the note, after decompression if + necessary. + + 14h dword Number of sample at start of sustain region for the + note, relative to the first (zeroth) sample of the note. + For sound files, or if sustain is not set, this field is + 0. + + 18h dword Number of sample at end of sustain region for the note, + relative to the first (zeroth) sample of the note. For + sound files, or if sustain is not set, this field is 0.