include: Add protocol sequence constants.
[wine] / include / dls1.h
1 /* Defines and Structures for Instrument Collection Form RIFF DLS1
2  *
3  * Copyright (C) 2003-2004 Rok Mandeljc
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  */
19  
20 #ifndef __WINE_INCLUDE_DLS1_H
21 #define __WINE_INCLUDE_DLS1_H
22
23 /*****************************************************************************
24  * FOURCCs
25  */
26 #define FOURCC_DLS   mmioFOURCC('D','L','S',' ')
27 #define FOURCC_DLID  mmioFOURCC('d','l','i','d')
28 #define FOURCC_COLH  mmioFOURCC('c','o','l','h')
29 #define FOURCC_WVPL  mmioFOURCC('w','v','p','l')
30 #define FOURCC_PTBL  mmioFOURCC('p','t','b','l')
31 #define FOURCC_PATH  mmioFOURCC('p','a','t','h')
32 #define FOURCC_wave  mmioFOURCC('w','a','v','e')
33 #define FOURCC_LINS  mmioFOURCC('l','i','n','s')
34 #define FOURCC_INS   mmioFOURCC('i','n','s',' ')
35 #define FOURCC_INSH  mmioFOURCC('i','n','s','h')
36 #define FOURCC_LRGN  mmioFOURCC('l','r','g','n')
37 #define FOURCC_RGN   mmioFOURCC('r','g','n',' ')
38 #define FOURCC_RGNH  mmioFOURCC('r','g','n','h')
39 #define FOURCC_LART  mmioFOURCC('l','a','r','t')
40 #define FOURCC_ART1  mmioFOURCC('a','r','t','1')
41 #define FOURCC_WLNK  mmioFOURCC('w','l','n','k')
42 #define FOURCC_WSMP  mmioFOURCC('w','s','m','p')
43 #define FOURCC_VERS  mmioFOURCC('v','e','r','s')
44
45 /*****************************************************************************
46  * Flags
47  */
48
49 #define CONN_DST_NONE             0x000
50 #define CONN_DST_ATTENUATION      0x001
51 #define CONN_DST_PITCH            0x003
52 #define CONN_DST_PAN              0x004
53
54 #define CONN_DST_LFO_FREQUENCY    0x104
55 #define CONN_DST_LFO_STARTDELAY   0x105
56
57 #define CONN_DST_EG1_ATTACKTIME   0x206
58 #define CONN_DST_EG1_DECAYTIME    0x207
59 #define CONN_DST_EG1_RELEASETIME  0x209
60 #define CONN_DST_EG1_SUSTAINLEVEL 0x20A
61
62 #define CONN_DST_EG2_ATTACKTIME   0x30A
63 #define CONN_DST_EG2_DECAYTIME    0x30B
64 #define CONN_DST_EG2_RELEASETIME  0x30D
65 #define CONN_DST_EG2_SUSTAINLEVEL 0x30E
66
67 #define CONN_SRC_NONE             0x000
68 #define CONN_SRC_LFO              0x001
69 #define CONN_SRC_KEYONVELOCITY    0x002
70 #define CONN_SRC_KEYNUMBER        0x003
71 #define CONN_SRC_EG1              0x004
72 #define CONN_SRC_EG2              0x005
73 #define CONN_SRC_PITCHWHEEL       0x006
74
75 #define CONN_SRC_CC1              0x081
76 #define CONN_SRC_CC7              0x087
77 #define CONN_SRC_CC10             0x08A
78 #define CONN_SRC_CC11             0x08B
79
80 #define CONN_TRN_NONE             0x000
81 #define CONN_TRN_CONCAVE          0x001
82
83 #define F_INSTRUMENT_DRUMS 0x80000000
84
85 #define F_RGN_OPTION_SELFNONEXCLUSIVE 0x1
86
87 #define F_WAVELINK_PHASE_MASTER 0x1
88
89 #define F_WSMP_NO_TRUNCATION  0x1
90 #define F_WSMP_NO_COMPRESSION 0x2
91
92 #define POOL_CUE_NULL 0xFFFFFFFF
93
94 #define WAVELINK_CHANNEL_LEFT  0x1
95 #define WAVELINK_CHANNEL_RIGHT 0x2
96
97 #define WLOOP_TYPE_FORWARD 0x0
98
99 /*****************************************************************************
100  * Structures
101  */
102 /* typedef definitions */
103 typedef struct _DLSID          DLSID,          *LPDLSID;
104 typedef struct _DLSVERSION     DLSVERSION,     *LPDLSVERSION;
105 typedef struct _CONNECTION     CONNECTION,     *LPCONNECTION;
106 typedef struct _CONNECTIONLIST CONNECTIONLIST, *LPCONNECTIONLIST;
107 typedef struct _RGNRANGE       RGNRANGE,       *LPRGNRANGE;
108 typedef struct _MIDILOCALE     MIDILOCALE,     *LPMIDILOCALE;
109 typedef struct _RGNHEADER      RGNHEADER,      *LPRGNHEADER;
110 typedef struct _INSTHEADER     INSTHEADER,     *LPINSTHEADER;
111 typedef struct _DLSHEADER      DLSHEADER,      *LPDLSHEADER;
112 typedef struct _WAVELINK       WAVELINK,       *LPWAVELINK;
113 typedef struct _POOLCUE        POOLCUE,        *LPPOOLCUE;
114 typedef struct _POOLTABLE      POOLTABLE,      *LPPOOLTABLE;
115 typedef struct _rwsmp          WSMPL,          *LPWSMPL;
116 typedef struct _rloop          WLOOP,          *LPWLOOP;
117
118 /* actual structures */
119 struct _DLSID {
120         ULONG  ulData1;
121         USHORT usData2;
122         USHORT usData3;
123         BYTE   abData4[8];
124 };
125
126 struct _DLSVERSION {
127         DWORD dwVersionMS;
128         DWORD dwVersionLS;
129 };
130
131 struct _CONNECTION {
132         USHORT usSource;
133         USHORT usControl;
134         USHORT usDestination;
135         USHORT usTransform;
136         LONG   lScale;
137 };
138
139 struct _CONNECTIONLIST {
140         ULONG cbSize;
141         ULONG cConnections;
142 };
143
144 struct _RGNRANGE {
145         USHORT usLow;
146         USHORT usHigh;
147 };
148
149 struct _MIDILOCALE {
150         ULONG ulBank;
151         ULONG ulInstrument;
152 };
153
154 struct _RGNHEADER {
155         RGNRANGE RangeKey;
156         RGNRANGE RangeVelocity;
157         USHORT   fusOptions;
158         USHORT   usKeyGroup;
159 };
160
161 struct _INSTHEADER {
162         ULONG      cRegions;
163         MIDILOCALE Locale;
164 };
165
166 struct _DLSHEADER {
167         ULONG cInstruments;
168 };
169
170 struct _WAVELINK {
171         USHORT fusOptions;
172         USHORT usPhaseGroup;
173         ULONG  ulChannel;
174         ULONG  ulTableIndex;
175 };
176
177 struct _POOLCUE { 
178         ULONG ulOffset;
179 };
180
181 struct _POOLTABLE {
182         ULONG cbSize;
183         ULONG cCues;
184 };
185
186 struct _rwsmp {
187         ULONG  cbSize;
188         USHORT usUnityNote;
189         SHORT  sFineTune;
190         LONG   lAttenuation;
191         ULONG  fulOptions;
192         ULONG  cSampleLoops;
193 };
194
195 struct _rloop {
196         ULONG cbSize;
197         ULONG ulType;
198         ULONG ulStart;
199         ULONG ulLength;
200 };
201
202 #endif /* __WINE_INCLUDE_DLS1_H */