[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New csa2 FAQs: F002s3SOUND (Part 2 of 2)
8 8SVX
The 8SVX files are IFF files used for digital audio data. The format of
the VHDR block is complete guesswork. These files use Motorola byte
order. The 8SVX file format is fixed to 8-bit mono sample data - at
least GoldWave does not support saving files in any other format than
8-bit mono.
8.1 FORMblock [VHDR]
This is the sample information block. The normal size is 20 bytes.
OFFSET
Count
TYPE
Description
0000h
1
dword
Sampling rate of digital data in Hz. This count seems not to
be too accurate, at least GoldWave v2.0 creates different
rates for Wave and 8SVX files.
0004h
4
dword
Other data, unknown
8.2 FORMblock [BODY]
This block contains the raw sample data, maybe the usual IFF compression
was used. The details of both the compression and the information about
the IFF format are unknow.
9 AIFF
The Audio Interchangeable File Format files are digital audio files
stored in the IFF format; the samples are stored in signed PCM. The
header block is [AIFF], different subblocks are :
[AUTH]
The authors information optional
[COMM]
This record stores information about the sampled data
OFFSET
Count
TYPE
Description
0000h
1
word
number of channels or number of instrument samples ???
0002h
1
dword
Sample length
0006h
1
dword
lower frequency
000Ah
1
dword
maximum frequency
000Dh
1
dword
???
[MARK]
[NAME]
The name of the instrument / sample
[SSND]
The stored sample data.
10 AU
The AU files are digital audio files used by the Sun and NeXT
workstations. Further information wanted.
OFFSET
Count
TYPE
Description
0000h
4
char
ID='.snd'
0004h
1
dword
Offset of start of sample
0008h
1
dword
Length of stored sample
000Ch
1
dword
Sound encoding :
1 - 8-bit ISDN u-law,
2 - 8-bit linear PCM (REF-PCM),
3 - 16-bit linear PCM,
4 - 24-bit linear PCM,
5 - 32-bit linear PCM,
6 - 32-bit IEEE floating point,
7 - 64-bit IEEE floating point,
23 - 8-bit ISDN u-law compressed(G.721 ADPCM)
0010h
1
dword
Sampling rate
0014h
1
dword
Number of sample channels
11 FSM
The .FSM files are samples to be used for module style music with the
Fandarole Composer. Currently only samples of up to 64K length are
supported, altough the header reserves a dword for the sample size.
OFFSET
Count
TYPE
Description
0000h
4
char
ID='FSM',254
0004h
32
char
ASCII name of sample
0024h
3
char
ID=10,13,26
0027h
1
dword
Length of sample (<=64K)
0028h
1
byte
Fine tune value for sample (currently unsupported)
0029h
1
byte
Sample volume (currently unsupported)
002Ah
1
dword
Start of sample loop
002Dh
1
dword
End of sample loop. If the sample is not set to loop (see below)
this should be set to the end of the sample.
0032h
1
byte
Sample type bitmapped
0 - 8-bit/16-bit sample
1-7 - reserved
0033h
1
byte
Loop mode ?bit mapped?
0-2 - reserved
3 - loop off/loop on
4-7 - reserved
0034h
?
byte
Sample data in signed format
12 GF1 PATCH
The GF1 Patch files are multipart sound files for the Gravis Ultrasound
sound card to emulate MIDI sounds in high quality. Each Patch can
consist of many samples (for example, a string ensemble consists of
Violin, Viola, Cello, Bass) which are played depending on the note to
play. A patch can also
contain a part to be played before the loop and a part to be played
after the tone has been released.
OFFSET
Count
TYPE
Description
0000h
12
char
ID='GF1PATCH110'
000Ch
10
char
Manufacturer ID
0018h
60
char
Description of the contained Instruments or copyright of
manufacturer.
0054h
1
byte
Number of instruments in this patch
0055h
1
byte
Number of voices for sample
0056h
1
byte
Number of output channels (1=mono,2=stereo)
0057h
1
word
Number of waveforms
0059h
1
word
Master volume for all samples
005Bh
1
dword
Size of the following data
0060h
36
byte
reserved
Following this header, the instruments with their headers follow. An
instrument header contains the
name and other data about one instrument contained within the patch.
OFFSET
Count
TYPE
Description
0000h
1
word
Instrument number. ?Maybe the MIDI instrument number?. In the
Gravis patches, this is 0, in other patches, I found random values.
0002h
16
char
ASCII name of the instrument.
0012h
1
dword
Size of the whole instrument in bytes.
0016h
1
byte
Layers. Needed for whatever.
0017h
40
byte
reserved
About the patch, I don't know anything. Maybe somebody could enlighten
me. Each patch record has the following format :
OFFSET
Count
TYPE
Description
0000h
7
char
Wave file name
0007h
1
byte
Fractions
0008h
1
dword
Wave size. Size of the wave digital data
000Ch
1
dword
Start of wave loop
0010h
1
dword
End of wave loop
0012h
1
word
Sample rate of the wave
0014h
1
word
Minimum frequency to play the wave
0016h
1
word
Maximum frequency to play the wave
0018h
1
dword
Original sample rate of the wave data
001Ch
1
int
Fine tune value for the wave
001Eh
1
byte
Stereo balance, values unknown**
001Fh
6
byte
Filter envelope rate
0025h
6
byte
Filter envelope offse
002Bh
1
byte
Tremolo sweep
002Ch
1
byte
Tremolo rate
002Dh
1
byte
Tremolo depth
002Fh
1
byte
Vibrato sweep
0030h
1
byte
Vibrato rate
0031h
1
byte
Vibrato depth
0032h
1
byte
Wave data, bitmapped
0 - 8/16 bit wave data
1 - signed/unsigned data
2 - de/enable looping
3 - no/has bidirectional looping
4 - loop forward/backward
5 - Turn envelope sustaining off/on
6 - Dis/Enable filter envelope
7 - reserved
0033h
1
int
Frequency scale, whatever that means
0035h
1
word
Frequency scale factor
0037h
36
byte
Reserved
13 S3I
This is the Digiplayer/ST3.0 digital sample file format. The sample
files include information about the loop of the instrument. The AdLib
instruments have another format listed below.
OFFSET
Count
TYPE
Description
0000h
1
byte
ID=01h
0001h
12
char
DOS filename
000Dh
1
byte
reserved (0)
000Eh
1
word
Paragraph offset of the raw sample data from beginning of file.
0010h
1
dword
Sample length in bytes
0014h
1
dword
Start of sample loop
0018h
1
dword
End of sample loop
001Ch
1
byte
Playback volumne of sample
001Dh
1
byte
??? "DSK" what ever that means
001Eh
1
byte
Pack type
0 - unpacked
1 - DP30ADPCM 1
001Fh
1
byte
Flags (bitmapped)
0 - loop on/off
1 - stereo sample (length bytes for left channel,
then another length bytes for right channel!)
2 - 16-Bit samples (in Intel byte order)
0020h
1
dword
C2 frequency
0024h
1
dword
reserved
0028h
1
word
reserved
002Ah
1
word
ID=512
002Ch
1
dword
?? Date of last modification ?? (see table 0009)
0030h
28
char
ASCIIZ Sample name
003Ch
4
char
ID='SCRS'
0040h
?
byte
Raw sample data
Here follows the AdLib instrument format for which I don't know the
extension:
OFFSET
Count
TYPE
Description
0000h
1
byte
Instrument type
2 - melodic instrument
3 - bass drum
4 - snare drum
5 - tom tom
6 - cymbal
7 - hihat
0001h
12
char
DOS file name
000Dh
3
byte
reserved
0010h
1
byte
Modulator description (bitmapped)
0-3 - frequency multiplier
4 - scale envelope
5 - sustain
6 - pitch vibrato
7 - volume vibrato
0011h
1
byte
Carrier description (same as modulator)
0012h
1
byte
Modulator miscellaneous (bitmapped)
0-5 - 63-volume
6 - MSB of levelscale
7 - LSB of levelscale
0013h
1
byte
Carrier description (same as modulator)
0014h
1
byte
Modulator attack / decay byte (bitmapped)
0-3 - Decay
4-7 - Attack
0015h
1
byte
Carrier description (same as modulator)
0016h
1
byte
Modulator sustain / release byte (bitmapped)
0-3 - Release count
4-7 - 15-Sustain
0017h
1
byte
Carrier description (same as modulator)
0018h
1
byte
Modulator wave select
0019h
1
byte
Carrier wave select
001Ah
1
byte
Modulator feedback byte (bitmapped)
0 - additive synthesis on/off
1-7 - modulation feedback
001Bh
1
byte
reserved
001Ch
1
byte
Instrument playback volume
001Dh
1
byte
??? "DSK"
001Eh
1
word
reserved
0020h
1
dword
C2 frequency
0024h
12
byte
reserved
0030h
28
char
ASCIIZ Instrument name
004Ch
4
char
ID='SCRI'
14 UWF
The UWF files are sample files used by the UltraTracker. Further
information wanted.
OFFSET
Count
TYPE
Description
0000h
32
char
ASCIIZ sample name
0020h
1
char
ID=1Ah
0021h
1
char
ID=10h
0022h
5
char
ID='MUWFB'
0027h
1
char
ID=0
0028h
6
char
Length of sample as ASCII long integer
002Eh
1
word
Length of sample
15 WAVE
The Windows .WAV files are RIFF format files. Some programs expect the
fmt block right behind the RIFF header itself, so your programs should
write out this block as the first block in the RIFF file. The subblocks
for the wave files are:
15.1 RiffBLOCK [data]
This block contains the raw sample data. The necessary information for
playback is contained in the
[fmt ] block.
15.2 RiffBLOCK [fmt ]
This block contains the data necessary for playback of the sound files.
Note the blank after fmt.
OFFSET
Count
TYPE
Description
0000h
1
word
Format tag
1 = PCM (raw sample data)
2 etc. for APCDM, a-Law, u-Law ...
0002h
1
word
Channels (1=mono,2=stereo,...)
0004h
1
dword
Sampling rate
0008h
1
dword
Average bytes per second (=sampling rate*channels)
000Ch
1
word
Block alignment / reserved ??
000Eh
1
word
Bits per sample (8/12/16-bit samples)
15.3 RiffBLOCK [loop]
This block is for looped samples. Very few programs support this block,
but if your program changes the wave file, it should preserve any
unknown blocks.
OFFSET
Count
TYPE
Description
0000h
1
dword
Start of sample loop
0004h
1
dword
End of sample loop
16 ZyXEL
The ZyXEL Modems are capable of digitizing speech, the ZFAX software and
answering machine software like VoiceConnect store the sampled data in
those files. The Modems are capable of compressing the data down to
19.2k CPS (ADPCM) and 9.6k CPS (CELP), the algorithms for the
compression may be found in the ZyxelVoc package by N. Igl, but as the
firmware on the modems changes, so might the compression algorithm.
Playback on the modem is always possible. Files are specified by the
.ZVD and .ZYX extensions.
OFFSET
Count
TYPE
Description
0000h
5
char
ID='ZyXEL'
0005h
1
byte
02h, ??? format tag
0006h
4
byte
reserved
000Ah
1
word
Compression scheme
0 - CELP
1 - 2 bit ADPCM
2 - 3 bit ADPCM
000Ch
4
byte
reserved
0010h
?
????
Raw Data, The voice data is just the data received from U1496
Modem/Fax.
17 Creative Labs File Formats
17.1 Sound Blaster Instrument File Format (SBI)
The SBI format contains the register values for the FM chip to
synthesize an instrument.
Offset
Description
00h-03h
Contains id characters "SBI" followed by byte 1Ah
04h-23h
Instrument name, NULL terminated string
24h
Modulator Sound Characteristic (Mult, KSR, EG, VIB, AM)
25h
Carrier Sound Characteristic
26h
Modulator Scaling/Output Level
27h
Carrier Scaling/Output Level
28h
Modulator Attack/Delay
29h
Carrier Attack/Delay
2Ah
Modulator Sustain/Release
2Bh
Carrier Sustain/Release
2Ch
Modulator Wave Seelct
2Dh
Carrier Wave Select
2Eh
Feedback/Connection
2Fh-33h
Reserved
17.2 Creative Music File Format (CMF)
The CMF file format consists of 3 blocks: the header block, the
instrument block and the music block.
The CMF Header Block
Offset
Description
00h-03h
Contains id characters "CTMF"
04h-05h
CMF Format Version MSB = major version, lsb = minor version
06h-07h
File offset of the instrument block
08h-09h
File offset of the music block
0Ah-0Bh
Clock ticks per quarter note (one beat) default = 120
0Ch-0Dh
Clock ticks per second
0Eh-0Fh
File offset of the music title (0 = none)
10h-11h
File offset of the composer name (0 = none)
12h-13h
File offset of the remarks (0 = none)
14h-23h
Channel-In-Use Table
24h-25h
Number of instruments used
26h-27h
Basic Tempo
28h-?
Title, composer and remarks stored here
17.3 The CMF Instrument Block
The instrument block contains one 16 byte data structure for each
instrument in the piece. Each record is of the same format as bytes
24h-33h in the SBI file format.
17.4 The CMF Music Block
The music block adheres to the standard MIDI file format, and can have
from 1 to 16 instruments. The PC-GPE file MIDI.TXT contains more
information on this file format.
The music block consists of an alternating seqence of time and MIDI
event records:
dTime
MIDI Event
dTime
MIDI Event
dTime
MIDI Event
........
dTime (delta Time) is the amount of time before the following MIDI
event. MIDI Event is any MIDI channel message.
The CMF file format defines the following MIDI Control Change events:
Control No
Control Data
66h
1-127, used as markers in the music
67h
0 - melody mode, 1 = rhythm mode
68h
0-127, changes the pitch of all following notes upward by the given
number of 1/128
semitones
69h
0-127, changes the pitch of all following notes downward by the given
number of
1/128 semitones
In rhythm mode, the last five channels are allocated for the percussion
instruments:
Channel
Instrument
12h
Bass Drum
13h
Snare Drum
14h
Tom-Tom
15h
Top Cymbal
16h
High-hat Cymbal
17.5 Sound Blaster Instrument Bank File Format (IBK)
A bank file is a group of up to 128 instruments.
Offset
Description
00h-03h
Contains id characters "IBK" followed by byte 1Ah
04h-803h
Parameters for 128 instruments, 16 bytes for each instrument in the same
format
as bytes 24h-33h in the SBI format
804h-C83h
Instrument names for 128 instruments, 9 bytes for each instrument, each
name
must be null terminated
18 Creative Voice (VOC) file format
HEADER (bytes 00-19)
Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]
byte #
Description
00-12
"Creative Voice File"
13
1A (eof to abort printing of file)
14-15
Offset of first datablock in .voc file (std 1A 00 in Intel Notation)
16-17
Version number (minor,major) (VOC-HDR puts 0A 01)
18-19
2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)
Data Block: TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
NOTE: Terminator Block is an exception -- it has only the TYPE byte.
TYPE
Description
Size (3-byte int)
Info
00
Terminator
(NONE)
(NONE)
01
Sound data
2+length of data
*
02
Sound continue
length of data
Voice Data
03
Silence
3
**
04
Marker
2
Marker# (2 bytes)
05
ASCII
length of string
null terminated string
06
Repeat
2
Count# (2 bytes)
07
End repeat
0
(NONE)
08
Extended
4
***
*Sound Info Format:
**Silence Info Format:
00 Sample Rate
00-01 Length of silence - 1
01 Compression Type
02 Sample Rate
02+ Voice Data
***Extended Info Format:
00-01
Time Constant:
Mono: 65536 - (256000000/sample_rate)
Stereo: 65536 - (25600000/(2*sample_rate))
02
Pack
03
Mode:
0 = mono
1 = stereo
Marker#
Driver keeps the most recent marker in a status byte
Count#
Number of repetitions + 1 Count# may be 1 to FFFE for 0 - FFFD
repetitions or FFFF for endless repetitions
Sample Rate
SR byte = 256-(1000000/sample_rate)
Length of silence
in units of sampling cycle
Compression Type
of voice data
8-bits= 0
4-bits = 1
2.6-bits = 2
2-bits = 3
Multi DAC = 3+(# of channels)
[interesting this isn't in the developer's manual]
19 Revision History
Version 1.0 - First document containing 15 formats
Version 1.1 - 2 More formats added