The AVR format is quite popular (used by a number of commercial packages) on the Atari ST and Apple Macintosh platforms. The AVR format defines a fixed 128-byte file header that is described in the C-language data structure shown in Figure 2. Note that there are fields in the figure that correspond roughly to all the fields of the NeXT/Sun format header, with the addition of several new fields, such as those that define loop points within a sampled sound and a MIDI note assignment.
Figure 2. The AVR sound file header data structure.
/* AVR Format Header Data Structure-128 Bytes */
typedef struct {
char magic[4]; /* Magic number = "2BIT" */
char name[8]; /* Sample name (null-padded string) */
short mono; /* Number of channels-mono/stereo */
short rez; /* Sample resolution-8/16-bit */
short sign; /* Sample format-signed/unsigned */
short loop; /* Loop mode-on/off */
short midi; /* MIDI note assign or keyboard split */
long rate; /* Sample frequency in Hz */
long size; /* Data length in samples */
long lbeg; /* Offset to start of loop-0 if unused. */
long lend; /* Offset to end of loop-0 if unused. */
short resl; /* Reserved, MIDI keyboard split */
short res2; /* Reserved, sample compression */
short res3; /* Reserved */
char ext[20]; /* Longer name space (if name[7] != 0) */
char user[64]; /* User-defined; typically ASCII */
} AVRHeader
These additional fields make AVR more powerful when used to store sound samples for use with a sampling synthesizer. A sound can be assigned to a given MIDI key, and can have two pointers into its sample data that determine where the sound is to loop, in case it is sustained for longer than its recorded duration on a sampler.
[ Index | Main Paragraph | Previous Paragraph | Next Paragraph ]