5 ** $VER: Studio16fileformat 2.0 (9.11.97)
7 ** The STUDIO16_2.0 format (KWK3)
9 ** Analysed by Kenneth "Kenny" Nilsen
10 ** mailto:kenny@bgnett.no
14 #include <exec/types.h>
19 #define S16FID 0x4B574B33 /* "KWK3" */
22 /* File header structure
25 * SAMPLES (samples x 16bit)
28 #define S16FILEHEADERSIZE 3690
30 /* I am no C programmer so please let me know if this one is incorrect: */
34 ULONG S16F_ID
; /* FILE HEADER ID (K16FID) */
35 ULONG S16F_RATE
; /* sample rate */
36 ULONG S16F_FILTER
; /* Init with $1 (K16FINIT) */
37 UWORD S16F_VOLUME
; /* sample volume */
38 ULONG S16F_SMPTE
; /* SMPTE timecode (H:B M:B S:B F:B) */
39 ULONG S16F_SMPTEFLOAT
; /* SMPTE sampling rate */
40 ULONG S16F_PAN
; /* pan setting */
41 LONG S16F_FLAGS
; /* misc flags */
44 /* here follows the sampleclips */
46 ULONG S16F_SAMPLES0
; /* number of samples (bytesize/2) */
47 ULONG S16F_SAMPLES1
; /* number of samples */
48 ULONG S16F_0
; /* start of first range [main] */
49 ULONG S16F_SAMPLES2
; /* number of samples-1 (end) */
50 ULONG S16F_EDITSTATUS
; /* if =null then no edits in file */
52 /* LABEL S16F_SIZEOF */ /* =3690 */
55 /* Sample rates for Studio 16: */
57 #define S16_FREQ_0 0x1589 /* 5513 hz */
58 #define S16_FREQ_1 0x19D7 /* 6615 hz */
59 #define S16_FREQ_2 0x1F40 /* 8000 hz */
60 #define S16_FREQ_3 0x2580 /* 9600 hz */
61 #define S16_FREQ_4 0x2B11 /* 11025 hz */
62 #define S16_FREQ_5 0x3e80 /* 16000 hz */
63 #define S16_FREQ_6 0x49D4 /* 18900 hz */
64 #define S16_FREQ_7 0x5622 /* 22050 hz */
65 #define S16_FREQ_8 0x6B25 /* 27429 hz */
66 #define S16_FREQ_9 0x7D00 /* 32000 hz */
67 #define S16_FREQ_A 0x8133 /* 33075 hz */
68 #define S16_FREQ_B 0x93A8 /* 37800 hz */
69 #define S16_FREQ_C 0xAC44 /* 44100 hz */
70 #define S16_FREQ_D 0xBB80 /* 48000 hz */
74 #define S16_VOL_6 0xD40 /* +6 dB */
75 #define S16_VOL_0 0xC80 /* +0 dB */
76 #define S16_VOL_40 0x780 /* Decibel = number-100 */
77 #define S16_VOL_OFF 0 /* oo dB */
79 #define S16_VOL_STEPS 0x20
83 #define S16_PAN_LEFT 0x0
84 #define S16_PAN_MID 0xc80
85 #define S16_PAN_RIGHT 0x1900
87 #define S16_PAN_STEPS 0x20
89 /* NOTE: Fileclips and regions are not defined here!
90 * Make sure to convert edits to permanent before converting a sample
91 * FROM Studio16_2.0 to something else. */
93 #endif /* STUDIO16FILE_H */