aboutsummaryrefslogtreecommitdiff
path: root/fm_banks/ibk_files/ibk/IBK.H
blob: 450e7b6ef1a75c47c10068d44df889446430c510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* IBK.H - Definitions for SBTimbre Bank File 
** Jamie O'Connell - 91.01.13 
** Modified 92.06.28 JWO - It seems CL is now using the 12th byte as a 
**                         percussion voice indicator                  
** Modified 93.07.02 JWO - Added transpos parameter to IBK timbre      
** Modified 93.10.11 JWO - Added Percussion Pitch                      
*/

#ifndef IBK_H
#define IBK_H

#define IBKEXT   "IBK"
#define SBIEXT   "SBI"

#define SBISIG   "SBI\x1A"     /* 4 chars long */
#define IBKSIG   "IBK\x1A"     /* 4 chars long */

/* Packed Timbre Parameters */

typedef struct {        /* 16 Bytes each */
	BYTE modchar;   /* AM, VIB, SUS, KSR, MUL */
	BYTE carchar;
	BYTE modscal;   /* KSL, TL */
	BYTE carscal;
	BYTE modad;     /* Attack/Decay */
	BYTE carad;
	BYTE modsr;     /* Sustain/Release */
	BYTE carsr;
	BYTE modwave;   /* Wave Select */
	BYTE carwave;
        BYTE feedback;  /* FB, Connection *(inverse of Adlib)* <- not true? */
                        /* The following was originally reserved...CL uses  */
                        /* the next byte the same way we do: BD=6,SD=7,TT=8 */
                        /* CY=9,HH=10                                       */
        BYTE percvoc;   /* Percussion voice number                    : JWO */
        char transpos;  /* Number of notes to transpose timbre, signed: JWO */
        BYTE dpitch;    /* percussion pitch: MIDI Note 0 - 127        : JWO */
        BYTE rsv[2];    /* unsused - so far */
        } SBTIMBRE;     

/* SBI Instrument file */

typedef struct {
        char     sig[4];             /* signature: "SBI\x1A"  */
        char     name[32];           /* instrument name: NUL Terminated */
        SBTIMBRE snd;                /* instrument parameters */
        } SBIFMT;

/* IBK Instrument Bank File */

typedef struct {                     /* 3204 Bytes (0x0C83) */
        char     sig[4];             /* signature: "IBK\x1A"  */
        SBTIMBRE snd[128];           /* Instrument block */
        char     name[128][9];       /* name block: NUL terminated strings */
        } IBKFMT;

#endif