annotate lib/legacy_dx/dmusicf.h @ 2217:744ed51880ed

expand button
author Ritor1
date Sat, 15 Feb 2014 22:00:13 +0600
parents 9c0607679772
children
rev   line source
0
Ritor1
parents:
diff changeset
1 /************************************************************************
Ritor1
parents:
diff changeset
2 * *
Ritor1
parents:
diff changeset
3 * dmusicf.h -- This module defines the DirectMusic file formats *
Ritor1
parents:
diff changeset
4 * *
Ritor1
parents:
diff changeset
5 * Copyright (c) Microsoft Corporation. All rights reserved. *
Ritor1
parents:
diff changeset
6 * *
Ritor1
parents:
diff changeset
7 ************************************************************************/
Ritor1
parents:
diff changeset
8
Ritor1
parents:
diff changeset
9 #ifndef _DMUSICF_
Ritor1
parents:
diff changeset
10 #define _DMUSICF_
Ritor1
parents:
diff changeset
11
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13 #include <windows.h>
Ritor1
parents:
diff changeset
14
Ritor1
parents:
diff changeset
15 #define COM_NO_WINDOWS_H
Ritor1
parents:
diff changeset
16 #include <objbase.h>
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18 #include <mmsystem.h>
Ritor1
parents:
diff changeset
19
Ritor1
parents:
diff changeset
20 #include <pshpack8.h>
Ritor1
parents:
diff changeset
21
Ritor1
parents:
diff changeset
22 #ifdef __cplusplus
Ritor1
parents:
diff changeset
23 extern "C" {
Ritor1
parents:
diff changeset
24 #endif
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26 interface IDirectMusicCollection;
Ritor1
parents:
diff changeset
27 #ifndef __cplusplus
Ritor1
parents:
diff changeset
28 typedef interface IDirectMusicCollection IDirectMusicCollection;
Ritor1
parents:
diff changeset
29 #endif
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31 /* Common chunks */
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33 #define DMUS_FOURCC_GUID_CHUNK mmioFOURCC('g','u','i','d')
Ritor1
parents:
diff changeset
34 #define DMUS_FOURCC_INFO_LIST mmioFOURCC('I','N','F','O')
Ritor1
parents:
diff changeset
35 #define DMUS_FOURCC_UNFO_LIST mmioFOURCC('U','N','F','O')
Ritor1
parents:
diff changeset
36 #define DMUS_FOURCC_UNAM_CHUNK mmioFOURCC('U','N','A','M')
Ritor1
parents:
diff changeset
37 #define DMUS_FOURCC_UART_CHUNK mmioFOURCC('U','A','R','T')
Ritor1
parents:
diff changeset
38 #define DMUS_FOURCC_UCOP_CHUNK mmioFOURCC('U','C','O','P')
Ritor1
parents:
diff changeset
39 #define DMUS_FOURCC_USBJ_CHUNK mmioFOURCC('U','S','B','J')
Ritor1
parents:
diff changeset
40 #define DMUS_FOURCC_UCMT_CHUNK mmioFOURCC('U','C','M','T')
Ritor1
parents:
diff changeset
41 #define DMUS_FOURCC_CATEGORY_CHUNK mmioFOURCC('c','a','t','g')
Ritor1
parents:
diff changeset
42 #define DMUS_FOURCC_VERSION_CHUNK mmioFOURCC('v','e','r','s')
Ritor1
parents:
diff changeset
43
Ritor1
parents:
diff changeset
44 /* The following structures are used by the Tracks, and are the packed structures */
Ritor1
parents:
diff changeset
45 /* that are passed to the Tracks inside the IStream. */
Ritor1
parents:
diff changeset
46
Ritor1
parents:
diff changeset
47
Ritor1
parents:
diff changeset
48 typedef struct _DMUS_IO_SEQ_ITEM
Ritor1
parents:
diff changeset
49 {
Ritor1
parents:
diff changeset
50 MUSIC_TIME mtTime;
Ritor1
parents:
diff changeset
51 MUSIC_TIME mtDuration;
Ritor1
parents:
diff changeset
52 DWORD dwPChannel;
Ritor1
parents:
diff changeset
53 short nOffset;
Ritor1
parents:
diff changeset
54 BYTE bStatus;
Ritor1
parents:
diff changeset
55 BYTE bByte1;
Ritor1
parents:
diff changeset
56 BYTE bByte2;
Ritor1
parents:
diff changeset
57 } DMUS_IO_SEQ_ITEM;
Ritor1
parents:
diff changeset
58
Ritor1
parents:
diff changeset
59
Ritor1
parents:
diff changeset
60 typedef struct _DMUS_IO_CURVE_ITEM
Ritor1
parents:
diff changeset
61 {
Ritor1
parents:
diff changeset
62 MUSIC_TIME mtStart;
Ritor1
parents:
diff changeset
63 MUSIC_TIME mtDuration;
Ritor1
parents:
diff changeset
64 MUSIC_TIME mtResetDuration;
Ritor1
parents:
diff changeset
65 DWORD dwPChannel;
Ritor1
parents:
diff changeset
66 short nOffset;
Ritor1
parents:
diff changeset
67 short nStartValue;
Ritor1
parents:
diff changeset
68 short nEndValue;
Ritor1
parents:
diff changeset
69 short nResetValue;
Ritor1
parents:
diff changeset
70 BYTE bType;
Ritor1
parents:
diff changeset
71 BYTE bCurveShape;
Ritor1
parents:
diff changeset
72 BYTE bCCData;
Ritor1
parents:
diff changeset
73 BYTE bFlags;
Ritor1
parents:
diff changeset
74 /* Following was added for DirectX8. */
Ritor1
parents:
diff changeset
75 WORD wParamType; /* RPN or NRPN parameter number. */
Ritor1
parents:
diff changeset
76 WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.) */
Ritor1
parents:
diff changeset
77 } DMUS_IO_CURVE_ITEM;
Ritor1
parents:
diff changeset
78
Ritor1
parents:
diff changeset
79
Ritor1
parents:
diff changeset
80 typedef struct _DMUS_IO_TEMPO_ITEM
Ritor1
parents:
diff changeset
81 {
Ritor1
parents:
diff changeset
82 MUSIC_TIME lTime;
Ritor1
parents:
diff changeset
83 double dblTempo;
Ritor1
parents:
diff changeset
84 } DMUS_IO_TEMPO_ITEM;
Ritor1
parents:
diff changeset
85
Ritor1
parents:
diff changeset
86
Ritor1
parents:
diff changeset
87 typedef struct _DMUS_IO_SYSEX_ITEM
Ritor1
parents:
diff changeset
88 {
Ritor1
parents:
diff changeset
89 MUSIC_TIME mtTime;
Ritor1
parents:
diff changeset
90 DWORD dwPChannel;
Ritor1
parents:
diff changeset
91 DWORD dwSysExLength;
Ritor1
parents:
diff changeset
92 } DMUS_IO_SYSEX_ITEM;
Ritor1
parents:
diff changeset
93
Ritor1
parents:
diff changeset
94 typedef DMUS_CHORD_KEY DMUS_CHORD_PARAM; /* DMUS_CHORD_KEY defined in dmusici.h */
Ritor1
parents:
diff changeset
95
Ritor1
parents:
diff changeset
96 typedef struct _DMUS_RHYTHM_PARAM
Ritor1
parents:
diff changeset
97 {
Ritor1
parents:
diff changeset
98 DMUS_TIMESIGNATURE TimeSig;
Ritor1
parents:
diff changeset
99 DWORD dwRhythmPattern;
Ritor1
parents:
diff changeset
100 } DMUS_RHYTHM_PARAM;
Ritor1
parents:
diff changeset
101
Ritor1
parents:
diff changeset
102 typedef struct _DMUS_TEMPO_PARAM
Ritor1
parents:
diff changeset
103 {
Ritor1
parents:
diff changeset
104 MUSIC_TIME mtTime;
Ritor1
parents:
diff changeset
105 double dblTempo;
Ritor1
parents:
diff changeset
106 } DMUS_TEMPO_PARAM;
Ritor1
parents:
diff changeset
107
Ritor1
parents:
diff changeset
108
Ritor1
parents:
diff changeset
109 typedef struct _DMUS_MUTE_PARAM
Ritor1
parents:
diff changeset
110 {
Ritor1
parents:
diff changeset
111 DWORD dwPChannel;
Ritor1
parents:
diff changeset
112 DWORD dwPChannelMap;
Ritor1
parents:
diff changeset
113 BOOL fMute;
Ritor1
parents:
diff changeset
114 } DMUS_MUTE_PARAM;
Ritor1
parents:
diff changeset
115
Ritor1
parents:
diff changeset
116 /* Style chunks */
Ritor1
parents:
diff changeset
117
Ritor1
parents:
diff changeset
118 #define DMUS_FOURCC_STYLE_FORM mmioFOURCC('D','M','S','T')
Ritor1
parents:
diff changeset
119 #define DMUS_FOURCC_STYLE_CHUNK mmioFOURCC('s','t','y','h')
Ritor1
parents:
diff changeset
120 #define DMUS_FOURCC_PART_LIST mmioFOURCC('p','a','r','t')
Ritor1
parents:
diff changeset
121 #define DMUS_FOURCC_PART_CHUNK mmioFOURCC('p','r','t','h')
Ritor1
parents:
diff changeset
122 #define DMUS_FOURCC_NOTE_CHUNK mmioFOURCC('n','o','t','e')
Ritor1
parents:
diff changeset
123 #define DMUS_FOURCC_CURVE_CHUNK mmioFOURCC('c','r','v','e')
Ritor1
parents:
diff changeset
124 #define DMUS_FOURCC_MARKER_CHUNK mmioFOURCC('m','r','k','r')
Ritor1
parents:
diff changeset
125 #define DMUS_FOURCC_RESOLUTION_CHUNK mmioFOURCC('r','s','l','n')
Ritor1
parents:
diff changeset
126 #define DMUS_FOURCC_ANTICIPATION_CHUNK mmioFOURCC('a','n','p','n')
Ritor1
parents:
diff changeset
127 #define DMUS_FOURCC_PATTERN_LIST mmioFOURCC('p','t','t','n')
Ritor1
parents:
diff changeset
128 #define DMUS_FOURCC_PATTERN_CHUNK mmioFOURCC('p','t','n','h')
Ritor1
parents:
diff changeset
129 #define DMUS_FOURCC_RHYTHM_CHUNK mmioFOURCC('r','h','t','m')
Ritor1
parents:
diff changeset
130 #define DMUS_FOURCC_PARTREF_LIST mmioFOURCC('p','r','e','f')
Ritor1
parents:
diff changeset
131 #define DMUS_FOURCC_PARTREF_CHUNK mmioFOURCC('p','r','f','c')
Ritor1
parents:
diff changeset
132 #define DMUS_FOURCC_STYLE_PERS_REF_LIST mmioFOURCC('p','r','r','f')
Ritor1
parents:
diff changeset
133 #define DMUS_FOURCC_MOTIFSETTINGS_CHUNK mmioFOURCC('m','t','f','s')
Ritor1
parents:
diff changeset
134
Ritor1
parents:
diff changeset
135 /* Flags used by variations: these make up the DWORDs in dwVariationChoices. */
Ritor1
parents:
diff changeset
136
Ritor1
parents:
diff changeset
137 /* These flags determine the types of chords supported by a given variation in DirectMusic */
Ritor1
parents:
diff changeset
138 /* mode. The first seven flags (bits 1-7) are set if the variation supports major chords */
Ritor1
parents:
diff changeset
139 /* rooted in scale positions, so, e.g., if bits 1, 2, and 4 are set, the variation */
Ritor1
parents:
diff changeset
140 /* supports major chords rooted in the tonic, second, and fourth scale positions. The */
Ritor1
parents:
diff changeset
141 /* next seven flags serve the same purpose, but for minor chords, and the following seven */
Ritor1
parents:
diff changeset
142 /* flags serve the same purpose for chords that are not major or minor (e.g., SUS 4 */
Ritor1
parents:
diff changeset
143 /* chords). Bits 22, 23, and 24 are set if the variation supports chords rooted in the */
Ritor1
parents:
diff changeset
144 /* scale, chords rooted sharp of scale tones, and chords rooted flat of scale tones, */
Ritor1
parents:
diff changeset
145 /* respectively. For example, to support a C# minor chord in the scale of C Major, */
Ritor1
parents:
diff changeset
146 /* bits 8 (for tonic minor) and 24 (for sharp) need to be set. Bits 25, 26, an 27 handle */
Ritor1
parents:
diff changeset
147 /* chords that are triads, 6th or 7th chords, and chords with extensions, respectively. */
Ritor1
parents:
diff changeset
148 /* bits 28 and 29 handle chords that are followed by tonic and dominant chords, */
Ritor1
parents:
diff changeset
149 /* respectively. */
Ritor1
parents:
diff changeset
150 #define DMUS_VARIATIONF_MAJOR 0x0000007F /* Seven positions in the scale - major chords. */
Ritor1
parents:
diff changeset
151 #define DMUS_VARIATIONF_MINOR 0x00003F80 /* Seven positions in the scale - minor chords. */
Ritor1
parents:
diff changeset
152 #define DMUS_VARIATIONF_OTHER 0x001FC000 /* Seven positions in the scale - other chords. */
Ritor1
parents:
diff changeset
153 #define DMUS_VARIATIONF_ROOT_SCALE 0x00200000 /* Handles chord roots in the scale. */
Ritor1
parents:
diff changeset
154 #define DMUS_VARIATIONF_ROOT_FLAT 0x00400000 /* Handles flat chord roots (based on scale notes). */
Ritor1
parents:
diff changeset
155 #define DMUS_VARIATIONF_ROOT_SHARP 0x00800000 /* Handles sharp chord roots (based on scale notes). */
Ritor1
parents:
diff changeset
156 #define DMUS_VARIATIONF_TYPE_TRIAD 0x01000000 /* Handles simple chords - triads. */
Ritor1
parents:
diff changeset
157 #define DMUS_VARIATIONF_TYPE_6AND7 0x02000000 /* Handles simple chords - 6 and 7. */
Ritor1
parents:
diff changeset
158 #define DMUS_VARIATIONF_TYPE_COMPLEX 0x04000000 /* Handles complex chords. */
Ritor1
parents:
diff changeset
159 #define DMUS_VARIATIONF_DEST_TO1 0x08000000 /* Handles transitions to 1 chord. */
Ritor1
parents:
diff changeset
160 #define DMUS_VARIATIONF_DEST_TO5 0x10000000 /* Handles transitions to 5 chord. */
Ritor1
parents:
diff changeset
161 #define DMUS_VARIATIONF_DEST_OTHER 0x40000000 /* Handles transitions to chords other than 1 . */
Ritor1
parents:
diff changeset
162
Ritor1
parents:
diff changeset
163 /* legacy mask for variation modes */
Ritor1
parents:
diff changeset
164 #define DMUS_VARIATIONF_MODES 0xE0000000
Ritor1
parents:
diff changeset
165 /* Bits 29 and 31 of the variation flags are the Mode bits. If both are 0, it's IMA. */
Ritor1
parents:
diff changeset
166 /* If bit 29 is 1, it's Direct Music. */
Ritor1
parents:
diff changeset
167 #define DMUS_VARIATIONF_MODES_EX (0x20000000 | 0x80000000)
Ritor1
parents:
diff changeset
168 #define DMUS_VARIATIONF_IMA25_MODE 0x00000000
Ritor1
parents:
diff changeset
169 #define DMUS_VARIATIONF_DMUS_MODE 0x20000000
Ritor1
parents:
diff changeset
170
Ritor1
parents:
diff changeset
171 /* Set this if the part uses marker events */
Ritor1
parents:
diff changeset
172 #define DMUS_PARTF_USE_MARKERS 0x1
Ritor1
parents:
diff changeset
173 /* Set this if the part is allowed to switch only on chord-aligned markers */
Ritor1
parents:
diff changeset
174 #define DMUS_PARTF_ALIGN_CHORDS 0x2
Ritor1
parents:
diff changeset
175
Ritor1
parents:
diff changeset
176 /* These specify if the marker event signals whether to stop a variation or start a
Ritor1
parents:
diff changeset
177 pattern/variation (or both), and whether new variations must align with a chord */
Ritor1
parents:
diff changeset
178 #define DMUS_MARKERF_START 0x1
Ritor1
parents:
diff changeset
179 #define DMUS_MARKERF_STOP 0x2
Ritor1
parents:
diff changeset
180 #define DMUS_MARKERF_CHORD_ALIGN 0x4
Ritor1
parents:
diff changeset
181
Ritor1
parents:
diff changeset
182 /* if this flag is set, variation settings in a playing pattern-based track's state data will
Ritor1
parents:
diff changeset
183 persist in the track after it stops playing */
Ritor1
parents:
diff changeset
184 #define DMUS_PATTERNF_PERSIST_CONTROL 0x1
Ritor1
parents:
diff changeset
185
Ritor1
parents:
diff changeset
186 /* These specify possible values for DMUS_IO_PARTREF.bRandomVariation
Ritor1
parents:
diff changeset
187 all but DMUS_VARIATIONT_SEQUENTIAL and DMUS_VARIATIONT_RANDOM are DirectX8. */
Ritor1
parents:
diff changeset
188 typedef enum enumDMUS_VARIATIONT_TYPES
Ritor1
parents:
diff changeset
189 {
Ritor1
parents:
diff changeset
190 DMUS_VARIATIONT_SEQUENTIAL = 0, /* Play sequential starting with variation 1. */
Ritor1
parents:
diff changeset
191 DMUS_VARIATIONT_RANDOM = 1, /* Play randomly. */
Ritor1
parents:
diff changeset
192 DMUS_VARIATIONT_RANDOM_START = 2, /* Play sequential starting with a random variation. */
Ritor1
parents:
diff changeset
193 DMUS_VARIATIONT_NO_REPEAT = 3, /* Play randomly, but don't play the same variation twice. */
Ritor1
parents:
diff changeset
194 DMUS_VARIATIONT_RANDOM_ROW = 4 /* Play randomly as a row: don't repeat any variation until all have played. */
Ritor1
parents:
diff changeset
195 } DMUS_VARIATIONT_TYPES;
Ritor1
parents:
diff changeset
196
Ritor1
parents:
diff changeset
197 /* These specify possible values for DMUS_IO_PATTERN.wEmbellishment (DirectX8) */
Ritor1
parents:
diff changeset
198 typedef enum enumDMUS_EMBELLISHT_TYPES
Ritor1
parents:
diff changeset
199 {
Ritor1
parents:
diff changeset
200 DMUS_EMBELLISHT_NORMAL = 0,
Ritor1
parents:
diff changeset
201 DMUS_EMBELLISHT_FILL = 1,
Ritor1
parents:
diff changeset
202 DMUS_EMBELLISHT_BREAK = 2,
Ritor1
parents:
diff changeset
203 DMUS_EMBELLISHT_INTRO = 4,
Ritor1
parents:
diff changeset
204 DMUS_EMBELLISHT_END = 8,
Ritor1
parents:
diff changeset
205 DMUS_EMBELLISHT_MOTIF = 16,
Ritor1
parents:
diff changeset
206 DMUS_EMBELLISHT_ALL = 0xFFFF
Ritor1
parents:
diff changeset
207 } DMUS_EMBELLISHT_TYPES;
Ritor1
parents:
diff changeset
208
Ritor1
parents:
diff changeset
209 #pragma pack(2)
Ritor1
parents:
diff changeset
210
Ritor1
parents:
diff changeset
211 typedef struct _DMUS_IO_TIMESIG
Ritor1
parents:
diff changeset
212 {
Ritor1
parents:
diff changeset
213 /* Time signatures define how many beats per measure, which note receives */
Ritor1
parents:
diff changeset
214 /* the beat, and the grid resolution. */
Ritor1
parents:
diff changeset
215 BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
Ritor1
parents:
diff changeset
216 BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
Ritor1
parents:
diff changeset
217 /* we can assume that 0 means 256th note */
Ritor1
parents:
diff changeset
218 WORD wGridsPerBeat; /* grids per beat */
Ritor1
parents:
diff changeset
219 } DMUS_IO_TIMESIG;
Ritor1
parents:
diff changeset
220
Ritor1
parents:
diff changeset
221 typedef struct _DMUS_IO_STYLE
Ritor1
parents:
diff changeset
222 {
Ritor1
parents:
diff changeset
223 DMUS_IO_TIMESIG timeSig; /* Styles have a default Time Signature */
Ritor1
parents:
diff changeset
224 double dblTempo;
Ritor1
parents:
diff changeset
225 } DMUS_IO_STYLE;
Ritor1
parents:
diff changeset
226
Ritor1
parents:
diff changeset
227 typedef struct _DMUS_IO_VERSION
Ritor1
parents:
diff changeset
228 {
Ritor1
parents:
diff changeset
229 DWORD dwVersionMS; /* Version # high-order 32 bits */
Ritor1
parents:
diff changeset
230 DWORD dwVersionLS; /* Version # low-order 32 bits */
Ritor1
parents:
diff changeset
231 } DMUS_IO_VERSION;
Ritor1
parents:
diff changeset
232
Ritor1
parents:
diff changeset
233 typedef struct _DMUS_IO_PATTERN
Ritor1
parents:
diff changeset
234 {
Ritor1
parents:
diff changeset
235 DMUS_IO_TIMESIG timeSig; /* Patterns can override the Style's Time sig. */
Ritor1
parents:
diff changeset
236 BYTE bGrooveBottom; /* bottom of groove range */
Ritor1
parents:
diff changeset
237 BYTE bGrooveTop; /* top of groove range */
Ritor1
parents:
diff changeset
238 WORD wEmbellishment; /* Fill, Break, Intro, End, Normal, Motif */
Ritor1
parents:
diff changeset
239 WORD wNbrMeasures; /* length in measures */
Ritor1
parents:
diff changeset
240 BYTE bDestGrooveBottom; /* bottom of groove range for next pattern */
Ritor1
parents:
diff changeset
241 BYTE bDestGrooveTop; /* top of groove range for next pattern */
Ritor1
parents:
diff changeset
242 DWORD dwFlags; /* various flags */
Ritor1
parents:
diff changeset
243 } DMUS_IO_PATTERN;
Ritor1
parents:
diff changeset
244
Ritor1
parents:
diff changeset
245 typedef struct _DMUS_IO_STYLEPART
Ritor1
parents:
diff changeset
246 {
Ritor1
parents:
diff changeset
247 DMUS_IO_TIMESIG timeSig; /* can override pattern's */
Ritor1
parents:
diff changeset
248 DWORD dwVariationChoices[32]; /* MOAW choice bitfield */
Ritor1
parents:
diff changeset
249 GUID guidPartID; /* identifies the part */
Ritor1
parents:
diff changeset
250 WORD wNbrMeasures; /* length of the Part */
Ritor1
parents:
diff changeset
251 BYTE bPlayModeFlags; /* see PLAYMODE flags */
Ritor1
parents:
diff changeset
252 BYTE bInvertUpper; /* inversion upper limit */
Ritor1
parents:
diff changeset
253 BYTE bInvertLower; /* inversion lower limit */
Ritor1
parents:
diff changeset
254 BYTE bPad[3]; /* for DWORD alignment */
Ritor1
parents:
diff changeset
255 DWORD dwFlags; /* various flags */
Ritor1
parents:
diff changeset
256 } DMUS_IO_STYLEPART;
Ritor1
parents:
diff changeset
257
Ritor1
parents:
diff changeset
258 typedef struct _DMUS_IO_PARTREF
Ritor1
parents:
diff changeset
259 {
Ritor1
parents:
diff changeset
260 GUID guidPartID; /* unique ID for matching up with parts */
Ritor1
parents:
diff changeset
261 WORD wLogicalPartID; /* corresponds to port/device/midi channel OBSOLETE */
Ritor1
parents:
diff changeset
262 BYTE bVariationLockID; /* parts with the same ID lock variations. */
Ritor1
parents:
diff changeset
263 /* high bit is used to identify master Part */
Ritor1
parents:
diff changeset
264 BYTE bSubChordLevel; /* tells which sub chord level this part wants */
Ritor1
parents:
diff changeset
265 BYTE bPriority; /* 256 priority levels. Parts with lower priority */
Ritor1
parents:
diff changeset
266 /* aren't played first when a device runs out of */
Ritor1
parents:
diff changeset
267 /* notes */
Ritor1
parents:
diff changeset
268 BYTE bRandomVariation; /* when set, matching variations play in random order */
Ritor1
parents:
diff changeset
269 /* when clear, matching variations play sequentially */
Ritor1
parents:
diff changeset
270 WORD wPad; /* not used */
Ritor1
parents:
diff changeset
271 DWORD dwPChannel; /* replaces wLogicalPartID */
Ritor1
parents:
diff changeset
272 } DMUS_IO_PARTREF;
Ritor1
parents:
diff changeset
273
Ritor1
parents:
diff changeset
274 typedef struct _DMUS_IO_STYLENOTE
Ritor1
parents:
diff changeset
275 {
Ritor1
parents:
diff changeset
276 MUSIC_TIME mtGridStart; /* when this note occurs */
Ritor1
parents:
diff changeset
277 DWORD dwVariation; /* variation bits */
Ritor1
parents:
diff changeset
278 MUSIC_TIME mtDuration; /* how long this note lasts */
Ritor1
parents:
diff changeset
279 short nTimeOffset; /* offset from mtGridStart */
Ritor1
parents:
diff changeset
280 WORD wMusicValue; /* Position in scale. */
Ritor1
parents:
diff changeset
281 BYTE bVelocity; /* Note velocity. */
Ritor1
parents:
diff changeset
282 BYTE bTimeRange; /* Range to randomize start time. */
Ritor1
parents:
diff changeset
283 BYTE bDurRange; /* Range to randomize duration. */
Ritor1
parents:
diff changeset
284 BYTE bVelRange; /* Range to randomize velocity. */
Ritor1
parents:
diff changeset
285 BYTE bInversionID; /* Identifies inversion group to which this note belongs */
Ritor1
parents:
diff changeset
286 BYTE bPlayModeFlags; /* Can override part */
Ritor1
parents:
diff changeset
287 /* Following exists only under DirectX8 and on */
Ritor1
parents:
diff changeset
288 BYTE bNoteFlags; /* values from DMUS_NOTEF_FLAGS */
Ritor1
parents:
diff changeset
289 } DMUS_IO_STYLENOTE;
Ritor1
parents:
diff changeset
290
Ritor1
parents:
diff changeset
291 typedef struct _DMUS_IO_STYLECURVE
Ritor1
parents:
diff changeset
292 {
Ritor1
parents:
diff changeset
293 MUSIC_TIME mtGridStart; /* when this curve occurs */
Ritor1
parents:
diff changeset
294 DWORD dwVariation; /* variation bits */
Ritor1
parents:
diff changeset
295 MUSIC_TIME mtDuration; /* how long this curve lasts */
Ritor1
parents:
diff changeset
296 MUSIC_TIME mtResetDuration;/* how long after the end of the curve to reset the curve */
Ritor1
parents:
diff changeset
297 short nTimeOffset; /* offset from mtGridStart */
Ritor1
parents:
diff changeset
298 short nStartValue; /* curve's start value */
Ritor1
parents:
diff changeset
299 short nEndValue; /* curve's end value */
Ritor1
parents:
diff changeset
300 short nResetValue; /* the value to which to reset the curve */
Ritor1
parents:
diff changeset
301 BYTE bEventType; /* type of curve */
Ritor1
parents:
diff changeset
302 BYTE bCurveShape; /* shape of curve */
Ritor1
parents:
diff changeset
303 BYTE bCCData; /* CC# */
Ritor1
parents:
diff changeset
304 BYTE bFlags; /* Bit 1=TRUE means to send nResetValue. Otherwise, don't.
Ritor1
parents:
diff changeset
305 Other bits are reserved. */
Ritor1
parents:
diff changeset
306 /* Following was added for DirectX8. */
Ritor1
parents:
diff changeset
307 WORD wParamType; /* RPN or NRPN parameter number. */
Ritor1
parents:
diff changeset
308 WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.) */
Ritor1
parents:
diff changeset
309 } DMUS_IO_STYLECURVE;
Ritor1
parents:
diff changeset
310
Ritor1
parents:
diff changeset
311 typedef struct _DMUS_IO_STYLEMARKER
Ritor1
parents:
diff changeset
312 {
Ritor1
parents:
diff changeset
313 MUSIC_TIME mtGridStart; /* when this marker occurs */
Ritor1
parents:
diff changeset
314 DWORD dwVariation; /* variation bits */
Ritor1
parents:
diff changeset
315 WORD wMarkerFlags; /* how the marker is used */
Ritor1
parents:
diff changeset
316 } DMUS_IO_STYLEMARKER;
Ritor1
parents:
diff changeset
317
Ritor1
parents:
diff changeset
318 typedef struct _DMUS_IO_STYLERESOLUTION
Ritor1
parents:
diff changeset
319 {
Ritor1
parents:
diff changeset
320 DWORD dwVariation; /* variation bits */
Ritor1
parents:
diff changeset
321 WORD wMusicValue; /* Position in scale. */
Ritor1
parents:
diff changeset
322 BYTE bInversionID; /* Identifies inversion group to which this note belongs */
Ritor1
parents:
diff changeset
323 BYTE bPlayModeFlags; /* Can override part */
Ritor1
parents:
diff changeset
324 } DMUS_IO_STYLERESOLUTION;
Ritor1
parents:
diff changeset
325
Ritor1
parents:
diff changeset
326 typedef struct _DMUS_IO_STYLE_ANTICIPATION
Ritor1
parents:
diff changeset
327 {
Ritor1
parents:
diff changeset
328 MUSIC_TIME mtGridStart; /* when this anticipation occurs */
Ritor1
parents:
diff changeset
329 DWORD dwVariation; /* variation bits */
Ritor1
parents:
diff changeset
330 short nTimeOffset; /* offset from mtGridStart */
Ritor1
parents:
diff changeset
331 BYTE bTimeRange; /* Range to randomize start time. */
Ritor1
parents:
diff changeset
332 } DMUS_IO_STYLE_ANTICIPATION;
Ritor1
parents:
diff changeset
333
Ritor1
parents:
diff changeset
334 typedef struct _DMUS_IO_MOTIFSETTINGS
Ritor1
parents:
diff changeset
335 {
Ritor1
parents:
diff changeset
336 DWORD dwRepeats; /* Number of repeats. By default, 0. */
Ritor1
parents:
diff changeset
337 MUSIC_TIME mtPlayStart; /* Start of playback. By default, 0. */
Ritor1
parents:
diff changeset
338 MUSIC_TIME mtLoopStart; /* Start of looping portion. By default, 0. */
Ritor1
parents:
diff changeset
339 MUSIC_TIME mtLoopEnd; /* End of loop. Must be greater than mtLoopStart. Or, 0, indicating loop full motif. */
Ritor1
parents:
diff changeset
340 DWORD dwResolution; /* Default resolution. */
Ritor1
parents:
diff changeset
341 } DMUS_IO_MOTIFSETTINGS;
Ritor1
parents:
diff changeset
342
Ritor1
parents:
diff changeset
343 #pragma pack()
Ritor1
parents:
diff changeset
344
Ritor1
parents:
diff changeset
345
Ritor1
parents:
diff changeset
346 /*
Ritor1
parents:
diff changeset
347 RIFF
Ritor1
parents:
diff changeset
348 (
Ritor1
parents:
diff changeset
349 'DMST' // Style
Ritor1
parents:
diff changeset
350 <styh-ck> // Style header chunk
Ritor1
parents:
diff changeset
351 <guid-ck> // Every Style has a GUID
Ritor1
parents:
diff changeset
352 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
353 [<vers-ck>] // version chunk
Ritor1
parents:
diff changeset
354 <part-list>... // Array of parts in the Style, used by patterns
Ritor1
parents:
diff changeset
355 <pttn-list>... // Array of patterns in the Style
Ritor1
parents:
diff changeset
356 <DMBD-form>... // Array of bands in the Style
Ritor1
parents:
diff changeset
357 [<prrf-list>]...// Optional array of chord map references in the Style
Ritor1
parents:
diff changeset
358 )
Ritor1
parents:
diff changeset
359
Ritor1
parents:
diff changeset
360 // <styh-ck>
Ritor1
parents:
diff changeset
361 styh
Ritor1
parents:
diff changeset
362 (
Ritor1
parents:
diff changeset
363 <DMUS_IO_STYLE>
Ritor1
parents:
diff changeset
364 )
Ritor1
parents:
diff changeset
365
Ritor1
parents:
diff changeset
366 // <guid-ck>
Ritor1
parents:
diff changeset
367 guid
Ritor1
parents:
diff changeset
368 (
Ritor1
parents:
diff changeset
369 <GUID>
Ritor1
parents:
diff changeset
370 )
Ritor1
parents:
diff changeset
371
Ritor1
parents:
diff changeset
372 // <vers-ck>
Ritor1
parents:
diff changeset
373 vers
Ritor1
parents:
diff changeset
374 (
Ritor1
parents:
diff changeset
375 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
376 )
Ritor1
parents:
diff changeset
377
Ritor1
parents:
diff changeset
378 // <part-list>
Ritor1
parents:
diff changeset
379 LIST
Ritor1
parents:
diff changeset
380 (
Ritor1
parents:
diff changeset
381 'part'
Ritor1
parents:
diff changeset
382 <prth-ck> // Part header chunk
Ritor1
parents:
diff changeset
383 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
384 [<note-ck>] // Optional chunk containing an array of notes in Part
Ritor1
parents:
diff changeset
385 [<crve-ck>] // Optional chunk containing an array of curves in Part
Ritor1
parents:
diff changeset
386 [<mrkr-ck>] // Optional chunk containing an array of markers in Part
Ritor1
parents:
diff changeset
387 [<rsln-ck>] // Optional chunk containing an array of variation resolutions in Part
Ritor1
parents:
diff changeset
388 [<anpn-ck>] // Optional chunk containing an array of resolution anticipations in Part
Ritor1
parents:
diff changeset
389 )
Ritor1
parents:
diff changeset
390
Ritor1
parents:
diff changeset
391 // <orth-ck>
Ritor1
parents:
diff changeset
392 prth
Ritor1
parents:
diff changeset
393 (
Ritor1
parents:
diff changeset
394 <DMUS_IO_STYLEPART>
Ritor1
parents:
diff changeset
395 )
Ritor1
parents:
diff changeset
396
Ritor1
parents:
diff changeset
397 // <note-ck>
Ritor1
parents:
diff changeset
398 'note'
Ritor1
parents:
diff changeset
399 (
Ritor1
parents:
diff changeset
400 // sizeof DMUS_IO_STYLENOTE:DWORD
Ritor1
parents:
diff changeset
401 <DMUS_IO_STYLENOTE>...
Ritor1
parents:
diff changeset
402 )
Ritor1
parents:
diff changeset
403
Ritor1
parents:
diff changeset
404 // <crve-ck>
Ritor1
parents:
diff changeset
405 'crve'
Ritor1
parents:
diff changeset
406 (
Ritor1
parents:
diff changeset
407 // sizeof DMUS_IO_STYLECURVE:DWORD
Ritor1
parents:
diff changeset
408 <DMUS_IO_STYLECURVE>...
Ritor1
parents:
diff changeset
409 )
Ritor1
parents:
diff changeset
410
Ritor1
parents:
diff changeset
411 // <mrkr-ck>
Ritor1
parents:
diff changeset
412 'mrkr'
Ritor1
parents:
diff changeset
413 (
Ritor1
parents:
diff changeset
414 // sizeof DMUS_IO_STYLEMARKER:DWORD
Ritor1
parents:
diff changeset
415 <DMUS_IO_STYLEMARKER>...
Ritor1
parents:
diff changeset
416 )
Ritor1
parents:
diff changeset
417
Ritor1
parents:
diff changeset
418 // <rsln-ck>
Ritor1
parents:
diff changeset
419 'rsln'
Ritor1
parents:
diff changeset
420 (
Ritor1
parents:
diff changeset
421 // sizeof DMUS_IO_STYLERESOLUTION:DWORD
Ritor1
parents:
diff changeset
422 <DMUS_IO_STYLERESOLUTION>...
Ritor1
parents:
diff changeset
423 )
Ritor1
parents:
diff changeset
424
Ritor1
parents:
diff changeset
425 // <anpn-ck>
Ritor1
parents:
diff changeset
426 'anpn'
Ritor1
parents:
diff changeset
427 (
Ritor1
parents:
diff changeset
428 // sizeof DMUS_IO_STYLE_ANTICIPATION:DWORD
Ritor1
parents:
diff changeset
429 <DMUS_IO_STYLE_ANTICIPATION>...
Ritor1
parents:
diff changeset
430 )
Ritor1
parents:
diff changeset
431
Ritor1
parents:
diff changeset
432 // <pttn-list>
Ritor1
parents:
diff changeset
433 LIST
Ritor1
parents:
diff changeset
434 (
Ritor1
parents:
diff changeset
435 'pttn'
Ritor1
parents:
diff changeset
436 <ptnh-ck> // Pattern header chunk
Ritor1
parents:
diff changeset
437 <rhtm-ck> // Chunk containing an array of rhythms for chord matching
Ritor1
parents:
diff changeset
438 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
439 [<mtfs-ck>] // Motif settings chunk
Ritor1
parents:
diff changeset
440 [<DMBD-form>] // Optional band to be associated with the pattern (for motifs)
Ritor1
parents:
diff changeset
441 <pref-list>... // Array of part reference id's
Ritor1
parents:
diff changeset
442 )
Ritor1
parents:
diff changeset
443
Ritor1
parents:
diff changeset
444 // <ptnh-ck>
Ritor1
parents:
diff changeset
445 ptnh
Ritor1
parents:
diff changeset
446 (
Ritor1
parents:
diff changeset
447 <DMUS_IO_PATTERN>
Ritor1
parents:
diff changeset
448 )
Ritor1
parents:
diff changeset
449
Ritor1
parents:
diff changeset
450 // <rhtm-ck>
Ritor1
parents:
diff changeset
451 'rhtm'
Ritor1
parents:
diff changeset
452 (
Ritor1
parents:
diff changeset
453 // DWORD's representing rhythms for chord matching based on number
Ritor1
parents:
diff changeset
454 // of measures in the pattern
Ritor1
parents:
diff changeset
455 )
Ritor1
parents:
diff changeset
456
Ritor1
parents:
diff changeset
457
Ritor1
parents:
diff changeset
458 // pref-list
Ritor1
parents:
diff changeset
459 LIST
Ritor1
parents:
diff changeset
460 (
Ritor1
parents:
diff changeset
461 'pref'
Ritor1
parents:
diff changeset
462 <prfc-ck> // part ref chunk
Ritor1
parents:
diff changeset
463 )
Ritor1
parents:
diff changeset
464
Ritor1
parents:
diff changeset
465 // <prfc-ck>
Ritor1
parents:
diff changeset
466 prfc
Ritor1
parents:
diff changeset
467 (
Ritor1
parents:
diff changeset
468 <DMUS_IO_PARTREF>
Ritor1
parents:
diff changeset
469 )
Ritor1
parents:
diff changeset
470
Ritor1
parents:
diff changeset
471 // <mtfs-ck>
Ritor1
parents:
diff changeset
472 mtfs
Ritor1
parents:
diff changeset
473 (
Ritor1
parents:
diff changeset
474 <DMUS_IO_MOTIFSETTINGS>
Ritor1
parents:
diff changeset
475 )
Ritor1
parents:
diff changeset
476
Ritor1
parents:
diff changeset
477 // <prrf-list>
Ritor1
parents:
diff changeset
478 LIST
Ritor1
parents:
diff changeset
479 (
Ritor1
parents:
diff changeset
480 'prrf'
Ritor1
parents:
diff changeset
481 <DMRF-list>... // Array of Chordmap references
Ritor1
parents:
diff changeset
482 )
Ritor1
parents:
diff changeset
483 */
Ritor1
parents:
diff changeset
484
Ritor1
parents:
diff changeset
485 /* Pattern chunk, for use in Pattern tracks */
Ritor1
parents:
diff changeset
486
Ritor1
parents:
diff changeset
487 #define DMUS_FOURCC_PATTERN_FORM mmioFOURCC('D','M','P','T')
Ritor1
parents:
diff changeset
488
Ritor1
parents:
diff changeset
489 /*
Ritor1
parents:
diff changeset
490 RIFF
Ritor1
parents:
diff changeset
491 (
Ritor1
parents:
diff changeset
492 'DMPT' // Pattern
Ritor1
parents:
diff changeset
493 <styh-ck> // Style header chunk
Ritor1
parents:
diff changeset
494 <pttn-list> // The pattern, in single pattern format (includes DMUS_FOURCC_PART_LIST chunks)
Ritor1
parents:
diff changeset
495 )
Ritor1
parents:
diff changeset
496 */
Ritor1
parents:
diff changeset
497
Ritor1
parents:
diff changeset
498
Ritor1
parents:
diff changeset
499 /* Chord and command file formats */
Ritor1
parents:
diff changeset
500
Ritor1
parents:
diff changeset
501 /* These specify possible values for DMUS_IO_COMMAND.bRepeatMode (DirectX8) */
Ritor1
parents:
diff changeset
502 typedef enum enumDMUS_PATTERNT_TYPES
Ritor1
parents:
diff changeset
503 {
Ritor1
parents:
diff changeset
504 DMUS_PATTERNT_RANDOM = 0, /* Play randomly. (DirectX7 behavior) */
Ritor1
parents:
diff changeset
505 DMUS_PATTERNT_REPEAT = 1, /* Repeat last pattern. */
Ritor1
parents:
diff changeset
506 DMUS_PATTERNT_SEQUENTIAL = 2, /* Play sequential starting with first matching pattern. */
Ritor1
parents:
diff changeset
507 DMUS_PATTERNT_RANDOM_START = 3, /* Play sequential starting with a random pattern. */
Ritor1
parents:
diff changeset
508 DMUS_PATTERNT_NO_REPEAT = 4, /* Play randomly, but don't play the same pattern twice. */
Ritor1
parents:
diff changeset
509 DMUS_PATTERNT_RANDOM_ROW = 5 /* Play randomly as a row: don't repeat any pattern until all have played. */
Ritor1
parents:
diff changeset
510 } DMUS_PATTERNT_TYPES;
Ritor1
parents:
diff changeset
511
Ritor1
parents:
diff changeset
512
Ritor1
parents:
diff changeset
513 #define DMUS_FOURCC_CHORDTRACK_LIST mmioFOURCC('c','o','r','d')
Ritor1
parents:
diff changeset
514 #define DMUS_FOURCC_CHORDTRACKHEADER_CHUNK mmioFOURCC('c','r','d','h')
Ritor1
parents:
diff changeset
515 #define DMUS_FOURCC_CHORDTRACKBODY_CHUNK mmioFOURCC('c','r','d','b')
Ritor1
parents:
diff changeset
516
Ritor1
parents:
diff changeset
517 #define DMUS_FOURCC_COMMANDTRACK_CHUNK mmioFOURCC('c','m','n','d')
Ritor1
parents:
diff changeset
518
Ritor1
parents:
diff changeset
519 typedef struct _DMUS_IO_CHORD
Ritor1
parents:
diff changeset
520 {
Ritor1
parents:
diff changeset
521 WCHAR wszName[16]; /* Name of the chord */
Ritor1
parents:
diff changeset
522 MUSIC_TIME mtTime; /* Time of this chord */
Ritor1
parents:
diff changeset
523 WORD wMeasure; /* Measure this falls on */
Ritor1
parents:
diff changeset
524 BYTE bBeat; /* Beat this falls on */
Ritor1
parents:
diff changeset
525 BYTE bFlags; /* Various flags */
Ritor1
parents:
diff changeset
526 } DMUS_IO_CHORD;
Ritor1
parents:
diff changeset
527
Ritor1
parents:
diff changeset
528 typedef struct _DMUS_IO_SUBCHORD
Ritor1
parents:
diff changeset
529 {
Ritor1
parents:
diff changeset
530 DWORD dwChordPattern; /* Notes in the subchord */
Ritor1
parents:
diff changeset
531 DWORD dwScalePattern; /* Notes in the scale */
Ritor1
parents:
diff changeset
532 DWORD dwInversionPoints; /* Where inversions can occur */
Ritor1
parents:
diff changeset
533 DWORD dwLevels; /* Which levels are supported by this subchord */
Ritor1
parents:
diff changeset
534 BYTE bChordRoot; /* Root of the subchord */
Ritor1
parents:
diff changeset
535 BYTE bScaleRoot; /* Root of the scale */
Ritor1
parents:
diff changeset
536 } DMUS_IO_SUBCHORD;
Ritor1
parents:
diff changeset
537
Ritor1
parents:
diff changeset
538 typedef struct _DMUS_IO_COMMAND
Ritor1
parents:
diff changeset
539 {
Ritor1
parents:
diff changeset
540 MUSIC_TIME mtTime; /* Time of this command */
Ritor1
parents:
diff changeset
541 WORD wMeasure; /* Measure this falls on */
Ritor1
parents:
diff changeset
542 BYTE bBeat; /* Beat this falls on */
Ritor1
parents:
diff changeset
543 BYTE bCommand; /* Command type (see #defines below) */
Ritor1
parents:
diff changeset
544 BYTE bGrooveLevel; /* Groove level (0 if command is not a groove) */
Ritor1
parents:
diff changeset
545 BYTE bGrooveRange; /* Groove range */
Ritor1
parents:
diff changeset
546 BYTE bRepeatMode; /* Used to control selection of patterns with same groove level */
Ritor1
parents:
diff changeset
547 } DMUS_IO_COMMAND;
Ritor1
parents:
diff changeset
548
Ritor1
parents:
diff changeset
549
Ritor1
parents:
diff changeset
550 /*
Ritor1
parents:
diff changeset
551
Ritor1
parents:
diff changeset
552 // <cord-list>
Ritor1
parents:
diff changeset
553 LIST
Ritor1
parents:
diff changeset
554 (
Ritor1
parents:
diff changeset
555 'cord'
Ritor1
parents:
diff changeset
556 <crdh-ck>
Ritor1
parents:
diff changeset
557 <crdb-ck>... // Chord body chunks
Ritor1
parents:
diff changeset
558 )
Ritor1
parents:
diff changeset
559
Ritor1
parents:
diff changeset
560 // <crdh-ck>
Ritor1
parents:
diff changeset
561 crdh
Ritor1
parents:
diff changeset
562 (
Ritor1
parents:
diff changeset
563 // Scale: dword (upper 8 bits for root, lower 24 for scale)
Ritor1
parents:
diff changeset
564 )
Ritor1
parents:
diff changeset
565
Ritor1
parents:
diff changeset
566 // <crdb-ck>
Ritor1
parents:
diff changeset
567 crdb
Ritor1
parents:
diff changeset
568 (
Ritor1
parents:
diff changeset
569 // sizeof DMUS_IO_CHORD:dword
Ritor1
parents:
diff changeset
570 <DMUS_IO_CHORD>
Ritor1
parents:
diff changeset
571 // # of DMUS_IO_SUBCHORDS:dword
Ritor1
parents:
diff changeset
572 // sizeof DMUS_IO_SUBCHORDS:dword
Ritor1
parents:
diff changeset
573 // a number of <DMUS_IO_SUBCHORD>
Ritor1
parents:
diff changeset
574 )
Ritor1
parents:
diff changeset
575
Ritor1
parents:
diff changeset
576
Ritor1
parents:
diff changeset
577 // <cmnd-list>
Ritor1
parents:
diff changeset
578 'cmnd'
Ritor1
parents:
diff changeset
579 (
Ritor1
parents:
diff changeset
580 //sizeof DMUS_IO_COMMAND: DWORD
Ritor1
parents:
diff changeset
581 <DMUS_IO_COMMAND>...
Ritor1
parents:
diff changeset
582 )
Ritor1
parents:
diff changeset
583
Ritor1
parents:
diff changeset
584 */
Ritor1
parents:
diff changeset
585
Ritor1
parents:
diff changeset
586 /* File io for DirectMusic Tool and ToolGraph objects
Ritor1
parents:
diff changeset
587 */
Ritor1
parents:
diff changeset
588
Ritor1
parents:
diff changeset
589 /* RIFF ids: */
Ritor1
parents:
diff changeset
590
Ritor1
parents:
diff changeset
591 #define DMUS_FOURCC_TOOLGRAPH_FORM mmioFOURCC('D','M','T','G')
Ritor1
parents:
diff changeset
592 #define DMUS_FOURCC_TOOL_LIST mmioFOURCC('t','o','l','l')
Ritor1
parents:
diff changeset
593 #define DMUS_FOURCC_TOOL_FORM mmioFOURCC('D','M','T','L')
Ritor1
parents:
diff changeset
594 #define DMUS_FOURCC_TOOL_CHUNK mmioFOURCC('t','o','l','h')
Ritor1
parents:
diff changeset
595
Ritor1
parents:
diff changeset
596 /* io structures: */
Ritor1
parents:
diff changeset
597
Ritor1
parents:
diff changeset
598 typedef struct _DMUS_IO_TOOL_HEADER
Ritor1
parents:
diff changeset
599 {
Ritor1
parents:
diff changeset
600 GUID guidClassID; /* Class id of tool. */
Ritor1
parents:
diff changeset
601 long lIndex; /* Position in graph. */
Ritor1
parents:
diff changeset
602 DWORD cPChannels; /* Number of items in channels array. */
Ritor1
parents:
diff changeset
603 FOURCC ckid; /* chunk ID of tool's data chunk if 0 fccType valid. */
Ritor1
parents:
diff changeset
604 FOURCC fccType; /* list type if NULL ckid valid. */
Ritor1
parents:
diff changeset
605 DWORD dwPChannels[1]; /* Array of PChannels, size determined by cPChannels. */
Ritor1
parents:
diff changeset
606 } DMUS_IO_TOOL_HEADER;
Ritor1
parents:
diff changeset
607
Ritor1
parents:
diff changeset
608 /*
Ritor1
parents:
diff changeset
609 RIFF
Ritor1
parents:
diff changeset
610 (
Ritor1
parents:
diff changeset
611 'DMTG' // DirectMusic ToolGraph chunk
Ritor1
parents:
diff changeset
612 [<guid-ck>] // GUID for ToolGraph
Ritor1
parents:
diff changeset
613 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
614 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
615 <toll-list> // List of Tools
Ritor1
parents:
diff changeset
616 )
Ritor1
parents:
diff changeset
617
Ritor1
parents:
diff changeset
618 // <guid-ck>
Ritor1
parents:
diff changeset
619 'guid'
Ritor1
parents:
diff changeset
620 (
Ritor1
parents:
diff changeset
621 <GUID>
Ritor1
parents:
diff changeset
622 )
Ritor1
parents:
diff changeset
623
Ritor1
parents:
diff changeset
624 // <vers-ck>
Ritor1
parents:
diff changeset
625 vers
Ritor1
parents:
diff changeset
626 (
Ritor1
parents:
diff changeset
627 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
628 )
Ritor1
parents:
diff changeset
629
Ritor1
parents:
diff changeset
630 // <toll-list>
Ritor1
parents:
diff changeset
631 LIST
Ritor1
parents:
diff changeset
632 (
Ritor1
parents:
diff changeset
633 'toll' // Array of tools
Ritor1
parents:
diff changeset
634 <DMTL-form>... // Each tool is encapsulated in a RIFF chunk
Ritor1
parents:
diff changeset
635 )
Ritor1
parents:
diff changeset
636
Ritor1
parents:
diff changeset
637 // <DMTL-form> Tools are embedded in a graph. Theoretically, they can be saved as individual files too.
Ritor1
parents:
diff changeset
638 RIFF
Ritor1
parents:
diff changeset
639 (
Ritor1
parents:
diff changeset
640 'DMTL'
Ritor1
parents:
diff changeset
641 <tolh-ck>
Ritor1
parents:
diff changeset
642 [<data>] // Tool data. Must be a RIFF readable chunk.
Ritor1
parents:
diff changeset
643 )
Ritor1
parents:
diff changeset
644
Ritor1
parents:
diff changeset
645 // <tolh-ck> // Tool header chunk
Ritor1
parents:
diff changeset
646 (
Ritor1
parents:
diff changeset
647 'tolh'
Ritor1
parents:
diff changeset
648 <DMUS_IO_TOOL_HEADER> // Tool header
Ritor1
parents:
diff changeset
649 )
Ritor1
parents:
diff changeset
650 */
Ritor1
parents:
diff changeset
651
Ritor1
parents:
diff changeset
652 /* The AudioPath file carries everything for describing a specific audio path,
Ritor1
parents:
diff changeset
653 including Tool Graph and Buffer Descriptor.
Ritor1
parents:
diff changeset
654 This can even be used for configuring a complete performance.
Ritor1
parents:
diff changeset
655 */
Ritor1
parents:
diff changeset
656
Ritor1
parents:
diff changeset
657 #define DMUS_FOURCC_AUDIOPATH_FORM mmioFOURCC('D','M','A','P')
Ritor1
parents:
diff changeset
658
Ritor1
parents:
diff changeset
659 /*
Ritor1
parents:
diff changeset
660 RIFF
Ritor1
parents:
diff changeset
661 (
Ritor1
parents:
diff changeset
662 'DMAP' // DirectMusic AudioPath chunk
Ritor1
parents:
diff changeset
663 [<guid-ck>] // GUID for this Audio Path configuration
Ritor1
parents:
diff changeset
664 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
665 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
666 [<DMTG-form>] // Optional ToolGraph
Ritor1
parents:
diff changeset
667 [<pcsl-list>] // Optional list of port configurations
Ritor1
parents:
diff changeset
668 [<dbfl-list>]...// Optional array of DirectSound buffer descriptors
Ritor1
parents:
diff changeset
669 )
Ritor1
parents:
diff changeset
670 */
Ritor1
parents:
diff changeset
671
Ritor1
parents:
diff changeset
672 #define DMUS_FOURCC_PORTCONFIGS_LIST mmioFOURCC('p','c','s','l')
Ritor1
parents:
diff changeset
673 #define DMUS_FOURCC_PORTCONFIG_LIST mmioFOURCC('p','c','f','l')
Ritor1
parents:
diff changeset
674 #define DMUS_FOURCC_PORTCONFIG_ITEM mmioFOURCC('p','c','f','h')
Ritor1
parents:
diff changeset
675 #define DMUS_FOURCC_PORTPARAMS_ITEM mmioFOURCC('p','p','r','h')
Ritor1
parents:
diff changeset
676 #define DMUS_FOURCC_DSBUFFER_LIST mmioFOURCC('d','b','f','l')
Ritor1
parents:
diff changeset
677 #define DMUS_FOURCC_DSBUFFATTR_ITEM mmioFOURCC('d','d','a','h')
Ritor1
parents:
diff changeset
678 #define DMUS_FOURCC_PCHANNELS_LIST mmioFOURCC('p','c','h','l')
Ritor1
parents:
diff changeset
679 #define DMUS_FOURCC_PCHANNELS_ITEM mmioFOURCC('p','c','h','h')
Ritor1
parents:
diff changeset
680
Ritor1
parents:
diff changeset
681 typedef struct _DMUS_IO_PORTCONFIG_HEADER
Ritor1
parents:
diff changeset
682 {
Ritor1
parents:
diff changeset
683 GUID guidPort; /* GUID of requested port. */
Ritor1
parents:
diff changeset
684 DWORD dwPChannelBase; /* PChannel that this should start on. */
Ritor1
parents:
diff changeset
685 DWORD dwPChannelCount; /* How many channels. */
Ritor1
parents:
diff changeset
686 DWORD dwFlags; /* Various flags. */
Ritor1
parents:
diff changeset
687 } DMUS_IO_PORTCONFIG_HEADER;
Ritor1
parents:
diff changeset
688
Ritor1
parents:
diff changeset
689 #define DMUS_PORTCONFIGF_DRUMSON10 1 /* This port configured for drums on channel 10. */
Ritor1
parents:
diff changeset
690 #define DMUS_PORTCONFIGF_USEDEFAULT 2 /* Use the default port. */
Ritor1
parents:
diff changeset
691
Ritor1
parents:
diff changeset
692 /* Each portconfig has one or more pchannel to buffer mappings. Each buffer
Ritor1
parents:
diff changeset
693 is identified by a guid. Each pchannel can map to one or more buffers.
Ritor1
parents:
diff changeset
694 This is defined with one or more DMUS_IO_PCHANNELTOBUFFER_HEADER
Ritor1
parents:
diff changeset
695 structures. Each defines a range of PChannels and the set of buffers
Ritor1
parents:
diff changeset
696 that they connect to.
Ritor1
parents:
diff changeset
697 */
Ritor1
parents:
diff changeset
698
Ritor1
parents:
diff changeset
699 typedef struct _DMUS_IO_PCHANNELTOBUFFER_HEADER
Ritor1
parents:
diff changeset
700 {
Ritor1
parents:
diff changeset
701 DWORD dwPChannelBase; /* PChannel that this should start on. */
Ritor1
parents:
diff changeset
702 DWORD dwPChannelCount; /* How many PChannels. */
Ritor1
parents:
diff changeset
703 DWORD dwBufferCount; /* How many buffers do these connect to. */
Ritor1
parents:
diff changeset
704 DWORD dwFlags; /* Various flags. Currently reserved for future use. Must be 0. */
Ritor1
parents:
diff changeset
705 } DMUS_IO_PCHANNELTOBUFFER_HEADER;
Ritor1
parents:
diff changeset
706
Ritor1
parents:
diff changeset
707 /* Each buffer is represented by an DSBC form. This is wrapped by the
Ritor1
parents:
diff changeset
708 DMUS_IO_BUFFER_ATTRIBUTES_HEADER which identifies how to use the
Ritor1
parents:
diff changeset
709 buffer. In particular, it indicates whether this gets dynamically duplicated
Ritor1
parents:
diff changeset
710 or all references to this should share the same instance.
Ritor1
parents:
diff changeset
711 To resolve references, the unique GUID of the buffer is also stored
Ritor1
parents:
diff changeset
712 in this structure.
Ritor1
parents:
diff changeset
713 */
Ritor1
parents:
diff changeset
714
Ritor1
parents:
diff changeset
715 typedef struct _DMUS_IO_BUFFER_ATTRIBUTES_HEADER
Ritor1
parents:
diff changeset
716 {
Ritor1
parents:
diff changeset
717 GUID guidBufferID; /* Each buffer config has a unique ID. */
Ritor1
parents:
diff changeset
718 DWORD dwFlags; /* Various flags. */
Ritor1
parents:
diff changeset
719 } DMUS_IO_BUFFER_ATTRIBUTES_HEADER;
Ritor1
parents:
diff changeset
720
Ritor1
parents:
diff changeset
721 /* DMUS_IO_BUFFER_ATTRIBUTES_HEADER.dwFlags: */
Ritor1
parents:
diff changeset
722 #define DMUS_BUFFERF_SHARED 1 /* Share this with other audio paths, instead of creating unique copies. */
Ritor1
parents:
diff changeset
723 #define DMUS_BUFFERF_DEFINED 2 /* Use one of the standard predefined buffers (see GUID_Buffer... in dmusici.h.) */
Ritor1
parents:
diff changeset
724 #define DMUS_BUFFERF_MIXIN 8 /* This is a mixin buffer. */
Ritor1
parents:
diff changeset
725
Ritor1
parents:
diff changeset
726 /*
Ritor1
parents:
diff changeset
727
Ritor1
parents:
diff changeset
728 LIST
Ritor1
parents:
diff changeset
729 (
Ritor1
parents:
diff changeset
730 'pcsl' // Array of port configurations
Ritor1
parents:
diff changeset
731 <pcfl-list>... // One or more port configurations, each in a list chunk
Ritor1
parents:
diff changeset
732 )
Ritor1
parents:
diff changeset
733
Ritor1
parents:
diff changeset
734 LIST
Ritor1
parents:
diff changeset
735 (
Ritor1
parents:
diff changeset
736 'pcfl' // List container for one port configuration.
Ritor1
parents:
diff changeset
737 <pcfh-ck> // Portconfig header chunk.
Ritor1
parents:
diff changeset
738 <pprh-ck> // Port params, to be used to create the port.
Ritor1
parents:
diff changeset
739 [<dbfl-list>]...// Optional array of DirectSound buffer descriptors
Ritor1
parents:
diff changeset
740 [<pchl-list>] // Optional list of pchannel to buffer assignments
Ritor1
parents:
diff changeset
741
Ritor1
parents:
diff changeset
742 )
Ritor1
parents:
diff changeset
743
Ritor1
parents:
diff changeset
744 // <pcfh-ck> // Port config header chunk
Ritor1
parents:
diff changeset
745 (
Ritor1
parents:
diff changeset
746 'pcfh'
Ritor1
parents:
diff changeset
747 <DMUS_IO_PORTCONFIG_HEADER> // Port config header
Ritor1
parents:
diff changeset
748 )
Ritor1
parents:
diff changeset
749
Ritor1
parents:
diff changeset
750 // <pprh-ck> // Port params header chunk
Ritor1
parents:
diff changeset
751 (
Ritor1
parents:
diff changeset
752 'pprh'
Ritor1
parents:
diff changeset
753 <DMUS_PORTPARAMS8> // Port params header
Ritor1
parents:
diff changeset
754 )
Ritor1
parents:
diff changeset
755
Ritor1
parents:
diff changeset
756 LIST
Ritor1
parents:
diff changeset
757 (
Ritor1
parents:
diff changeset
758 'pchl' // List container for one or more pchannel to buffer assignments.
Ritor1
parents:
diff changeset
759 <pchh-ck>... // One or more pchannel to buffer assignment headers and data.
Ritor1
parents:
diff changeset
760
Ritor1
parents:
diff changeset
761 // <pchh-ck>
Ritor1
parents:
diff changeset
762 (
Ritor1
parents:
diff changeset
763 'pchh'
Ritor1
parents:
diff changeset
764 <DMUS_IO_PCHANNELTOBUFFER_HEADER> // Description of PChannels
Ritor1
parents:
diff changeset
765 <GUID>... // Array of GUIDs defining the buffers they all connect to.
Ritor1
parents:
diff changeset
766 )
Ritor1
parents:
diff changeset
767 )
Ritor1
parents:
diff changeset
768
Ritor1
parents:
diff changeset
769 LIST
Ritor1
parents:
diff changeset
770 (
Ritor1
parents:
diff changeset
771 'dbfl' // List container for one buffer and buffer attributes header.
Ritor1
parents:
diff changeset
772 <ddah-ck> // Buffer attributes header.
Ritor1
parents:
diff changeset
773 [<DSBC-form>] // Buffer configuration. Not required when header uses a predefined buffer type.
Ritor1
parents:
diff changeset
774
Ritor1
parents:
diff changeset
775 // <ddah-ck>
Ritor1
parents:
diff changeset
776 (
Ritor1
parents:
diff changeset
777 'ddah'
Ritor1
parents:
diff changeset
778 <DMUS_IO_BUFFER_ATTRIBUTES_HEADER> // Buffer attributes.
Ritor1
parents:
diff changeset
779 )
Ritor1
parents:
diff changeset
780 )
Ritor1
parents:
diff changeset
781 */
Ritor1
parents:
diff changeset
782
Ritor1
parents:
diff changeset
783 /* File io for DirectMusic Band Track object */
Ritor1
parents:
diff changeset
784
Ritor1
parents:
diff changeset
785
Ritor1
parents:
diff changeset
786 /* RIFF ids: */
Ritor1
parents:
diff changeset
787 #define DMUS_FOURCC_BANDTRACK_FORM mmioFOURCC('D','M','B','T')
Ritor1
parents:
diff changeset
788 #define DMUS_FOURCC_BANDTRACK_CHUNK mmioFOURCC('b','d','t','h')
Ritor1
parents:
diff changeset
789 #define DMUS_FOURCC_BANDS_LIST mmioFOURCC('l','b','d','l')
Ritor1
parents:
diff changeset
790 #define DMUS_FOURCC_BAND_LIST mmioFOURCC('l','b','n','d')
Ritor1
parents:
diff changeset
791 #define DMUS_FOURCC_BANDITEM_CHUNK mmioFOURCC('b','d','i','h')
Ritor1
parents:
diff changeset
792 #define DMUS_FOURCC_BANDITEM_CHUNK2 mmioFOURCC('b','d','2','h')
Ritor1
parents:
diff changeset
793
Ritor1
parents:
diff changeset
794 /* io structures */
Ritor1
parents:
diff changeset
795 typedef struct _DMUS_IO_BAND_TRACK_HEADER
Ritor1
parents:
diff changeset
796 {
Ritor1
parents:
diff changeset
797 BOOL bAutoDownload; /* Determines if Auto-Download is enabled. */
Ritor1
parents:
diff changeset
798 } DMUS_IO_BAND_TRACK_HEADER;
Ritor1
parents:
diff changeset
799
Ritor1
parents:
diff changeset
800 typedef struct _DMUS_IO_BAND_ITEM_HEADER
Ritor1
parents:
diff changeset
801 {
Ritor1
parents:
diff changeset
802 MUSIC_TIME lBandTime; /* Position in track list. */
Ritor1
parents:
diff changeset
803 } DMUS_IO_BAND_ITEM_HEADER;
Ritor1
parents:
diff changeset
804
Ritor1
parents:
diff changeset
805 typedef struct _DMUS_IO_BAND_ITEM_HEADER2
Ritor1
parents:
diff changeset
806 {
Ritor1
parents:
diff changeset
807 MUSIC_TIME lBandTimeLogical; /* Position in track list. Time in the music with which band change is associated. */
Ritor1
parents:
diff changeset
808 MUSIC_TIME lBandTimePhysical; /* Precise time band change will take effect. Should be close to logical time. */
Ritor1
parents:
diff changeset
809 } DMUS_IO_BAND_ITEM_HEADER2;
Ritor1
parents:
diff changeset
810
Ritor1
parents:
diff changeset
811 /*
Ritor1
parents:
diff changeset
812 RIFF
Ritor1
parents:
diff changeset
813 (
Ritor1
parents:
diff changeset
814 'DMBT' // DirectMusic Band Track form-type
Ritor1
parents:
diff changeset
815 [<bdth-ck>] // Band track header
Ritor1
parents:
diff changeset
816 [<guid-ck>] // GUID for band track
Ritor1
parents:
diff changeset
817 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
818 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
819 <lbdl-list> // List of Band items
Ritor1
parents:
diff changeset
820 )
Ritor1
parents:
diff changeset
821
Ritor1
parents:
diff changeset
822 // <bnth-ck>
Ritor1
parents:
diff changeset
823 'bdth'
Ritor1
parents:
diff changeset
824 (
Ritor1
parents:
diff changeset
825 <DMUS_IO_BAND_TRACK_HEADER>
Ritor1
parents:
diff changeset
826 )
Ritor1
parents:
diff changeset
827
Ritor1
parents:
diff changeset
828 // <guid-ck>
Ritor1
parents:
diff changeset
829 'guid'
Ritor1
parents:
diff changeset
830 (
Ritor1
parents:
diff changeset
831 <GUID>
Ritor1
parents:
diff changeset
832 )
Ritor1
parents:
diff changeset
833
Ritor1
parents:
diff changeset
834 // <vers-ck>
Ritor1
parents:
diff changeset
835 vers
Ritor1
parents:
diff changeset
836 (
Ritor1
parents:
diff changeset
837 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
838 )
Ritor1
parents:
diff changeset
839
Ritor1
parents:
diff changeset
840 // <lbdl-list>
Ritor1
parents:
diff changeset
841 LIST
Ritor1
parents:
diff changeset
842 (
Ritor1
parents:
diff changeset
843 'lbdl'
Ritor1
parents:
diff changeset
844 <lbnd-list>... // Array of bands, each encapsulated in a list chunk
Ritor1
parents:
diff changeset
845 )
Ritor1
parents:
diff changeset
846
Ritor1
parents:
diff changeset
847 // <lbnd-list>
Ritor1
parents:
diff changeset
848 LIST
Ritor1
parents:
diff changeset
849 (
Ritor1
parents:
diff changeset
850 'lbnd'
Ritor1
parents:
diff changeset
851 <bdih-ck> or <bd2h-ck> // bdih is a legacy format. bd2h is preferred for new content.
Ritor1
parents:
diff changeset
852 <DMBD-form> // Band
Ritor1
parents:
diff changeset
853 )
Ritor1
parents:
diff changeset
854
Ritor1
parents:
diff changeset
855 // <bdih-ck> or <bd2h-ck> // band item header
Ritor1
parents:
diff changeset
856 (
Ritor1
parents:
diff changeset
857 <DMUS_IO_BAND_ITEM_HEADER> or <DMUS_IO_BAND_ITEM_HEADER2> // Band item header
Ritor1
parents:
diff changeset
858 )
Ritor1
parents:
diff changeset
859 */
Ritor1
parents:
diff changeset
860
Ritor1
parents:
diff changeset
861
Ritor1
parents:
diff changeset
862 /* File io for DirectMusic Band object
Ritor1
parents:
diff changeset
863 */
Ritor1
parents:
diff changeset
864
Ritor1
parents:
diff changeset
865 /* RIFF ids: */
Ritor1
parents:
diff changeset
866
Ritor1
parents:
diff changeset
867 #define DMUS_FOURCC_BAND_FORM mmioFOURCC('D','M','B','D')
Ritor1
parents:
diff changeset
868 #define DMUS_FOURCC_INSTRUMENTS_LIST mmioFOURCC('l','b','i','l')
Ritor1
parents:
diff changeset
869 #define DMUS_FOURCC_INSTRUMENT_LIST mmioFOURCC('l','b','i','n')
Ritor1
parents:
diff changeset
870 #define DMUS_FOURCC_INSTRUMENT_CHUNK mmioFOURCC('b','i','n','s')
Ritor1
parents:
diff changeset
871
Ritor1
parents:
diff changeset
872 /* Flags for DMUS_IO_INSTRUMENT
Ritor1
parents:
diff changeset
873 */
Ritor1
parents:
diff changeset
874 #define DMUS_IO_INST_PATCH (1 << 0) /* dwPatch is valid. */
Ritor1
parents:
diff changeset
875 #define DMUS_IO_INST_BANKSELECT (1 << 1) /* dwPatch contains a valid Bank Select MSB and LSB part */
Ritor1
parents:
diff changeset
876 #define DMUS_IO_INST_ASSIGN_PATCH (1 << 3) /* dwAssignPatch is valid */
Ritor1
parents:
diff changeset
877 #define DMUS_IO_INST_NOTERANGES (1 << 4) /* dwNoteRanges is valid */
Ritor1
parents:
diff changeset
878 #define DMUS_IO_INST_PAN (1 << 5) /* bPan is valid */
Ritor1
parents:
diff changeset
879 #define DMUS_IO_INST_VOLUME (1 << 6 ) /* bVolume is valid */
Ritor1
parents:
diff changeset
880 #define DMUS_IO_INST_TRANSPOSE (1 << 7) /* nTranspose is valid */
Ritor1
parents:
diff changeset
881 #define DMUS_IO_INST_GM (1 << 8) /* Instrument is from GM collection */
Ritor1
parents:
diff changeset
882 #define DMUS_IO_INST_GS (1 << 9) /* Instrument is from GS collection */
Ritor1
parents:
diff changeset
883 #define DMUS_IO_INST_XG (1 << 10) /* Instrument is from XG collection */
Ritor1
parents:
diff changeset
884 #define DMUS_IO_INST_CHANNEL_PRIORITY (1 << 11) /* dwChannelPriority is valid */
Ritor1
parents:
diff changeset
885 #define DMUS_IO_INST_USE_DEFAULT_GM_SET (1 << 12) /* Always use the default GM set for this patch, */
Ritor1
parents:
diff changeset
886 /* don't rely on the synth caps stating GM or GS in hardware. */
Ritor1
parents:
diff changeset
887 #define DMUS_IO_INST_PITCHBENDRANGE (1 << 13) /* nPitchBendRange is valid */
Ritor1
parents:
diff changeset
888
Ritor1
parents:
diff changeset
889 /* io structures */
Ritor1
parents:
diff changeset
890 typedef struct _DMUS_IO_INSTRUMENT
Ritor1
parents:
diff changeset
891 {
Ritor1
parents:
diff changeset
892 DWORD dwPatch; /* MSB, LSB and Program change to define instrument */
Ritor1
parents:
diff changeset
893 DWORD dwAssignPatch; /* MSB, LSB and Program change to assign to instrument when downloading */
Ritor1
parents:
diff changeset
894 DWORD dwNoteRanges[4]; /* 128 bits; one for each MIDI note instrument needs to able to play */
Ritor1
parents:
diff changeset
895 DWORD dwPChannel; /* PChannel instrument plays on */
Ritor1
parents:
diff changeset
896 DWORD dwFlags; /* DMUS_IO_INST_ flags */
Ritor1
parents:
diff changeset
897 BYTE bPan; /* Pan for instrument */
Ritor1
parents:
diff changeset
898 BYTE bVolume; /* Volume for instrument */
Ritor1
parents:
diff changeset
899 short nTranspose; /* Number of semitones to transpose notes */
Ritor1
parents:
diff changeset
900 DWORD dwChannelPriority; /* Channel priority */
Ritor1
parents:
diff changeset
901 short nPitchBendRange; /* Number of semitones shifted by pitch bend */
Ritor1
parents:
diff changeset
902 } DMUS_IO_INSTRUMENT;
Ritor1
parents:
diff changeset
903
Ritor1
parents:
diff changeset
904 /*
Ritor1
parents:
diff changeset
905 // <DMBD-form> bands can be embedded in other forms
Ritor1
parents:
diff changeset
906 RIFF
Ritor1
parents:
diff changeset
907 (
Ritor1
parents:
diff changeset
908 'DMBD' // DirectMusic Band chunk
Ritor1
parents:
diff changeset
909 [<guid-ck>] // GUID for band
Ritor1
parents:
diff changeset
910 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
911 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
912 <lbil-list> // List of Instruments
Ritor1
parents:
diff changeset
913 )
Ritor1
parents:
diff changeset
914
Ritor1
parents:
diff changeset
915 // <guid-ck>
Ritor1
parents:
diff changeset
916 'guid'
Ritor1
parents:
diff changeset
917 (
Ritor1
parents:
diff changeset
918 <GUID>
Ritor1
parents:
diff changeset
919 )
Ritor1
parents:
diff changeset
920
Ritor1
parents:
diff changeset
921 // <vers-ck>
Ritor1
parents:
diff changeset
922 vers
Ritor1
parents:
diff changeset
923 (
Ritor1
parents:
diff changeset
924 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
925 )
Ritor1
parents:
diff changeset
926
Ritor1
parents:
diff changeset
927 // <lbil-list>
Ritor1
parents:
diff changeset
928 LIST
Ritor1
parents:
diff changeset
929 (
Ritor1
parents:
diff changeset
930 'lbil' // Array of instruments
Ritor1
parents:
diff changeset
931 <lbin-list>... // Each instrument is encapsulated in a list
Ritor1
parents:
diff changeset
932 )
Ritor1
parents:
diff changeset
933
Ritor1
parents:
diff changeset
934 // <lbin-list>
Ritor1
parents:
diff changeset
935 LIST
Ritor1
parents:
diff changeset
936 (
Ritor1
parents:
diff changeset
937 'lbin'
Ritor1
parents:
diff changeset
938 <bins-ck>
Ritor1
parents:
diff changeset
939 [<DMRF-list>] // Optional reference to DLS Collection file.
Ritor1
parents:
diff changeset
940 )
Ritor1
parents:
diff changeset
941
Ritor1
parents:
diff changeset
942 // <bins-ck> // Instrument chunk
Ritor1
parents:
diff changeset
943 (
Ritor1
parents:
diff changeset
944 'bins'
Ritor1
parents:
diff changeset
945 <DMUS_IO_INSTRUMENT> // Instrument header
Ritor1
parents:
diff changeset
946 )
Ritor1
parents:
diff changeset
947 */
Ritor1
parents:
diff changeset
948
Ritor1
parents:
diff changeset
949 /* This RIFF id and io struct have been added to allow wave files (and the wave object) to
Ritor1
parents:
diff changeset
950 differentiate between streaming and one-shot waves, and to give a prefetch for streaming
Ritor1
parents:
diff changeset
951 waves */
Ritor1
parents:
diff changeset
952
Ritor1
parents:
diff changeset
953 #define DMUS_FOURCC_WAVEHEADER_CHUNK mmioFOURCC('w','a','v','h')
Ritor1
parents:
diff changeset
954
Ritor1
parents:
diff changeset
955 typedef struct _DMUS_IO_WAVE_HEADER
Ritor1
parents:
diff changeset
956 {
Ritor1
parents:
diff changeset
957 REFERENCE_TIME rtReadAhead; /* How far ahead in the stream wave data will be read (in REFERENCE_TIME). Ignored for one-shot waves. */
Ritor1
parents:
diff changeset
958 DWORD dwFlags; /* Various flags, including whether this is a streaming wave and whether it can be invalidated. */
Ritor1
parents:
diff changeset
959 } DMUS_IO_WAVE_HEADER;
Ritor1
parents:
diff changeset
960
Ritor1
parents:
diff changeset
961
Ritor1
parents:
diff changeset
962 /* File io for Wave track */
Ritor1
parents:
diff changeset
963
Ritor1
parents:
diff changeset
964 /* RIFF ids: */
Ritor1
parents:
diff changeset
965
Ritor1
parents:
diff changeset
966 #define DMUS_FOURCC_WAVETRACK_LIST mmioFOURCC('w','a','v','t')
Ritor1
parents:
diff changeset
967 #define DMUS_FOURCC_WAVETRACK_CHUNK mmioFOURCC('w','a','t','h')
Ritor1
parents:
diff changeset
968 #define DMUS_FOURCC_WAVEPART_LIST mmioFOURCC('w','a','v','p')
Ritor1
parents:
diff changeset
969 #define DMUS_FOURCC_WAVEPART_CHUNK mmioFOURCC('w','a','p','h')
Ritor1
parents:
diff changeset
970 #define DMUS_FOURCC_WAVEITEM_LIST mmioFOURCC('w','a','v','i')
Ritor1
parents:
diff changeset
971 #define DMUS_FOURCC_WAVE_LIST mmioFOURCC('w','a','v','e')
Ritor1
parents:
diff changeset
972 #define DMUS_FOURCC_WAVEITEM_CHUNK mmioFOURCC('w','a','i','h')
Ritor1
parents:
diff changeset
973
Ritor1
parents:
diff changeset
974 /* This flag is included in DMUS_IO_WAVE_TRACK_HEADER.dwFlags. If set, the track will get its
Ritor1
parents:
diff changeset
975 variations from a pattern track, via GetParam(GUID_Variations). */
Ritor1
parents:
diff changeset
976 #define DMUS_WAVETRACKF_SYNC_VAR 0x1
Ritor1
parents:
diff changeset
977 /* This is also included in DMUS_IO_WAVE_TRACK_HEADER.dwFlags. If set, variation control
Ritor1
parents:
diff changeset
978 information will persist from one playback instance to the next.*/
Ritor1
parents:
diff changeset
979 #define DMUS_WAVETRACKF_PERSIST_CONTROL 0x2
Ritor1
parents:
diff changeset
980
Ritor1
parents:
diff changeset
981 typedef struct _DMUS_IO_WAVE_TRACK_HEADER
Ritor1
parents:
diff changeset
982 {
Ritor1
parents:
diff changeset
983 long lVolume; /* Gain, in 1/100th of dB, to be applied to all waves. Note: All gain values should be negative. */
Ritor1
parents:
diff changeset
984 DWORD dwFlags; /* Flags, including whether this track syncs to a pattern track for its variations. */
Ritor1
parents:
diff changeset
985 } DMUS_IO_WAVE_TRACK_HEADER;
Ritor1
parents:
diff changeset
986
Ritor1
parents:
diff changeset
987 typedef struct _DMUS_IO_WAVE_PART_HEADER
Ritor1
parents:
diff changeset
988 {
Ritor1
parents:
diff changeset
989 long lVolume; /* Gain, in 1/100th of dB, to be applied to all waves in wave part. Note: All gain values should be negative. */
Ritor1
parents:
diff changeset
990 DWORD dwVariations; /* Variation mask for which of 32 variations */
Ritor1
parents:
diff changeset
991 DWORD dwPChannel; /* PChannel */
Ritor1
parents:
diff changeset
992 DWORD dwLockToPart; /* Part ID to lock to. */
Ritor1
parents:
diff changeset
993 DWORD dwFlags; /* Flags, including stuff for managing how variations are chosen (in low-order nibble) */
Ritor1
parents:
diff changeset
994 DWORD dwIndex; /* Index for distinguishing multiple parts on the same PChannel*/
Ritor1
parents:
diff changeset
995 } DMUS_IO_WAVE_PART_HEADER;
Ritor1
parents:
diff changeset
996
Ritor1
parents:
diff changeset
997 typedef struct _DMUS_IO_WAVE_ITEM_HEADER
Ritor1
parents:
diff changeset
998 {
Ritor1
parents:
diff changeset
999 long lVolume; /* Gain, in 1/100th of dB. Note: All gain values should be negative. */
Ritor1
parents:
diff changeset
1000 long lPitch; /* Pitch offset in 1/100th of a semitone. */
Ritor1
parents:
diff changeset
1001 DWORD dwVariations; /* Variation flags for which of 32 variations this wave belongs to. */
Ritor1
parents:
diff changeset
1002 REFERENCE_TIME rtTime; /* Start time, in REFERENCE_TIME, if Timer time track, or MUSIC_TIME for music time track. */
Ritor1
parents:
diff changeset
1003 REFERENCE_TIME rtStartOffset; /* Distance into wave to start playback, in reference time units. */
Ritor1
parents:
diff changeset
1004 REFERENCE_TIME rtReserved; /* Reserved field. */
Ritor1
parents:
diff changeset
1005 REFERENCE_TIME rtDuration; /* Duration, in REFERENCE_TIME or MUSIC_TIME, depending on track timing format. */
Ritor1
parents:
diff changeset
1006 MUSIC_TIME mtLogicalTime; /* If in music track format, this indicates the musical boundary where this belongs. Otherwise, ignored. */
Ritor1
parents:
diff changeset
1007 DWORD dwLoopStart; /* Start point for a looping wave. */
Ritor1
parents:
diff changeset
1008 DWORD dwLoopEnd; /* End point for a looping wave. */
Ritor1
parents:
diff changeset
1009 DWORD dwFlags; /* Various flags, including whether this is a streaming wave and whether it can be invalidated. */
Ritor1
parents:
diff changeset
1010 WORD wVolumeRange; /* Random range for volume. */
Ritor1
parents:
diff changeset
1011 WORD wPitchRange; /* Random range for pitch. */
Ritor1
parents:
diff changeset
1012 } DMUS_IO_WAVE_ITEM_HEADER;
Ritor1
parents:
diff changeset
1013
Ritor1
parents:
diff changeset
1014 /*
Ritor1
parents:
diff changeset
1015 LIST
Ritor1
parents:
diff changeset
1016 {
Ritor1
parents:
diff changeset
1017 'wavt' // Wave track chunk
Ritor1
parents:
diff changeset
1018 <wath-ck> // Wave track header
Ritor1
parents:
diff changeset
1019 <wavp-list>... // Array of Wave Parts
Ritor1
parents:
diff changeset
1020 }
Ritor1
parents:
diff changeset
1021 // <wath-ck>
Ritor1
parents:
diff changeset
1022 'wath'
Ritor1
parents:
diff changeset
1023 {
Ritor1
parents:
diff changeset
1024 <DMUS_IO_WAVE_TRACK_HEADER>
Ritor1
parents:
diff changeset
1025 }
Ritor1
parents:
diff changeset
1026
Ritor1
parents:
diff changeset
1027 // <wavp-list>
Ritor1
parents:
diff changeset
1028 LIST
Ritor1
parents:
diff changeset
1029 {
Ritor1
parents:
diff changeset
1030 'wavp'
Ritor1
parents:
diff changeset
1031 <waph-ck> // Wave Part Header
Ritor1
parents:
diff changeset
1032 <wavi-list> // List of wave items
Ritor1
parents:
diff changeset
1033 }
Ritor1
parents:
diff changeset
1034
Ritor1
parents:
diff changeset
1035 // <waph-ck>
Ritor1
parents:
diff changeset
1036 'waph'
Ritor1
parents:
diff changeset
1037 {
Ritor1
parents:
diff changeset
1038 <DMUS_IO_WAVE_PART_HEADER>
Ritor1
parents:
diff changeset
1039 }
Ritor1
parents:
diff changeset
1040
Ritor1
parents:
diff changeset
1041 // <wavi-list>
Ritor1
parents:
diff changeset
1042 LIST
Ritor1
parents:
diff changeset
1043 {
Ritor1
parents:
diff changeset
1044 'wavi'
Ritor1
parents:
diff changeset
1045 <wave-list>... // Array of waves; each wave is encapsulated in a list
Ritor1
parents:
diff changeset
1046 }
Ritor1
parents:
diff changeset
1047
Ritor1
parents:
diff changeset
1048 // <wave-list>
Ritor1
parents:
diff changeset
1049 LIST
Ritor1
parents:
diff changeset
1050 {
Ritor1
parents:
diff changeset
1051 'wave'
Ritor1
parents:
diff changeset
1052 <waih-ck> // Wave item header
Ritor1
parents:
diff changeset
1053 <DMRF-list> // Reference to wave object
Ritor1
parents:
diff changeset
1054 }
Ritor1
parents:
diff changeset
1055
Ritor1
parents:
diff changeset
1056 // <waih-ck>
Ritor1
parents:
diff changeset
1057 'waih'
Ritor1
parents:
diff changeset
1058 {
Ritor1
parents:
diff changeset
1059 <DMUS_IO_WAVE_ITEM_HEADER>
Ritor1
parents:
diff changeset
1060 }
Ritor1
parents:
diff changeset
1061
Ritor1
parents:
diff changeset
1062 */
Ritor1
parents:
diff changeset
1063
Ritor1
parents:
diff changeset
1064 /* File io for DirectMusic Container file. This embeds a set of related files. And,
Ritor1
parents:
diff changeset
1065 in turn, it can be embedded within a segment or script file.
Ritor1
parents:
diff changeset
1066 */
Ritor1
parents:
diff changeset
1067
Ritor1
parents:
diff changeset
1068 #define DMUS_FOURCC_CONTAINER_FORM mmioFOURCC('D','M','C','N')
Ritor1
parents:
diff changeset
1069 #define DMUS_FOURCC_CONTAINER_CHUNK mmioFOURCC('c','o','n','h')
Ritor1
parents:
diff changeset
1070 #define DMUS_FOURCC_CONTAINED_ALIAS_CHUNK mmioFOURCC('c','o','b','a')
Ritor1
parents:
diff changeset
1071 #define DMUS_FOURCC_CONTAINED_OBJECT_CHUNK mmioFOURCC('c','o','b','h')
Ritor1
parents:
diff changeset
1072 #define DMUS_FOURCC_CONTAINED_OBJECTS_LIST mmioFOURCC('c','o','s','l')
Ritor1
parents:
diff changeset
1073 #define DMUS_FOURCC_CONTAINED_OBJECT_LIST mmioFOURCC('c','o','b','l')
Ritor1
parents:
diff changeset
1074
Ritor1
parents:
diff changeset
1075 typedef struct _DMUS_IO_CONTAINER_HEADER
Ritor1
parents:
diff changeset
1076 {
Ritor1
parents:
diff changeset
1077 DWORD dwFlags; /* Flags. */
Ritor1
parents:
diff changeset
1078 } DMUS_IO_CONTAINER_HEADER;
Ritor1
parents:
diff changeset
1079
Ritor1
parents:
diff changeset
1080 #define DMUS_CONTAINER_NOLOADS (1 << 1) /* Contained items are not loaded when the container is loaded.
Ritor1
parents:
diff changeset
1081 Entries will be created in the loader (via SetObject) but
Ritor1
parents:
diff changeset
1082 the actual objects will not be created until they are
Ritor1
parents:
diff changeset
1083 specifically loaded at a later time. */
Ritor1
parents:
diff changeset
1084
Ritor1
parents:
diff changeset
1085 typedef struct _DMUS_IO_CONTAINED_OBJECT_HEADER
Ritor1
parents:
diff changeset
1086 {
Ritor1
parents:
diff changeset
1087 GUID guidClassID; /* Class id of object. */
Ritor1
parents:
diff changeset
1088 DWORD dwFlags; /* Flags, for example DMUS_CONTAINED_OBJF_KEEP. */
Ritor1
parents:
diff changeset
1089 FOURCC ckid; /* chunk ID of track's data chunk if 0 fccType valid. */
Ritor1
parents:
diff changeset
1090 FOURCC fccType; /* list type if NULL ckid valid */
Ritor1
parents:
diff changeset
1091 /* Note that LIST:DMRF may be used for ckid and fccType in order to reference an
Ritor1
parents:
diff changeset
1092 object instead of embedding it within the container. */
Ritor1
parents:
diff changeset
1093 } DMUS_IO_CONTAINED_OBJECT_HEADER;
Ritor1
parents:
diff changeset
1094
Ritor1
parents:
diff changeset
1095 #define DMUS_CONTAINED_OBJF_KEEP 1 /* Keep the object cached in the loader after the container is released. */
Ritor1
parents:
diff changeset
1096
Ritor1
parents:
diff changeset
1097 /*
Ritor1
parents:
diff changeset
1098 RIFF
Ritor1
parents:
diff changeset
1099 (
Ritor1
parents:
diff changeset
1100 'DMCN' // DirectMusic Container chunk
Ritor1
parents:
diff changeset
1101 <conh-ck> // Container header chunk
Ritor1
parents:
diff changeset
1102 [<guid-ck>] // GUID for container
Ritor1
parents:
diff changeset
1103 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
1104 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
1105 <cosl-list> // List of objects.
Ritor1
parents:
diff changeset
1106 )
Ritor1
parents:
diff changeset
1107
Ritor1
parents:
diff changeset
1108 // <conh-ck>
Ritor1
parents:
diff changeset
1109 'conh'
Ritor1
parents:
diff changeset
1110 (
Ritor1
parents:
diff changeset
1111 <DMUS_IO_CONTAINER_HEADER>
Ritor1
parents:
diff changeset
1112 )
Ritor1
parents:
diff changeset
1113
Ritor1
parents:
diff changeset
1114 // <guid-ck>
Ritor1
parents:
diff changeset
1115 'guid'
Ritor1
parents:
diff changeset
1116 (
Ritor1
parents:
diff changeset
1117 <GUID>
Ritor1
parents:
diff changeset
1118 )
Ritor1
parents:
diff changeset
1119
Ritor1
parents:
diff changeset
1120 // <vers-ck>
Ritor1
parents:
diff changeset
1121 vers
Ritor1
parents:
diff changeset
1122 (
Ritor1
parents:
diff changeset
1123 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
1124 )
Ritor1
parents:
diff changeset
1125
Ritor1
parents:
diff changeset
1126 LIST
Ritor1
parents:
diff changeset
1127 (
Ritor1
parents:
diff changeset
1128 'cosl' // Array of embedded objects.
Ritor1
parents:
diff changeset
1129 <cobl-list>... // Each object is encapsulated in a LIST chunk
Ritor1
parents:
diff changeset
1130 )
Ritor1
parents:
diff changeset
1131
Ritor1
parents:
diff changeset
1132 // <cobl-list> // Encapsulates one object
Ritor1
parents:
diff changeset
1133 LIST
Ritor1
parents:
diff changeset
1134 (
Ritor1
parents:
diff changeset
1135 'cobl'
Ritor1
parents:
diff changeset
1136 [<coba-ck>] // Alias. An alternative name by which this object is known
Ritor1
parents:
diff changeset
1137 // within the container.
Ritor1
parents:
diff changeset
1138 <cobh-ck> // Required header, includes CLASS ID for object.
Ritor1
parents:
diff changeset
1139 [<data>] or <DMRF> // Object data of the type specified in <cobh-ck>.
Ritor1
parents:
diff changeset
1140 // If DMRF, it is a reference of where to find the object.
Ritor1
parents:
diff changeset
1141 // Otherwise, it could be any RIFF readable chunk in the
Ritor1
parents:
diff changeset
1142 // exact same format as a file. The object will load
Ritor1
parents:
diff changeset
1143 // itself from this data.
Ritor1
parents:
diff changeset
1144 )
Ritor1
parents:
diff changeset
1145
Ritor1
parents:
diff changeset
1146 // <coba-ck>
Ritor1
parents:
diff changeset
1147 'coba'
Ritor1
parents:
diff changeset
1148 (
Ritor1
parents:
diff changeset
1149 // Alias, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1150 )
Ritor1
parents:
diff changeset
1151
Ritor1
parents:
diff changeset
1152 // <cobh-ck>
Ritor1
parents:
diff changeset
1153 'cobh'
Ritor1
parents:
diff changeset
1154 (
Ritor1
parents:
diff changeset
1155 <DMUS_IO_CONTAINED_OBJECT_HEADER>
Ritor1
parents:
diff changeset
1156 )
Ritor1
parents:
diff changeset
1157 */
Ritor1
parents:
diff changeset
1158
Ritor1
parents:
diff changeset
1159 /* File io for DirectMusic Segment object */
Ritor1
parents:
diff changeset
1160
Ritor1
parents:
diff changeset
1161 /* RIFF ids: */
Ritor1
parents:
diff changeset
1162
Ritor1
parents:
diff changeset
1163 #define DMUS_FOURCC_SEGMENT_FORM mmioFOURCC('D','M','S','G')
Ritor1
parents:
diff changeset
1164 #define DMUS_FOURCC_SEGMENT_CHUNK mmioFOURCC('s','e','g','h')
Ritor1
parents:
diff changeset
1165 #define DMUS_FOURCC_TRACK_LIST mmioFOURCC('t','r','k','l')
Ritor1
parents:
diff changeset
1166 #define DMUS_FOURCC_TRACK_FORM mmioFOURCC('D','M','T','K')
Ritor1
parents:
diff changeset
1167 #define DMUS_FOURCC_TRACK_CHUNK mmioFOURCC('t','r','k','h')
Ritor1
parents:
diff changeset
1168 #define DMUS_FOURCC_TRACK_EXTRAS_CHUNK mmioFOURCC('t','r','k','x')
Ritor1
parents:
diff changeset
1169
Ritor1
parents:
diff changeset
1170 /* io structures:*/
Ritor1
parents:
diff changeset
1171
Ritor1
parents:
diff changeset
1172 typedef struct _DMUS_IO_SEGMENT_HEADER
Ritor1
parents:
diff changeset
1173 {
Ritor1
parents:
diff changeset
1174 DWORD dwRepeats; /* Number of repeats. By default, 0. */
Ritor1
parents:
diff changeset
1175 MUSIC_TIME mtLength; /* Length, in music time. */
Ritor1
parents:
diff changeset
1176 MUSIC_TIME mtPlayStart; /* Start of playback. By default, 0. */
Ritor1
parents:
diff changeset
1177 MUSIC_TIME mtLoopStart; /* Start of looping portion. By default, 0. */
Ritor1
parents:
diff changeset
1178 MUSIC_TIME mtLoopEnd; /* End of loop. Must be greater than dwPlayStart. Or, 0, indicating loop full segment. */
Ritor1
parents:
diff changeset
1179 DWORD dwResolution; /* Default resolution. */
Ritor1
parents:
diff changeset
1180 /* Following added for DirectX8: */
Ritor1
parents:
diff changeset
1181 REFERENCE_TIME rtLength; /* Length, in reference time (overrides music time length.) */
Ritor1
parents:
diff changeset
1182 DWORD dwFlags;
Ritor1
parents:
diff changeset
1183 DWORD dwReserved; /* Reserved. */
Ritor1
parents:
diff changeset
1184 /* Added for DirectX9: */
Ritor1
parents:
diff changeset
1185 REFERENCE_TIME rtLoopStart; /* Timer time loop start. */
Ritor1
parents:
diff changeset
1186 REFERENCE_TIME rtLoopEnd; /* Timer time loop end. */
Ritor1
parents:
diff changeset
1187 REFERENCE_TIME rtPlayStart; /* Start of playback in Timer time. */
Ritor1
parents:
diff changeset
1188 } DMUS_IO_SEGMENT_HEADER;
Ritor1
parents:
diff changeset
1189
Ritor1
parents:
diff changeset
1190 #define DMUS_SEGIOF_REFLENGTH 1 /* Use the time in rtLength for the segment length. */
Ritor1
parents:
diff changeset
1191 #define DMUS_SEGIOF_CLOCKTIME 2 /* This is a Timer time segment. */
Ritor1
parents:
diff changeset
1192
Ritor1
parents:
diff changeset
1193 typedef struct _DMUS_IO_TRACK_HEADER
Ritor1
parents:
diff changeset
1194 {
Ritor1
parents:
diff changeset
1195 GUID guidClassID; /* Class id of track. */
Ritor1
parents:
diff changeset
1196 DWORD dwPosition; /* Position in track list. */
Ritor1
parents:
diff changeset
1197 DWORD dwGroup; /* Group bits for track. */
Ritor1
parents:
diff changeset
1198 FOURCC ckid; /* chunk ID of track's data chunk. */
Ritor1
parents:
diff changeset
1199 FOURCC fccType; /* list type if ckid is RIFF or LIST */
Ritor1
parents:
diff changeset
1200 } DMUS_IO_TRACK_HEADER;
Ritor1
parents:
diff changeset
1201
Ritor1
parents:
diff changeset
1202 /* Additional parameters for the track header chunk, introduced in DirectX8 and
Ritor1
parents:
diff changeset
1203 on, are stored in a separate chunk. */
Ritor1
parents:
diff changeset
1204
Ritor1
parents:
diff changeset
1205 typedef struct _DMUS_IO_TRACK_EXTRAS_HEADER
Ritor1
parents:
diff changeset
1206 {
Ritor1
parents:
diff changeset
1207 DWORD dwFlags; /* DirectX8 Added flags for control tracks. */
Ritor1
parents:
diff changeset
1208 DWORD dwPriority; /* Priority for composition. */
Ritor1
parents:
diff changeset
1209 } DMUS_IO_TRACK_EXTRAS_HEADER;
Ritor1
parents:
diff changeset
1210
Ritor1
parents:
diff changeset
1211 /*
Ritor1
parents:
diff changeset
1212 RIFF
Ritor1
parents:
diff changeset
1213 (
Ritor1
parents:
diff changeset
1214 'DMSG' // DirectMusic Segment chunk
Ritor1
parents:
diff changeset
1215 <segh-ck> // Segment header chunk
Ritor1
parents:
diff changeset
1216 [<guid-ck>] // GUID for segment
Ritor1
parents:
diff changeset
1217 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
1218 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
1219 [<DMCN-form>] // Optional container of objects embedded in file. Must precede tracklist.
Ritor1
parents:
diff changeset
1220 <trkl-list> // List of Tracks
Ritor1
parents:
diff changeset
1221 [<DMTG-form>] // Optional ToolGraph
Ritor1
parents:
diff changeset
1222 [<DMAP-form>] // Optional Audio Path
Ritor1
parents:
diff changeset
1223 )
Ritor1
parents:
diff changeset
1224
Ritor1
parents:
diff changeset
1225 // <segh-ck>
Ritor1
parents:
diff changeset
1226 'segh'
Ritor1
parents:
diff changeset
1227 (
Ritor1
parents:
diff changeset
1228 <DMUS_IO_SEGMENT_HEADER>
Ritor1
parents:
diff changeset
1229 )
Ritor1
parents:
diff changeset
1230
Ritor1
parents:
diff changeset
1231 // <guid-ck>
Ritor1
parents:
diff changeset
1232 'guid'
Ritor1
parents:
diff changeset
1233 (
Ritor1
parents:
diff changeset
1234 <GUID>
Ritor1
parents:
diff changeset
1235 )
Ritor1
parents:
diff changeset
1236
Ritor1
parents:
diff changeset
1237 // <vers-ck>
Ritor1
parents:
diff changeset
1238 vers
Ritor1
parents:
diff changeset
1239 (
Ritor1
parents:
diff changeset
1240 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
1241 )
Ritor1
parents:
diff changeset
1242
Ritor1
parents:
diff changeset
1243 // <trkl-list>
Ritor1
parents:
diff changeset
1244 LIST
Ritor1
parents:
diff changeset
1245 (
Ritor1
parents:
diff changeset
1246 'trkl' // Array of tracks
Ritor1
parents:
diff changeset
1247 <DMTK-form>... // Each track is encapsulated in a RIFF chunk
Ritor1
parents:
diff changeset
1248 )
Ritor1
parents:
diff changeset
1249
Ritor1
parents:
diff changeset
1250 // <DMTK-form> // Tracks can be embedded in a segment or stored as separate files.
Ritor1
parents:
diff changeset
1251 RIFF
Ritor1
parents:
diff changeset
1252 (
Ritor1
parents:
diff changeset
1253 'DMTK'
Ritor1
parents:
diff changeset
1254 <trkh-ck>
Ritor1
parents:
diff changeset
1255 [<trkx-ck>] // Optional track flags.
Ritor1
parents:
diff changeset
1256 [<guid-ck>] // Optional GUID for track object instance (not to be confused with Class id in track header)
Ritor1
parents:
diff changeset
1257 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
1258 [<UNFO-list>] // Optional name, author, copyright info., comments
Ritor1
parents:
diff changeset
1259 [<data>] // Track data. Must be a RIFF readable chunk.
Ritor1
parents:
diff changeset
1260 )
Ritor1
parents:
diff changeset
1261
Ritor1
parents:
diff changeset
1262 // <trkh-ck> // Track header chunk
Ritor1
parents:
diff changeset
1263 (
Ritor1
parents:
diff changeset
1264 'trkh'
Ritor1
parents:
diff changeset
1265 <DMUS_IO_TRACK_HEADER> // Track header
Ritor1
parents:
diff changeset
1266 )
Ritor1
parents:
diff changeset
1267
Ritor1
parents:
diff changeset
1268 // <trkx-ck> // Track flags chunk
Ritor1
parents:
diff changeset
1269 (
Ritor1
parents:
diff changeset
1270 'trkx'
Ritor1
parents:
diff changeset
1271 <DMUS_IO_TRACK_EXTRAS_HEADER> // DirectX8 Track flags header
Ritor1
parents:
diff changeset
1272 )
Ritor1
parents:
diff changeset
1273 */
Ritor1
parents:
diff changeset
1274
Ritor1
parents:
diff changeset
1275 /* File io for DirectMusic reference chunk.
Ritor1
parents:
diff changeset
1276 This is used to embed a reference to an object.
Ritor1
parents:
diff changeset
1277 */
Ritor1
parents:
diff changeset
1278
Ritor1
parents:
diff changeset
1279 /* RIFF ids: */
Ritor1
parents:
diff changeset
1280
Ritor1
parents:
diff changeset
1281 #define DMUS_FOURCC_REF_LIST mmioFOURCC('D','M','R','F')
Ritor1
parents:
diff changeset
1282 #define DMUS_FOURCC_REF_CHUNK mmioFOURCC('r','e','f','h')
Ritor1
parents:
diff changeset
1283 #define DMUS_FOURCC_DATE_CHUNK mmioFOURCC('d','a','t','e')
Ritor1
parents:
diff changeset
1284 #define DMUS_FOURCC_NAME_CHUNK mmioFOURCC('n','a','m','e')
Ritor1
parents:
diff changeset
1285 #define DMUS_FOURCC_FILE_CHUNK mmioFOURCC('f','i','l','e')
Ritor1
parents:
diff changeset
1286
Ritor1
parents:
diff changeset
1287 typedef struct _DMUS_IO_REFERENCE
Ritor1
parents:
diff changeset
1288 {
Ritor1
parents:
diff changeset
1289 GUID guidClassID; /* Class id is always required. */
Ritor1
parents:
diff changeset
1290 DWORD dwValidData; /* Flags. */
Ritor1
parents:
diff changeset
1291 } DMUS_IO_REFERENCE;
Ritor1
parents:
diff changeset
1292
Ritor1
parents:
diff changeset
1293 /*
Ritor1
parents:
diff changeset
1294 LIST
Ritor1
parents:
diff changeset
1295 (
Ritor1
parents:
diff changeset
1296 'DMRF' // DirectMusic Reference chunk
Ritor1
parents:
diff changeset
1297 <refh-ck> // Reference header chunk
Ritor1
parents:
diff changeset
1298 [<guid-ck>] // Optional object GUID.
Ritor1
parents:
diff changeset
1299 [<date-ck>] // Optional file date.
Ritor1
parents:
diff changeset
1300 [<name-ck>] // Optional name.
Ritor1
parents:
diff changeset
1301 [<file-ck>] // Optional file name.
Ritor1
parents:
diff changeset
1302 [<catg-ck>] // Optional category name.
Ritor1
parents:
diff changeset
1303 [<vers-ck>] // Optional version info.
Ritor1
parents:
diff changeset
1304 )
Ritor1
parents:
diff changeset
1305
Ritor1
parents:
diff changeset
1306 // <refh-ck>
Ritor1
parents:
diff changeset
1307 'refh'
Ritor1
parents:
diff changeset
1308 (
Ritor1
parents:
diff changeset
1309 <DMUS_IO_REFERENCE>
Ritor1
parents:
diff changeset
1310 )
Ritor1
parents:
diff changeset
1311
Ritor1
parents:
diff changeset
1312 // <guid-ck>
Ritor1
parents:
diff changeset
1313 'guid'
Ritor1
parents:
diff changeset
1314 (
Ritor1
parents:
diff changeset
1315 <GUID>
Ritor1
parents:
diff changeset
1316 )
Ritor1
parents:
diff changeset
1317
Ritor1
parents:
diff changeset
1318 // <date-ck>
Ritor1
parents:
diff changeset
1319 date
Ritor1
parents:
diff changeset
1320 (
Ritor1
parents:
diff changeset
1321 <FILETIME>
Ritor1
parents:
diff changeset
1322 )
Ritor1
parents:
diff changeset
1323
Ritor1
parents:
diff changeset
1324 // <name-ck>
Ritor1
parents:
diff changeset
1325 name
Ritor1
parents:
diff changeset
1326 (
Ritor1
parents:
diff changeset
1327 // Name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1328 )
Ritor1
parents:
diff changeset
1329
Ritor1
parents:
diff changeset
1330 // <file-ck>
Ritor1
parents:
diff changeset
1331 file
Ritor1
parents:
diff changeset
1332 (
Ritor1
parents:
diff changeset
1333 // File name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1334 )
Ritor1
parents:
diff changeset
1335
Ritor1
parents:
diff changeset
1336 // <catg-ck>
Ritor1
parents:
diff changeset
1337 catg
Ritor1
parents:
diff changeset
1338 (
Ritor1
parents:
diff changeset
1339 // Category name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1340 )
Ritor1
parents:
diff changeset
1341
Ritor1
parents:
diff changeset
1342 // <vers-ck>
Ritor1
parents:
diff changeset
1343 vers
Ritor1
parents:
diff changeset
1344 (
Ritor1
parents:
diff changeset
1345 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
1346 )
Ritor1
parents:
diff changeset
1347 */
Ritor1
parents:
diff changeset
1348
Ritor1
parents:
diff changeset
1349 /* Chord Maps */
Ritor1
parents:
diff changeset
1350
Ritor1
parents:
diff changeset
1351 /* runtime chunks */
Ritor1
parents:
diff changeset
1352 #define DMUS_FOURCC_CHORDMAP_FORM mmioFOURCC('D','M','P','R')
Ritor1
parents:
diff changeset
1353 #define DMUS_FOURCC_IOCHORDMAP_CHUNK mmioFOURCC('p','e','r','h')
Ritor1
parents:
diff changeset
1354 #define DMUS_FOURCC_SUBCHORD_CHUNK mmioFOURCC('c','h','d','t')
Ritor1
parents:
diff changeset
1355 #define DMUS_FOURCC_CHORDENTRY_CHUNK mmioFOURCC('c','h','e','h')
Ritor1
parents:
diff changeset
1356 #define DMUS_FOURCC_SUBCHORDID_CHUNK mmioFOURCC('s','b','c','n')
Ritor1
parents:
diff changeset
1357 #define DMUS_FOURCC_IONEXTCHORD_CHUNK mmioFOURCC('n','c','r','d')
Ritor1
parents:
diff changeset
1358 #define DMUS_FOURCC_NEXTCHORDSEQ_CHUNK mmioFOURCC('n','c','s','q')
Ritor1
parents:
diff changeset
1359 #define DMUS_FOURCC_IOSIGNPOST_CHUNK mmioFOURCC('s','p','s','h')
Ritor1
parents:
diff changeset
1360 #define DMUS_FOURCC_CHORDNAME_CHUNK mmioFOURCC('I','N','A','M')
Ritor1
parents:
diff changeset
1361
Ritor1
parents:
diff changeset
1362 /* runtime list chunks */
Ritor1
parents:
diff changeset
1363 #define DMUS_FOURCC_CHORDENTRY_LIST mmioFOURCC('c','h','o','e')
Ritor1
parents:
diff changeset
1364 #define DMUS_FOURCC_CHORDMAP_LIST mmioFOURCC('c','m','a','p')
Ritor1
parents:
diff changeset
1365 #define DMUS_FOURCC_CHORD_LIST mmioFOURCC('c','h','r','d')
Ritor1
parents:
diff changeset
1366 #define DMUS_FOURCC_CHORDPALETTE_LIST mmioFOURCC('c','h','p','l')
Ritor1
parents:
diff changeset
1367 #define DMUS_FOURCC_CADENCE_LIST mmioFOURCC('c','a','d','e')
Ritor1
parents:
diff changeset
1368 #define DMUS_FOURCC_SIGNPOSTITEM_LIST mmioFOURCC('s','p','s','t')
Ritor1
parents:
diff changeset
1369
Ritor1
parents:
diff changeset
1370 #define DMUS_FOURCC_SIGNPOST_LIST mmioFOURCC('s','p','s','q')
Ritor1
parents:
diff changeset
1371
Ritor1
parents:
diff changeset
1372 /* values for dwChord field of DMUS_IO_PERS_SIGNPOST */
Ritor1
parents:
diff changeset
1373 /* DMUS_SIGNPOSTF_ flags are also used in templates (DMUS_IO_SIGNPOST) */
Ritor1
parents:
diff changeset
1374 #define DMUS_SIGNPOSTF_A 1
Ritor1
parents:
diff changeset
1375 #define DMUS_SIGNPOSTF_B 2
Ritor1
parents:
diff changeset
1376 #define DMUS_SIGNPOSTF_C 4
Ritor1
parents:
diff changeset
1377 #define DMUS_SIGNPOSTF_D 8
Ritor1
parents:
diff changeset
1378 #define DMUS_SIGNPOSTF_E 0x10
Ritor1
parents:
diff changeset
1379 #define DMUS_SIGNPOSTF_F 0x20
Ritor1
parents:
diff changeset
1380 #define DMUS_SIGNPOSTF_LETTER (DMUS_SIGNPOSTF_A | DMUS_SIGNPOSTF_B | DMUS_SIGNPOSTF_C | DMUS_SIGNPOSTF_D | DMUS_SIGNPOSTF_E | DMUS_SIGNPOSTF_F)
Ritor1
parents:
diff changeset
1381 #define DMUS_SIGNPOSTF_1 0x100
Ritor1
parents:
diff changeset
1382 #define DMUS_SIGNPOSTF_2 0x200
Ritor1
parents:
diff changeset
1383 #define DMUS_SIGNPOSTF_3 0x400
Ritor1
parents:
diff changeset
1384 #define DMUS_SIGNPOSTF_4 0x800
Ritor1
parents:
diff changeset
1385 #define DMUS_SIGNPOSTF_5 0x1000
Ritor1
parents:
diff changeset
1386 #define DMUS_SIGNPOSTF_6 0x2000
Ritor1
parents:
diff changeset
1387 #define DMUS_SIGNPOSTF_7 0x4000
Ritor1
parents:
diff changeset
1388 #define DMUS_SIGNPOSTF_ROOT (DMUS_SIGNPOSTF_1 | DMUS_SIGNPOSTF_2 | DMUS_SIGNPOSTF_3 | DMUS_SIGNPOSTF_4 | DMUS_SIGNPOSTF_5 | DMUS_SIGNPOSTF_6 | DMUS_SIGNPOSTF_7)
Ritor1
parents:
diff changeset
1389 #define DMUS_SIGNPOSTF_CADENCE 0x8000
Ritor1
parents:
diff changeset
1390
Ritor1
parents:
diff changeset
1391 /* values for dwFlags field of DMUS_IO_CHORDMAP */
Ritor1
parents:
diff changeset
1392 #define DMUS_CHORDMAPF_VERSION8 1 /* Chordmap is version 8 or above. */
Ritor1
parents:
diff changeset
1393
Ritor1
parents:
diff changeset
1394 /* values for dwChord field of DMUS_IO_PERS_SIGNPOST */
Ritor1
parents:
diff changeset
1395 #define DMUS_SPOSTCADENCEF_1 2 /* Use the first cadence chord. */
Ritor1
parents:
diff changeset
1396 #define DMUS_SPOSTCADENCEF_2 4 /* Use the second cadence chord. */
Ritor1
parents:
diff changeset
1397
Ritor1
parents:
diff changeset
1398 /* run time data structs */
Ritor1
parents:
diff changeset
1399 typedef struct _DMUS_IO_CHORDMAP
Ritor1
parents:
diff changeset
1400 {
Ritor1
parents:
diff changeset
1401 WCHAR wszLoadName[20];
Ritor1
parents:
diff changeset
1402 DWORD dwScalePattern;
Ritor1
parents:
diff changeset
1403 DWORD dwFlags; /* Various flags. Only lower 16 bits are significant. */
Ritor1
parents:
diff changeset
1404 } DMUS_IO_CHORDMAP;
Ritor1
parents:
diff changeset
1405
Ritor1
parents:
diff changeset
1406 typedef struct _DMUS_IO_CHORDMAP_SUBCHORD
Ritor1
parents:
diff changeset
1407 {
Ritor1
parents:
diff changeset
1408 DWORD dwChordPattern;
Ritor1
parents:
diff changeset
1409 DWORD dwScalePattern;
Ritor1
parents:
diff changeset
1410 DWORD dwInvertPattern;
Ritor1
parents:
diff changeset
1411 BYTE bChordRoot;
Ritor1
parents:
diff changeset
1412 BYTE bScaleRoot;
Ritor1
parents:
diff changeset
1413 WORD wCFlags;
Ritor1
parents:
diff changeset
1414 DWORD dwLevels; /* parts or which subchord levels this chord supports */
Ritor1
parents:
diff changeset
1415 } DMUS_IO_CHORDMAP_SUBCHORD;
Ritor1
parents:
diff changeset
1416
Ritor1
parents:
diff changeset
1417 /* Legacy name... */
Ritor1
parents:
diff changeset
1418 typedef DMUS_IO_CHORDMAP_SUBCHORD DMUS_IO_PERS_SUBCHORD;
Ritor1
parents:
diff changeset
1419
Ritor1
parents:
diff changeset
1420 typedef struct _DMUS_IO_CHORDENTRY
Ritor1
parents:
diff changeset
1421 {
Ritor1
parents:
diff changeset
1422 DWORD dwFlags;
Ritor1
parents:
diff changeset
1423 WORD wConnectionID; /* replaces runtime "pointer to this" */
Ritor1
parents:
diff changeset
1424 } DMUS_IO_CHORDENTRY;
Ritor1
parents:
diff changeset
1425
Ritor1
parents:
diff changeset
1426 typedef struct _DMUS_IO_NEXTCHORD
Ritor1
parents:
diff changeset
1427 {
Ritor1
parents:
diff changeset
1428 DWORD dwFlags;
Ritor1
parents:
diff changeset
1429 WORD nWeight;
Ritor1
parents:
diff changeset
1430 WORD wMinBeats;
Ritor1
parents:
diff changeset
1431 WORD wMaxBeats;
Ritor1
parents:
diff changeset
1432 WORD wConnectionID; /* points to an ioChordEntry */
Ritor1
parents:
diff changeset
1433 } DMUS_IO_NEXTCHORD;
Ritor1
parents:
diff changeset
1434
Ritor1
parents:
diff changeset
1435 typedef struct _DMUS_IO_CHORDMAP_SIGNPOST
Ritor1
parents:
diff changeset
1436 {
Ritor1
parents:
diff changeset
1437 DWORD dwChords; /* 1bit per group */
Ritor1
parents:
diff changeset
1438 DWORD dwFlags;
Ritor1
parents:
diff changeset
1439 } DMUS_IO_CHORDMAP_SIGNPOST;
Ritor1
parents:
diff changeset
1440
Ritor1
parents:
diff changeset
1441 /* Legacy name... */
Ritor1
parents:
diff changeset
1442 typedef DMUS_IO_CHORDMAP_SIGNPOST DMUS_IO_PERS_SIGNPOST;
Ritor1
parents:
diff changeset
1443
Ritor1
parents:
diff changeset
1444 /*
Ritor1
parents:
diff changeset
1445 RIFF
Ritor1
parents:
diff changeset
1446 (
Ritor1
parents:
diff changeset
1447 'DMPR'
Ritor1
parents:
diff changeset
1448 <perh-ck> // Chord map header chunk
Ritor1
parents:
diff changeset
1449 [<guid-ck>] // guid chunk
Ritor1
parents:
diff changeset
1450 [<vers-ck>] // version chunk (two DWORDS)
Ritor1
parents:
diff changeset
1451 [<UNFO-list>] // Unfo chunk
Ritor1
parents:
diff changeset
1452 <chdt-ck> // subchord database
Ritor1
parents:
diff changeset
1453 <chpl-list> // chord palette
Ritor1
parents:
diff changeset
1454 <cmap-list> // chord map
Ritor1
parents:
diff changeset
1455 <spsq-list> // signpost list
Ritor1
parents:
diff changeset
1456 )
Ritor1
parents:
diff changeset
1457
Ritor1
parents:
diff changeset
1458 <cmap-list> ::= LIST('cmap' <choe-list> )
Ritor1
parents:
diff changeset
1459
Ritor1
parents:
diff changeset
1460 <choe-list> ::= LIST('choe'
Ritor1
parents:
diff changeset
1461 <cheh-ck> // chord entry data
Ritor1
parents:
diff changeset
1462 <chrd-list> // chord definition
Ritor1
parents:
diff changeset
1463 <ncsq-ck> // connecting(next) chords
Ritor1
parents:
diff changeset
1464 )
Ritor1
parents:
diff changeset
1465
Ritor1
parents:
diff changeset
1466 <chrd-list> ::= LIST('chrd'
Ritor1
parents:
diff changeset
1467 <INAM-ck> // name of chord in wide char format
Ritor1
parents:
diff changeset
1468 <sbcn-ck> // list of subchords composing chord
Ritor1
parents:
diff changeset
1469 )
Ritor1
parents:
diff changeset
1470
Ritor1
parents:
diff changeset
1471 <chpl-list> ::= LIST('chpl'
Ritor1
parents:
diff changeset
1472 <chrd-list> ... // chord definition
Ritor1
parents:
diff changeset
1473 )
Ritor1
parents:
diff changeset
1474
Ritor1
parents:
diff changeset
1475 <spsq-list> ::== LIST('spsq' <spst-list> ... )
Ritor1
parents:
diff changeset
1476
Ritor1
parents:
diff changeset
1477 <spst-list> ::= LIST('spst'
Ritor1
parents:
diff changeset
1478 <spsh-ck>
Ritor1
parents:
diff changeset
1479 <chrd-list>
Ritor1
parents:
diff changeset
1480 [<cade-list>]
Ritor1
parents:
diff changeset
1481 )
Ritor1
parents:
diff changeset
1482
Ritor1
parents:
diff changeset
1483 <cade-list> ::= LIST('cade' <chrd-list> ...)
Ritor1
parents:
diff changeset
1484
Ritor1
parents:
diff changeset
1485 <perh-ck> ::= perh(<DMUS_IO_CHORDMAP>)
Ritor1
parents:
diff changeset
1486
Ritor1
parents:
diff changeset
1487 <chdt-ck> ::= chdt(<cbChordSize::WORD>
Ritor1
parents:
diff changeset
1488 <DMUS_IO_PERS_SUBCHORD> ... )
Ritor1
parents:
diff changeset
1489
Ritor1
parents:
diff changeset
1490 <cheh-ck> ::= cheh(<DMUS_IO_CHORDENTRY>)
Ritor1
parents:
diff changeset
1491
Ritor1
parents:
diff changeset
1492 <sbcn-ck> ::= sbcn(<cSubChordID:WORD> ...)
Ritor1
parents:
diff changeset
1493
Ritor1
parents:
diff changeset
1494 <ncsq-ck> ::= ncsq(<wNextChordSize:WORD>
Ritor1
parents:
diff changeset
1495 <DMUS_IO_NEXTCHORD>...)
Ritor1
parents:
diff changeset
1496
Ritor1
parents:
diff changeset
1497 <spsh-ck> ::= spsh(<DMUS_IO_PERS_SIGNPOST>)
Ritor1
parents:
diff changeset
1498
Ritor1
parents:
diff changeset
1499 */
Ritor1
parents:
diff changeset
1500
Ritor1
parents:
diff changeset
1501 /* File io for DirectMusic Script object */
Ritor1
parents:
diff changeset
1502
Ritor1
parents:
diff changeset
1503 /* RIFF ids: */
Ritor1
parents:
diff changeset
1504
Ritor1
parents:
diff changeset
1505 #define DMUS_FOURCC_SCRIPT_FORM mmioFOURCC('D','M','S','C')
Ritor1
parents:
diff changeset
1506 #define DMUS_FOURCC_SCRIPT_CHUNK mmioFOURCC('s','c','h','d')
Ritor1
parents:
diff changeset
1507 #define DMUS_FOURCC_SCRIPTVERSION_CHUNK mmioFOURCC('s','c','v','e')
Ritor1
parents:
diff changeset
1508 #define DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK mmioFOURCC('s','c','l','a')
Ritor1
parents:
diff changeset
1509 #define DMUS_FOURCC_SCRIPTSOURCE_CHUNK mmioFOURCC('s','c','s','r')
Ritor1
parents:
diff changeset
1510
Ritor1
parents:
diff changeset
1511 /* io structures:*/
Ritor1
parents:
diff changeset
1512
Ritor1
parents:
diff changeset
1513 typedef struct _DMUS_IO_SCRIPT_HEADER
Ritor1
parents:
diff changeset
1514 {
Ritor1
parents:
diff changeset
1515 DWORD dwFlags; /* DMUS_SCRIPTIOF_ flags */
Ritor1
parents:
diff changeset
1516 } DMUS_IO_SCRIPT_HEADER;
Ritor1
parents:
diff changeset
1517
Ritor1
parents:
diff changeset
1518 #define DMUS_SCRIPTIOF_LOAD_ALL_CONTENT (1 << 0)
Ritor1
parents:
diff changeset
1519 /* If set, when the script loads it will also load all the content in its container. */
Ritor1
parents:
diff changeset
1520 #define DMUS_SCRIPTIOF_DOWNLOAD_ALL_SEGMENTS (1 << 1)
Ritor1
parents:
diff changeset
1521 /* If set and LOAD_ALL_CONTENT is also set, when the script initializes it will also download all the segments in its container.
Ritor1
parents:
diff changeset
1522 If set and LOAD_ALL_CONTENT is not set, when the script calls segment.Load on a segment then the segment will also be downloaded.
Ritor1
parents:
diff changeset
1523 If not set, the script must manually download and unload by calling segment.DownloadSoundData and segment.UnloadSoundData. */
Ritor1
parents:
diff changeset
1524
Ritor1
parents:
diff changeset
1525 /*
Ritor1
parents:
diff changeset
1526 RIFF
Ritor1
parents:
diff changeset
1527 (
Ritor1
parents:
diff changeset
1528 'DMSC' // DirectMusic Script chunk
Ritor1
parents:
diff changeset
1529 <schd-ck> // Script header chunk
Ritor1
parents:
diff changeset
1530 [<guid-ck>] // GUID for script
Ritor1
parents:
diff changeset
1531 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
1532 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
1533 <scve-ck> // Version of DirectMusic this script was authored to run against
Ritor1
parents:
diff changeset
1534 <DMCN-form> // Container of content referenced by the script.
Ritor1
parents:
diff changeset
1535 <scla-ck> // ActiveX scripting language in which the script is written
Ritor1
parents:
diff changeset
1536 <scsr-ck> or <DMRF> // The script's source code.
Ritor1
parents:
diff changeset
1537 // If scsr-ck, the source is embedding in the chunk.
Ritor1
parents:
diff changeset
1538 // If DMRF, it is a reference of where to find a text file with the source.
Ritor1
parents:
diff changeset
1539 // Class id (guidClassID in DMUS_IO_REFERENCE) must be GUID_NULL because
Ritor1
parents:
diff changeset
1540 // this text file is not a DirectMusic object in its own right.
Ritor1
parents:
diff changeset
1541 )
Ritor1
parents:
diff changeset
1542
Ritor1
parents:
diff changeset
1543 // <schd-ck>
Ritor1
parents:
diff changeset
1544 'schd'
Ritor1
parents:
diff changeset
1545 (
Ritor1
parents:
diff changeset
1546 <DMUS_FOURCC_SCRIPT_CHUNK>
Ritor1
parents:
diff changeset
1547 )
Ritor1
parents:
diff changeset
1548
Ritor1
parents:
diff changeset
1549 // <guid-ck>
Ritor1
parents:
diff changeset
1550 'guid'
Ritor1
parents:
diff changeset
1551 (
Ritor1
parents:
diff changeset
1552 <GUID>
Ritor1
parents:
diff changeset
1553 )
Ritor1
parents:
diff changeset
1554
Ritor1
parents:
diff changeset
1555 // <vers-ck>
Ritor1
parents:
diff changeset
1556 vers
Ritor1
parents:
diff changeset
1557 (
Ritor1
parents:
diff changeset
1558 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
1559 )
Ritor1
parents:
diff changeset
1560
Ritor1
parents:
diff changeset
1561 // <scve-ck>
Ritor1
parents:
diff changeset
1562 scve
Ritor1
parents:
diff changeset
1563 (
Ritor1
parents:
diff changeset
1564 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
1565 )
Ritor1
parents:
diff changeset
1566
Ritor1
parents:
diff changeset
1567 'scla'
Ritor1
parents:
diff changeset
1568 (
Ritor1
parents:
diff changeset
1569 // Language name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1570 )
Ritor1
parents:
diff changeset
1571
Ritor1
parents:
diff changeset
1572 'scsr'
Ritor1
parents:
diff changeset
1573 (
Ritor1
parents:
diff changeset
1574 // Source code, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1575 )
Ritor1
parents:
diff changeset
1576 */
Ritor1
parents:
diff changeset
1577
Ritor1
parents:
diff changeset
1578 /* Signpost tracks */
Ritor1
parents:
diff changeset
1579
Ritor1
parents:
diff changeset
1580 #define DMUS_FOURCC_SIGNPOST_TRACK_CHUNK mmioFOURCC( 's', 'g', 'n', 'p' )
Ritor1
parents:
diff changeset
1581
Ritor1
parents:
diff changeset
1582
Ritor1
parents:
diff changeset
1583 typedef struct _DMUS_IO_SIGNPOST
Ritor1
parents:
diff changeset
1584 {
Ritor1
parents:
diff changeset
1585 MUSIC_TIME mtTime;
Ritor1
parents:
diff changeset
1586 DWORD dwChords;
Ritor1
parents:
diff changeset
1587 WORD wMeasure;
Ritor1
parents:
diff changeset
1588 } DMUS_IO_SIGNPOST;
Ritor1
parents:
diff changeset
1589
Ritor1
parents:
diff changeset
1590 /*
Ritor1
parents:
diff changeset
1591
Ritor1
parents:
diff changeset
1592 // <sgnp-list>
Ritor1
parents:
diff changeset
1593 'sgnp'
Ritor1
parents:
diff changeset
1594 (
Ritor1
parents:
diff changeset
1595 //sizeof DMUS_IO_SIGNPOST: DWORD
Ritor1
parents:
diff changeset
1596 <DMUS_IO_SIGNPOST>...
Ritor1
parents:
diff changeset
1597 )
Ritor1
parents:
diff changeset
1598
Ritor1
parents:
diff changeset
1599 */
Ritor1
parents:
diff changeset
1600
Ritor1
parents:
diff changeset
1601 #define DMUS_FOURCC_MUTE_CHUNK mmioFOURCC('m','u','t','e')
Ritor1
parents:
diff changeset
1602
Ritor1
parents:
diff changeset
1603 typedef struct _DMUS_IO_MUTE
Ritor1
parents:
diff changeset
1604 {
Ritor1
parents:
diff changeset
1605 MUSIC_TIME mtTime;
Ritor1
parents:
diff changeset
1606 DWORD dwPChannel;
Ritor1
parents:
diff changeset
1607 DWORD dwPChannelMap;
Ritor1
parents:
diff changeset
1608 } DMUS_IO_MUTE;
Ritor1
parents:
diff changeset
1609
Ritor1
parents:
diff changeset
1610 /*
Ritor1
parents:
diff changeset
1611
Ritor1
parents:
diff changeset
1612 // <mute-list>
Ritor1
parents:
diff changeset
1613 'mute'
Ritor1
parents:
diff changeset
1614 (
Ritor1
parents:
diff changeset
1615 //sizeof DMUS_IO_MUTE:DWORD
Ritor1
parents:
diff changeset
1616 <DMUS_IO_MUTE>...
Ritor1
parents:
diff changeset
1617 )
Ritor1
parents:
diff changeset
1618
Ritor1
parents:
diff changeset
1619
Ritor1
parents:
diff changeset
1620 */
Ritor1
parents:
diff changeset
1621
Ritor1
parents:
diff changeset
1622 /* Used for both style and chord map tracks */
Ritor1
parents:
diff changeset
1623
Ritor1
parents:
diff changeset
1624 #define DMUS_FOURCC_TIME_STAMP_CHUNK mmioFOURCC('s', 't', 'm', 'p')
Ritor1
parents:
diff changeset
1625
Ritor1
parents:
diff changeset
1626 /* Style tracks */
Ritor1
parents:
diff changeset
1627
Ritor1
parents:
diff changeset
1628 #define DMUS_FOURCC_STYLE_TRACK_LIST mmioFOURCC('s', 't', 't', 'r')
Ritor1
parents:
diff changeset
1629 #define DMUS_FOURCC_STYLE_REF_LIST mmioFOURCC('s', 't', 'r', 'f')
Ritor1
parents:
diff changeset
1630
Ritor1
parents:
diff changeset
1631 /*
Ritor1
parents:
diff changeset
1632
Ritor1
parents:
diff changeset
1633 // <sttr-list>
Ritor1
parents:
diff changeset
1634 LIST('sttr'
Ritor1
parents:
diff changeset
1635 (
Ritor1
parents:
diff changeset
1636 <strf-list>... // Array of Style references
Ritor1
parents:
diff changeset
1637 )
Ritor1
parents:
diff changeset
1638
Ritor1
parents:
diff changeset
1639 // <strf-list>
Ritor1
parents:
diff changeset
1640 LIST('strf'
Ritor1
parents:
diff changeset
1641 (
Ritor1
parents:
diff changeset
1642 <stmp-ck>
Ritor1
parents:
diff changeset
1643 <DMRF>
Ritor1
parents:
diff changeset
1644 )
Ritor1
parents:
diff changeset
1645
Ritor1
parents:
diff changeset
1646 // <stmp-ck>
Ritor1
parents:
diff changeset
1647 'stmp'
Ritor1
parents:
diff changeset
1648 (
Ritor1
parents:
diff changeset
1649 // time:DWORD
Ritor1
parents:
diff changeset
1650 )
Ritor1
parents:
diff changeset
1651
Ritor1
parents:
diff changeset
1652 */
Ritor1
parents:
diff changeset
1653
Ritor1
parents:
diff changeset
1654 /* Chord map tracks */
Ritor1
parents:
diff changeset
1655
Ritor1
parents:
diff changeset
1656 #define DMUS_FOURCC_PERS_TRACK_LIST mmioFOURCC('p', 'f', 't', 'r')
Ritor1
parents:
diff changeset
1657 #define DMUS_FOURCC_PERS_REF_LIST mmioFOURCC('p', 'f', 'r', 'f')
Ritor1
parents:
diff changeset
1658
Ritor1
parents:
diff changeset
1659 /*
Ritor1
parents:
diff changeset
1660
Ritor1
parents:
diff changeset
1661 // <pftr-list>
Ritor1
parents:
diff changeset
1662 LIST('pftr'
Ritor1
parents:
diff changeset
1663 (
Ritor1
parents:
diff changeset
1664 <pfrf-list>... // Array of Chord map references
Ritor1
parents:
diff changeset
1665 )
Ritor1
parents:
diff changeset
1666
Ritor1
parents:
diff changeset
1667 // <pfrf-list>
Ritor1
parents:
diff changeset
1668 LIST('pfrf'
Ritor1
parents:
diff changeset
1669 (
Ritor1
parents:
diff changeset
1670 <stmp-ck>
Ritor1
parents:
diff changeset
1671 <DMRF>
Ritor1
parents:
diff changeset
1672 )
Ritor1
parents:
diff changeset
1673
Ritor1
parents:
diff changeset
1674 // <stmp-ck>
Ritor1
parents:
diff changeset
1675 'stmp'
Ritor1
parents:
diff changeset
1676 (
Ritor1
parents:
diff changeset
1677 // time:DWORD
Ritor1
parents:
diff changeset
1678 )
Ritor1
parents:
diff changeset
1679
Ritor1
parents:
diff changeset
1680 */
Ritor1
parents:
diff changeset
1681
Ritor1
parents:
diff changeset
1682 #define DMUS_FOURCC_TEMPO_TRACK mmioFOURCC('t','e','t','r')
Ritor1
parents:
diff changeset
1683
Ritor1
parents:
diff changeset
1684 /*
Ritor1
parents:
diff changeset
1685 // tempo array
Ritor1
parents:
diff changeset
1686 'tetr'
Ritor1
parents:
diff changeset
1687 (
Ritor1
parents:
diff changeset
1688 // sizeof DMUS_IO_TEMPO_ITEM: DWORD
Ritor1
parents:
diff changeset
1689 <DMUS_IO_TEMPO_ITEM>...
Ritor1
parents:
diff changeset
1690 )
Ritor1
parents:
diff changeset
1691 */
Ritor1
parents:
diff changeset
1692
Ritor1
parents:
diff changeset
1693 #define DMUS_FOURCC_SEQ_TRACK mmioFOURCC('s','e','q','t')
Ritor1
parents:
diff changeset
1694 #define DMUS_FOURCC_SEQ_LIST mmioFOURCC('e','v','t','l')
Ritor1
parents:
diff changeset
1695 #define DMUS_FOURCC_CURVE_LIST mmioFOURCC('c','u','r','l')
Ritor1
parents:
diff changeset
1696
Ritor1
parents:
diff changeset
1697 /*
Ritor1
parents:
diff changeset
1698 // sequence track
Ritor1
parents:
diff changeset
1699 'seqt'
Ritor1
parents:
diff changeset
1700 (
Ritor1
parents:
diff changeset
1701 // sequence array
Ritor1
parents:
diff changeset
1702 'evtl'
Ritor1
parents:
diff changeset
1703 (
Ritor1
parents:
diff changeset
1704 // sizeof DMUS_IO_SEQ_ITEM: DWORD
Ritor1
parents:
diff changeset
1705 <DMUS_IO_SEQ_ITEM>...
Ritor1
parents:
diff changeset
1706 )
Ritor1
parents:
diff changeset
1707 // curve array
Ritor1
parents:
diff changeset
1708 'curl'
Ritor1
parents:
diff changeset
1709 (
Ritor1
parents:
diff changeset
1710 // sizeof DMUS_IO_CURVE_ITEM: DWORD
Ritor1
parents:
diff changeset
1711 <DMUS_IO_CURVE_ITEM>...
Ritor1
parents:
diff changeset
1712 )
Ritor1
parents:
diff changeset
1713 )
Ritor1
parents:
diff changeset
1714 */
Ritor1
parents:
diff changeset
1715
Ritor1
parents:
diff changeset
1716 #define DMUS_FOURCC_SYSEX_TRACK mmioFOURCC('s','y','e','x')
Ritor1
parents:
diff changeset
1717
Ritor1
parents:
diff changeset
1718 /*
Ritor1
parents:
diff changeset
1719 // sysex track
Ritor1
parents:
diff changeset
1720 'syex'
Ritor1
parents:
diff changeset
1721 (
Ritor1
parents:
diff changeset
1722 {
Ritor1
parents:
diff changeset
1723 <DMUS_IO_SYSEX_ITEM>
Ritor1
parents:
diff changeset
1724 <BYTE>... // Array of bytes, length defined in the DMUS_IO_SYSEXITEM structure
Ritor1
parents:
diff changeset
1725 }...
Ritor1
parents:
diff changeset
1726 )
Ritor1
parents:
diff changeset
1727 */
Ritor1
parents:
diff changeset
1728
Ritor1
parents:
diff changeset
1729 #define DMUS_FOURCC_TIMESIGNATURE_TRACK mmioFOURCC('t','i','m','s')
Ritor1
parents:
diff changeset
1730
Ritor1
parents:
diff changeset
1731 typedef struct _DMUS_IO_TIMESIGNATURE_ITEM
Ritor1
parents:
diff changeset
1732 {
Ritor1
parents:
diff changeset
1733 MUSIC_TIME lTime;
Ritor1
parents:
diff changeset
1734 BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
Ritor1
parents:
diff changeset
1735 BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
Ritor1
parents:
diff changeset
1736 /* we can assume that 0 means 256th note */
Ritor1
parents:
diff changeset
1737 WORD wGridsPerBeat; /* grids per beat */
Ritor1
parents:
diff changeset
1738 } DMUS_IO_TIMESIGNATURE_ITEM;
Ritor1
parents:
diff changeset
1739
Ritor1
parents:
diff changeset
1740 /* DirectX6 time signature track
Ritor1
parents:
diff changeset
1741
Ritor1
parents:
diff changeset
1742 'tims'
Ritor1
parents:
diff changeset
1743 (
Ritor1
parents:
diff changeset
1744 // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD
Ritor1
parents:
diff changeset
1745 <DMUS_IO_TIMESIGNATURE_ITEM>...
Ritor1
parents:
diff changeset
1746 )
Ritor1
parents:
diff changeset
1747 */
Ritor1
parents:
diff changeset
1748
Ritor1
parents:
diff changeset
1749 /* DirectX8 Time signature track. The track has been updated from DirectX7 to support a list of
Ritor1
parents:
diff changeset
1750 RIFF chunks. This will allow the time signature track to expand in the future.
Ritor1
parents:
diff changeset
1751 */
Ritor1
parents:
diff changeset
1752
Ritor1
parents:
diff changeset
1753 #define DMUS_FOURCC_TIMESIGTRACK_LIST mmioFOURCC('T','I','M','S')
Ritor1
parents:
diff changeset
1754 #define DMUS_FOURCC_TIMESIG_CHUNK DMUS_FOURCC_TIMESIGNATURE_TRACK
Ritor1
parents:
diff changeset
1755
Ritor1
parents:
diff changeset
1756 /*
Ritor1
parents:
diff changeset
1757 LIST
Ritor1
parents:
diff changeset
1758 (
Ritor1
parents:
diff changeset
1759 'TIMS' // Time Signature Track list-type
Ritor1
parents:
diff changeset
1760 <tims-ck> // Chunk containing an array of time signatures
Ritor1
parents:
diff changeset
1761 )
Ritor1
parents:
diff changeset
1762
Ritor1
parents:
diff changeset
1763 'tims'
Ritor1
parents:
diff changeset
1764 (
Ritor1
parents:
diff changeset
1765 // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD
Ritor1
parents:
diff changeset
1766 <DMUS_IO_TIMESIGNATURE_ITEM>...
Ritor1
parents:
diff changeset
1767 )
Ritor1
parents:
diff changeset
1768
Ritor1
parents:
diff changeset
1769 */
Ritor1
parents:
diff changeset
1770
Ritor1
parents:
diff changeset
1771 /* DirectX8 Marker track. This is used to store valid start points and other
Ritor1
parents:
diff changeset
1772 flow control parameters that may come later. For example, if we want
Ritor1
parents:
diff changeset
1773 to implement more sophisticated looping and branching constructs, they
Ritor1
parents:
diff changeset
1774 would live in this track.
Ritor1
parents:
diff changeset
1775 */
Ritor1
parents:
diff changeset
1776
Ritor1
parents:
diff changeset
1777 #define DMUS_FOURCC_MARKERTRACK_LIST mmioFOURCC('M','A','R','K')
Ritor1
parents:
diff changeset
1778 #define DMUS_FOURCC_VALIDSTART_CHUNK mmioFOURCC('v','a','l','s')
Ritor1
parents:
diff changeset
1779 #define DMUS_FOURCC_PLAYMARKER_CHUNK mmioFOURCC('p','l','a','y')
Ritor1
parents:
diff changeset
1780
Ritor1
parents:
diff changeset
1781 /* io structures */
Ritor1
parents:
diff changeset
1782 typedef struct _DMUS_IO_VALID_START
Ritor1
parents:
diff changeset
1783 {
Ritor1
parents:
diff changeset
1784 MUSIC_TIME mtTime; /* Time of a legal start. */
Ritor1
parents:
diff changeset
1785 } DMUS_IO_VALID_START;
Ritor1
parents:
diff changeset
1786
Ritor1
parents:
diff changeset
1787 typedef struct _DMUS_IO_PLAY_MARKER
Ritor1
parents:
diff changeset
1788 {
Ritor1
parents:
diff changeset
1789 MUSIC_TIME mtTime; /* Time of a next legal play point marker. */
Ritor1
parents:
diff changeset
1790 } DMUS_IO_PLAY_MARKER;
Ritor1
parents:
diff changeset
1791
Ritor1
parents:
diff changeset
1792 /*
Ritor1
parents:
diff changeset
1793 LIST
Ritor1
parents:
diff changeset
1794 (
Ritor1
parents:
diff changeset
1795 'MARK' // Marker Track list-type
Ritor1
parents:
diff changeset
1796 [<vals-ck>] // Chunk containing an array of start points
Ritor1
parents:
diff changeset
1797 [<play-ck>] // Chunk containing an array of play start markers
Ritor1
parents:
diff changeset
1798 )
Ritor1
parents:
diff changeset
1799
Ritor1
parents:
diff changeset
1800 'vals'
Ritor1
parents:
diff changeset
1801 (
Ritor1
parents:
diff changeset
1802 // size of DMUS_IO_VALID_START : DWORD
Ritor1
parents:
diff changeset
1803 <DMUS_IO_VALID_START>...
Ritor1
parents:
diff changeset
1804 )
Ritor1
parents:
diff changeset
1805
Ritor1
parents:
diff changeset
1806 'play'
Ritor1
parents:
diff changeset
1807 (
Ritor1
parents:
diff changeset
1808 // size of DMUS_IO_PLAY_MARKER : DWORD
Ritor1
parents:
diff changeset
1809 <DMUS_IO_PLAY_MARKER>...
Ritor1
parents:
diff changeset
1810 )
Ritor1
parents:
diff changeset
1811
Ritor1
parents:
diff changeset
1812 */
Ritor1
parents:
diff changeset
1813
Ritor1
parents:
diff changeset
1814 /* segment trigger tracks */
Ritor1
parents:
diff changeset
1815
Ritor1
parents:
diff changeset
1816 /* RIFF ids: */
Ritor1
parents:
diff changeset
1817 #define DMUS_FOURCC_SEGTRACK_LIST mmioFOURCC('s','e','g','t')
Ritor1
parents:
diff changeset
1818 #define DMUS_FOURCC_SEGTRACK_CHUNK mmioFOURCC('s','g','t','h')
Ritor1
parents:
diff changeset
1819 #define DMUS_FOURCC_SEGMENTS_LIST mmioFOURCC('l','s','g','l')
Ritor1
parents:
diff changeset
1820 #define DMUS_FOURCC_SEGMENT_LIST mmioFOURCC('l','s','e','g')
Ritor1
parents:
diff changeset
1821 #define DMUS_FOURCC_SEGMENTITEM_CHUNK mmioFOURCC('s','g','i','h')
Ritor1
parents:
diff changeset
1822 #define DMUS_FOURCC_SEGMENTITEMNAME_CHUNK mmioFOURCC('s','n','a','m')
Ritor1
parents:
diff changeset
1823
Ritor1
parents:
diff changeset
1824 /* io structures */
Ritor1
parents:
diff changeset
1825 typedef struct _DMUS_IO_SEGMENT_TRACK_HEADER
Ritor1
parents:
diff changeset
1826 {
Ritor1
parents:
diff changeset
1827 DWORD dwFlags; /* Reserved leave as 0. */
Ritor1
parents:
diff changeset
1828 } DMUS_IO_SEGMENT_TRACK_HEADER;
Ritor1
parents:
diff changeset
1829
Ritor1
parents:
diff changeset
1830 typedef struct _DMUS_IO_SEGMENT_ITEM_HEADER
Ritor1
parents:
diff changeset
1831 {
Ritor1
parents:
diff changeset
1832 MUSIC_TIME lTimeLogical; /* Position in track list. Time in the music with which the event is associated. */
Ritor1
parents:
diff changeset
1833 MUSIC_TIME lTimePhysical; /* Precise time event will be triggered. Should be close to logical time. */
Ritor1
parents:
diff changeset
1834 DWORD dwPlayFlags; /* Flags for PlaySegment(). */
Ritor1
parents:
diff changeset
1835 DWORD dwFlags; /* Flags. */
Ritor1
parents:
diff changeset
1836 } DMUS_IO_SEGMENT_ITEM_HEADER;
Ritor1
parents:
diff changeset
1837
Ritor1
parents:
diff changeset
1838 /* values for dwflags field of DMUS_IO_SEGMENT_ITEM_HEADER */
Ritor1
parents:
diff changeset
1839 #define DMUS_SEGMENTTRACKF_MOTIF 1 /* interpret DMRF as link to style, and use snam as the name of a motif within the style */
Ritor1
parents:
diff changeset
1840
Ritor1
parents:
diff changeset
1841 /*
Ritor1
parents:
diff changeset
1842 LIST
Ritor1
parents:
diff changeset
1843 (
Ritor1
parents:
diff changeset
1844 'segt' // DirectMusic Segment Trigger Track form-type
Ritor1
parents:
diff changeset
1845 [<sgth-ck>] // Segment track header
Ritor1
parents:
diff changeset
1846 <lsgl-list> // List of Segment Lists
Ritor1
parents:
diff changeset
1847 )
Ritor1
parents:
diff changeset
1848
Ritor1
parents:
diff changeset
1849 // <sgth-ck>
Ritor1
parents:
diff changeset
1850 'sgth'
Ritor1
parents:
diff changeset
1851 (
Ritor1
parents:
diff changeset
1852 <DMUS_IO_SEGMENT_TRACK_HEADER>
Ritor1
parents:
diff changeset
1853 )
Ritor1
parents:
diff changeset
1854
Ritor1
parents:
diff changeset
1855 // <lsgl-list>
Ritor1
parents:
diff changeset
1856 LIST
Ritor1
parents:
diff changeset
1857 (
Ritor1
parents:
diff changeset
1858 'lsgl' // Array of segments
Ritor1
parents:
diff changeset
1859 <lseg-list>... // Each segment is encapsulated in a list (that way it can still be riff parsed.)
Ritor1
parents:
diff changeset
1860 )
Ritor1
parents:
diff changeset
1861
Ritor1
parents:
diff changeset
1862 // <lseg-list>
Ritor1
parents:
diff changeset
1863 LIST
Ritor1
parents:
diff changeset
1864 (
Ritor1
parents:
diff changeset
1865 'lseg'
Ritor1
parents:
diff changeset
1866 <sgih-ck>
Ritor1
parents:
diff changeset
1867 <DMRF-list> // Link to a segment or style file.
Ritor1
parents:
diff changeset
1868 [<snam-ck>] // Name field. Used with DMUS_SEGMENTTRACKF_MOTIF flag.
Ritor1
parents:
diff changeset
1869 )
Ritor1
parents:
diff changeset
1870
Ritor1
parents:
diff changeset
1871 // <sgih-ck> // segment item header
Ritor1
parents:
diff changeset
1872 (
Ritor1
parents:
diff changeset
1873 <DMUS_IO_SEGMENT_ITEM_HEADER> // Segment item header
Ritor1
parents:
diff changeset
1874 )
Ritor1
parents:
diff changeset
1875
Ritor1
parents:
diff changeset
1876 // <snam-ck>
Ritor1
parents:
diff changeset
1877 (
Ritor1
parents:
diff changeset
1878 // Name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1879 )
Ritor1
parents:
diff changeset
1880 */
Ritor1
parents:
diff changeset
1881
Ritor1
parents:
diff changeset
1882 /* Script track. */
Ritor1
parents:
diff changeset
1883
Ritor1
parents:
diff changeset
1884 /* RIFF ids: */
Ritor1
parents:
diff changeset
1885 #define DMUS_FOURCC_SCRIPTTRACK_LIST mmioFOURCC('s','c','r','t')
Ritor1
parents:
diff changeset
1886 #define DMUS_FOURCC_SCRIPTTRACKEVENTS_LIST mmioFOURCC('s','c','r','l')
Ritor1
parents:
diff changeset
1887 #define DMUS_FOURCC_SCRIPTTRACKEVENT_LIST mmioFOURCC('s','c','r','e')
Ritor1
parents:
diff changeset
1888 #define DMUS_FOURCC_SCRIPTTRACKEVENTHEADER_CHUNK mmioFOURCC('s','c','r','h')
Ritor1
parents:
diff changeset
1889 #define DMUS_FOURCC_SCRIPTTRACKEVENTNAME_CHUNK mmioFOURCC('s','c','r','n')
Ritor1
parents:
diff changeset
1890
Ritor1
parents:
diff changeset
1891 /* Flags for DMUS_IO_SCRIPTTRACK_TIMING
Ritor1
parents:
diff changeset
1892 */
Ritor1
parents:
diff changeset
1893 #define DMUS_IO_SCRIPTTRACKF_PREPARE (1 << 0) /* Fire event in advance of time stamp, at Prepare time. This is the default because it leaves the script time to change the music happening at the target time. */
Ritor1
parents:
diff changeset
1894 #define DMUS_IO_SCRIPTTRACKF_QUEUE (1 << 1) /* Fire event just before time stamp, at Queue time. */
Ritor1
parents:
diff changeset
1895 #define DMUS_IO_SCRIPTTRACKF_ATTIME (1 << 2) /* Fire event right at the time stamp. */
Ritor1
parents:
diff changeset
1896
Ritor1
parents:
diff changeset
1897 typedef struct _DMUS_IO_SCRIPTTRACK_EVENTHEADER
Ritor1
parents:
diff changeset
1898 {
Ritor1
parents:
diff changeset
1899 DWORD dwFlags; /* various bits (see DMUS_IO_SCRIPTTRACKF_*) */
Ritor1
parents:
diff changeset
1900 MUSIC_TIME lTimeLogical; /* Position in track list. Time in the music with which the event is associated. */
Ritor1
parents:
diff changeset
1901 MUSIC_TIME lTimePhysical; /* Precise time event will be triggered. Should be close to logical time. */
Ritor1
parents:
diff changeset
1902 } DMUS_IO_SCRIPTTRACK_EVENTHEADER;
Ritor1
parents:
diff changeset
1903
Ritor1
parents:
diff changeset
1904 /*
Ritor1
parents:
diff changeset
1905 // Script Track
Ritor1
parents:
diff changeset
1906
Ritor1
parents:
diff changeset
1907 // <scrt-list>
Ritor1
parents:
diff changeset
1908 LIST
Ritor1
parents:
diff changeset
1909 (
Ritor1
parents:
diff changeset
1910 <scrl-list> // List of script events
Ritor1
parents:
diff changeset
1911 )
Ritor1
parents:
diff changeset
1912
Ritor1
parents:
diff changeset
1913 // <scrl-list>
Ritor1
parents:
diff changeset
1914 LIST
Ritor1
parents:
diff changeset
1915 (
Ritor1
parents:
diff changeset
1916 <scre-list>... // Array of event descriptions
Ritor1
parents:
diff changeset
1917 )
Ritor1
parents:
diff changeset
1918
Ritor1
parents:
diff changeset
1919 // <scre-list>
Ritor1
parents:
diff changeset
1920 LIST
Ritor1
parents:
diff changeset
1921 (
Ritor1
parents:
diff changeset
1922 <scrh-ck> // Event header chunk
Ritor1
parents:
diff changeset
1923 <DMRF>
Ritor1
parents:
diff changeset
1924 <scrn-ck> // Routine name
Ritor1
parents:
diff changeset
1925 )
Ritor1
parents:
diff changeset
1926
Ritor1
parents:
diff changeset
1927 'scrh'
Ritor1
parents:
diff changeset
1928 (
Ritor1
parents:
diff changeset
1929 <DMUS_IO_SCRIPTTRACK_EVENTHEADER>
Ritor1
parents:
diff changeset
1930 )
Ritor1
parents:
diff changeset
1931
Ritor1
parents:
diff changeset
1932 'scrn'
Ritor1
parents:
diff changeset
1933 (
Ritor1
parents:
diff changeset
1934 // Name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1935 )
Ritor1
parents:
diff changeset
1936 */
Ritor1
parents:
diff changeset
1937
Ritor1
parents:
diff changeset
1938 /* Lyrics/Notification track. */
Ritor1
parents:
diff changeset
1939
Ritor1
parents:
diff changeset
1940 /* RIFF ids: */
Ritor1
parents:
diff changeset
1941 #define DMUS_FOURCC_LYRICSTRACK_LIST mmioFOURCC('l','y','r','t')
Ritor1
parents:
diff changeset
1942 #define DMUS_FOURCC_LYRICSTRACKEVENTS_LIST mmioFOURCC('l','y','r','l')
Ritor1
parents:
diff changeset
1943 #define DMUS_FOURCC_LYRICSTRACKEVENT_LIST mmioFOURCC('l','y','r','e')
Ritor1
parents:
diff changeset
1944 #define DMUS_FOURCC_LYRICSTRACKEVENTHEADER_CHUNK mmioFOURCC('l','y','r','h')
Ritor1
parents:
diff changeset
1945 #define DMUS_FOURCC_LYRICSTRACKEVENTTEXT_CHUNK mmioFOURCC('l','y','r','n')
Ritor1
parents:
diff changeset
1946
Ritor1
parents:
diff changeset
1947 typedef struct _DMUS_IO_LYRICSTRACK_EVENTHEADER
Ritor1
parents:
diff changeset
1948 {
Ritor1
parents:
diff changeset
1949 DWORD dwFlags; /* Reserved leave as 0. */
Ritor1
parents:
diff changeset
1950 DWORD dwTimingFlags; /* Combination DMUS_PMSGF_TOOL_* flags. Determines the precise timing of when the notification happens. Invalid with the flag DMUS_PMSGF_REFTIME, DMUS_PMSGF_MUSICTIME, DMUS_PMSGF_TOOL_FLUSH, or DMUS_PMSGF_LOCKTOREFTIME. */
Ritor1
parents:
diff changeset
1951 MUSIC_TIME lTimeLogical; /* Position in track list. Time in the music with which the event is associated. */
Ritor1
parents:
diff changeset
1952 MUSIC_TIME lTimePhysical; /* Precise time event will be triggered. Should be close to logical time. */
Ritor1
parents:
diff changeset
1953 } DMUS_IO_LYRICSTRACK_EVENTHEADER;
Ritor1
parents:
diff changeset
1954
Ritor1
parents:
diff changeset
1955 /*
Ritor1
parents:
diff changeset
1956 // Lyrics/Notification Track
Ritor1
parents:
diff changeset
1957
Ritor1
parents:
diff changeset
1958 // <lyrt-list>
Ritor1
parents:
diff changeset
1959 LIST
Ritor1
parents:
diff changeset
1960 (
Ritor1
parents:
diff changeset
1961 <lyrl-list> // List of notification events
Ritor1
parents:
diff changeset
1962 )
Ritor1
parents:
diff changeset
1963
Ritor1
parents:
diff changeset
1964 // <lyrl-list>
Ritor1
parents:
diff changeset
1965 LIST
Ritor1
parents:
diff changeset
1966 (
Ritor1
parents:
diff changeset
1967 <lyre-list>... // Array of event descriptions
Ritor1
parents:
diff changeset
1968 )
Ritor1
parents:
diff changeset
1969
Ritor1
parents:
diff changeset
1970 // <lyre-list>
Ritor1
parents:
diff changeset
1971 LIST
Ritor1
parents:
diff changeset
1972 (
Ritor1
parents:
diff changeset
1973 <lyrh-ck> // Event header chunk
Ritor1
parents:
diff changeset
1974 <lyrn-ck> // Notification text
Ritor1
parents:
diff changeset
1975 )
Ritor1
parents:
diff changeset
1976
Ritor1
parents:
diff changeset
1977 'lyrh'
Ritor1
parents:
diff changeset
1978 (
Ritor1
parents:
diff changeset
1979 <DMUS_IO_LYRICSTRACK_EVENTHEADER>
Ritor1
parents:
diff changeset
1980 )
Ritor1
parents:
diff changeset
1981
Ritor1
parents:
diff changeset
1982 'lyrn'
Ritor1
parents:
diff changeset
1983 (
Ritor1
parents:
diff changeset
1984 // Name, stored as NULL terminated string of WCHARs
Ritor1
parents:
diff changeset
1985 )
Ritor1
parents:
diff changeset
1986 */
Ritor1
parents:
diff changeset
1987
Ritor1
parents:
diff changeset
1988 /* Parameter control track */
Ritor1
parents:
diff changeset
1989
Ritor1
parents:
diff changeset
1990 /* RIFF ids: */
Ritor1
parents:
diff changeset
1991 #define DMUS_FOURCC_PARAMCONTROLTRACK_TRACK_LIST mmioFOURCC('p','r','m','t')
Ritor1
parents:
diff changeset
1992 #define DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_LIST mmioFOURCC('p','r','o','l')
Ritor1
parents:
diff changeset
1993 #define DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_CHUNK mmioFOURCC('p','r','o','h')
Ritor1
parents:
diff changeset
1994 #define DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_LIST mmioFOURCC('p','r','p','l')
Ritor1
parents:
diff changeset
1995 #define DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_CHUNK mmioFOURCC('p','r','p','h')
Ritor1
parents:
diff changeset
1996 #define DMUS_FOURCC_PARAMCONTROLTRACK_CURVES_CHUNK mmioFOURCC('p','r','c','c')
Ritor1
parents:
diff changeset
1997
Ritor1
parents:
diff changeset
1998 typedef struct _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER
Ritor1
parents:
diff changeset
1999 {
Ritor1
parents:
diff changeset
2000 DWORD dwFlags; /* Reserved. Must be zero. */
Ritor1
parents:
diff changeset
2001 GUID guidTimeFormat; /* Time format to set the object to. Must be GUID_TIME_REFERNCE or GUID_TIME_MUSIC from medparam.h. */
Ritor1
parents:
diff changeset
2002 /* Path for finding the object. These fields correspond to the first five parameters of IDirectMusicSegmentState::GetObjectInPath. */
Ritor1
parents:
diff changeset
2003 DWORD dwPChannel;
Ritor1
parents:
diff changeset
2004 DWORD dwStage;
Ritor1
parents:
diff changeset
2005 DWORD dwBuffer;
Ritor1
parents:
diff changeset
2006 GUID guidObject;
Ritor1
parents:
diff changeset
2007 DWORD dwIndex;
Ritor1
parents:
diff changeset
2008 } DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER;
Ritor1
parents:
diff changeset
2009
Ritor1
parents:
diff changeset
2010 typedef struct _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER
Ritor1
parents:
diff changeset
2011 {
Ritor1
parents:
diff changeset
2012 DWORD dwFlags; /* Reserved. Must be zero. */
Ritor1
parents:
diff changeset
2013 DWORD dwIndex; /* Index number of the parameter on the object */
Ritor1
parents:
diff changeset
2014 } DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER;
Ritor1
parents:
diff changeset
2015
Ritor1
parents:
diff changeset
2016 typedef struct _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO
Ritor1
parents:
diff changeset
2017 {
Ritor1
parents:
diff changeset
2018 MUSIC_TIME mtStartTime;
Ritor1
parents:
diff changeset
2019 MUSIC_TIME mtEndTime;
Ritor1
parents:
diff changeset
2020 float fltStartValue;
Ritor1
parents:
diff changeset
2021 float fltEndValue;
Ritor1
parents:
diff changeset
2022 DWORD dwCurveType; /* One of the items from the MP_CURVE_TYPE enum in medparam.h */
Ritor1
parents:
diff changeset
2023 DWORD dwFlags; /* A combination of the MPF_ENVLP_* constants in medparam.h */
Ritor1
parents:
diff changeset
2024 } DMUS_IO_PARAMCONTROLTRACK_CURVEINFO;
Ritor1
parents:
diff changeset
2025
Ritor1
parents:
diff changeset
2026 /*
Ritor1
parents:
diff changeset
2027 // <prmt-list>
Ritor1
parents:
diff changeset
2028 LIST
Ritor1
parents:
diff changeset
2029 (
Ritor1
parents:
diff changeset
2030 <prol-list>... // one for each object
Ritor1
parents:
diff changeset
2031 )
Ritor1
parents:
diff changeset
2032
Ritor1
parents:
diff changeset
2033 // <prol-list>
Ritor1
parents:
diff changeset
2034 LIST
Ritor1
parents:
diff changeset
2035 (
Ritor1
parents:
diff changeset
2036 <proh-ck> // object header chunk
Ritor1
parents:
diff changeset
2037 <prpl-list>... // one for each parameter
Ritor1
parents:
diff changeset
2038 )
Ritor1
parents:
diff changeset
2039
Ritor1
parents:
diff changeset
2040 // <proh-ck>
Ritor1
parents:
diff changeset
2041 proh
Ritor1
parents:
diff changeset
2042 (
Ritor1
parents:
diff changeset
2043 <DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER>
Ritor1
parents:
diff changeset
2044 )
Ritor1
parents:
diff changeset
2045
Ritor1
parents:
diff changeset
2046 // <prpl-list>
Ritor1
parents:
diff changeset
2047 LIST
Ritor1
parents:
diff changeset
2048 (
Ritor1
parents:
diff changeset
2049 <prph-ck> // parameter header chunk
Ritor1
parents:
diff changeset
2050 <prcc-ck> // chunk containing an array of curves
Ritor1
parents:
diff changeset
2051 )
Ritor1
parents:
diff changeset
2052
Ritor1
parents:
diff changeset
2053 // <prph-ck>
Ritor1
parents:
diff changeset
2054 prph
Ritor1
parents:
diff changeset
2055 (
Ritor1
parents:
diff changeset
2056 <DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER>
Ritor1
parents:
diff changeset
2057 )
Ritor1
parents:
diff changeset
2058
Ritor1
parents:
diff changeset
2059 // <prcc-ck>
Ritor1
parents:
diff changeset
2060 prcc
Ritor1
parents:
diff changeset
2061 (
Ritor1
parents:
diff changeset
2062 // sizeof DMUS_IO_PARAMCONTROLTRACK_CURVEINFO:DWORD
Ritor1
parents:
diff changeset
2063 <DMUS_IO_PARAMCONTROLTRACK_CURVEINFO>... // curves, sorted in order of mtTime
Ritor1
parents:
diff changeset
2064 )
Ritor1
parents:
diff changeset
2065 */
Ritor1
parents:
diff changeset
2066
Ritor1
parents:
diff changeset
2067 #if (DIRECTSOUND_VERSION >= 0x0800)
Ritor1
parents:
diff changeset
2068
Ritor1
parents:
diff changeset
2069 /* DirectSoundBufferConfig FX Map */
Ritor1
parents:
diff changeset
2070
Ritor1
parents:
diff changeset
2071 /* RIFF ids: */
Ritor1
parents:
diff changeset
2072
Ritor1
parents:
diff changeset
2073 #define DMUS_FOURCC_DSBC_FORM mmioFOURCC('D','S','B','C')
Ritor1
parents:
diff changeset
2074 #define DMUS_FOURCC_DSBD_CHUNK mmioFOURCC('d','s','b','d')
Ritor1
parents:
diff changeset
2075 #define DMUS_FOURCC_BSID_CHUNK mmioFOURCC('b','s','i','d')
Ritor1
parents:
diff changeset
2076 #define DMUS_FOURCC_DS3D_CHUNK mmioFOURCC('d','s','3','d')
Ritor1
parents:
diff changeset
2077 #define DMUS_FOURCC_DSBC_LIST mmioFOURCC('f','x','l','s')
Ritor1
parents:
diff changeset
2078 #define DMUS_FOURCC_DSFX_FORM mmioFOURCC('D','S','F','X')
Ritor1
parents:
diff changeset
2079 #define DMUS_FOURCC_DSFX_CHUNK mmioFOURCC('f','x','h','r')
Ritor1
parents:
diff changeset
2080 #define DMUS_FOURCC_DSFX_DATA mmioFOURCC('d','a','t','a')
Ritor1
parents:
diff changeset
2081
Ritor1
parents:
diff changeset
2082 /* io structures */
Ritor1
parents:
diff changeset
2083
Ritor1
parents:
diff changeset
2084 typedef struct _DSOUND_IO_DSBUFFERDESC
Ritor1
parents:
diff changeset
2085 {
Ritor1
parents:
diff changeset
2086 DWORD dwFlags; /* DirectSound buffer creation flags */
Ritor1
parents:
diff changeset
2087 WORD nChannels; /* No. of channels (rest of buffer format is determined by owning sink) */
Ritor1
parents:
diff changeset
2088 LONG lVolume; /* Initial pan; only used if CTRLVOLUME is specified */
Ritor1
parents:
diff changeset
2089 LONG lPan; /* Initial pan; only used if CTRLPAN is specified */
Ritor1
parents:
diff changeset
2090 DWORD dwReserved; /* Reserved - must be 0 */
Ritor1
parents:
diff changeset
2091 } DSOUND_IO_DSBUFFERDESC;
Ritor1
parents:
diff changeset
2092
Ritor1
parents:
diff changeset
2093 typedef struct _DSOUND_IO_DSBUSID
Ritor1
parents:
diff changeset
2094 {
Ritor1
parents:
diff changeset
2095 DWORD busid[1]; /* Array size determined from chunk size */
Ritor1
parents:
diff changeset
2096 } DSOUND_IO_DSBUSID;
Ritor1
parents:
diff changeset
2097
Ritor1
parents:
diff changeset
2098 typedef struct _DSOUND_IO_3D
Ritor1
parents:
diff changeset
2099 {
Ritor1
parents:
diff changeset
2100 GUID guid3DAlgorithm; /* GUID identifying the 3D algorithm to use (defined in dsound.h) */
Ritor1
parents:
diff changeset
2101 DS3DBUFFER ds3d; /* Initial 3D parameters */
Ritor1
parents:
diff changeset
2102 } DSOUND_IO_3D;
Ritor1
parents:
diff changeset
2103
Ritor1
parents:
diff changeset
2104 typedef struct _DSOUND_IO_DXDMO_HEADER
Ritor1
parents:
diff changeset
2105 {
Ritor1
parents:
diff changeset
2106 DWORD dwEffectFlags; /* Effect creation flags - equivalent to DSEFFECTDESC::dwFlags */
Ritor1
parents:
diff changeset
2107 GUID guidDSFXClass; /* GUID identifying the effect to use - corresponds to a COM CLSID */
Ritor1
parents:
diff changeset
2108 GUID guidReserved; /* Reserved - must be the null GUID */
Ritor1
parents:
diff changeset
2109 GUID guidSendBuffer; /* GUID identifying the buffer to send to if this is a send effect */
Ritor1
parents:
diff changeset
2110 DWORD dwReserved; /* Reserved - must be 0 */
Ritor1
parents:
diff changeset
2111 } DSOUND_IO_DXDMO_HEADER;
Ritor1
parents:
diff changeset
2112
Ritor1
parents:
diff changeset
2113 typedef struct _DSOUND_IO_DXDMO_DATA
Ritor1
parents:
diff changeset
2114 {
Ritor1
parents:
diff changeset
2115 DWORD data[1]; /* Array size determined by the DMO involved */
Ritor1
parents:
diff changeset
2116 } DSOUND_IO_DXDMO_DATA;
Ritor1
parents:
diff changeset
2117
Ritor1
parents:
diff changeset
2118 /*
Ritor1
parents:
diff changeset
2119 RIFF
Ritor1
parents:
diff changeset
2120 (
Ritor1
parents:
diff changeset
2121 'DSBC' // DirectSoundBufferConfig chunk
Ritor1
parents:
diff changeset
2122 [<guid-ck>] // GUID identifier for this DirectSoundBufferConfig
Ritor1
parents:
diff changeset
2123 [<vers-ck>] // Optional version info
Ritor1
parents:
diff changeset
2124 [<UNFO-list>] // Name, author, copyright info., comments
Ritor1
parents:
diff changeset
2125 <dsbd-ck> // DirectSound Buffer descriptor chunk
Ritor1
parents:
diff changeset
2126 [<bsid-ck>] // Optional bus id array
Ritor1
parents:
diff changeset
2127 [<ds3d-ck>] // Optional 3d Parameters
Ritor1
parents:
diff changeset
2128 [<fxls-list>] // Optional list of FX descriptors
Ritor1
parents:
diff changeset
2129 )
Ritor1
parents:
diff changeset
2130
Ritor1
parents:
diff changeset
2131 // <guid-ck>
Ritor1
parents:
diff changeset
2132 'guid'
Ritor1
parents:
diff changeset
2133 (
Ritor1
parents:
diff changeset
2134 <GUID>
Ritor1
parents:
diff changeset
2135 )
Ritor1
parents:
diff changeset
2136
Ritor1
parents:
diff changeset
2137 // <vers-ck>
Ritor1
parents:
diff changeset
2138 'vers'
Ritor1
parents:
diff changeset
2139 (
Ritor1
parents:
diff changeset
2140 <DMUS_IO_VERSION>
Ritor1
parents:
diff changeset
2141 )
Ritor1
parents:
diff changeset
2142
Ritor1
parents:
diff changeset
2143 // <dsbd-ck>
Ritor1
parents:
diff changeset
2144 'dsbd'
Ritor1
parents:
diff changeset
2145 (
Ritor1
parents:
diff changeset
2146 <DSOUND_IO_DSBUFFERDESC> // Creation parameters and initial settings for the buffer
Ritor1
parents:
diff changeset
2147 )
Ritor1
parents:
diff changeset
2148
Ritor1
parents:
diff changeset
2149 // <bsid-ck>
Ritor1
parents:
diff changeset
2150 'bsid'
Ritor1
parents:
diff changeset
2151 (
Ritor1
parents:
diff changeset
2152 <DSOUND_IO_DSBUSID> // The size of DSOUND_IO_DSBUSID is determined by the chunk size
Ritor1
parents:
diff changeset
2153 )
Ritor1
parents:
diff changeset
2154
Ritor1
parents:
diff changeset
2155 // <ds3d-ck>
Ritor1
parents:
diff changeset
2156 'ds3d'
Ritor1
parents:
diff changeset
2157 (
Ritor1
parents:
diff changeset
2158 <DSOUND_IO_3D> // Initial 3D buffer parameters: position, etc.
Ritor1
parents:
diff changeset
2159 )
Ritor1
parents:
diff changeset
2160
Ritor1
parents:
diff changeset
2161 // <fx-list>
Ritor1
parents:
diff changeset
2162 LIST
Ritor1
parents:
diff changeset
2163 (
Ritor1
parents:
diff changeset
2164 'fxls' // Array of DMO creation parameter blocks
Ritor1
parents:
diff changeset
2165 <DSFX-form>... // Each DMO is encapsulated in a RIFF chunk
Ritor1
parents:
diff changeset
2166 )
Ritor1
parents:
diff changeset
2167
Ritor1
parents:
diff changeset
2168 // <DSFX-form> // DMOs can be embedded in a buffer configuration or stored as separate files
Ritor1
parents:
diff changeset
2169 RIFF
Ritor1
parents:
diff changeset
2170 (
Ritor1
parents:
diff changeset
2171 'DSFX'
Ritor1
parents:
diff changeset
2172 <fxhr-ck> // FX header chunk
Ritor1
parents:
diff changeset
2173 [<data-ck>] // FX initial settings chunk
Ritor1
parents:
diff changeset
2174 )
Ritor1
parents:
diff changeset
2175
Ritor1
parents:
diff changeset
2176 // <fxhr-ck>
Ritor1
parents:
diff changeset
2177 'fxhr'
Ritor1
parents:
diff changeset
2178 (
Ritor1
parents:
diff changeset
2179 <DSOUND_IO_DXDMO_HEADER>
Ritor1
parents:
diff changeset
2180 )
Ritor1
parents:
diff changeset
2181
Ritor1
parents:
diff changeset
2182 // <data-ck>
Ritor1
parents:
diff changeset
2183 'data'
Ritor1
parents:
diff changeset
2184 (
Ritor1
parents:
diff changeset
2185 <DSOUND_IO_DXDMO_DATA> // Opaque data block used by the DMO to load itself.
Ritor1
parents:
diff changeset
2186 // For our standard included DMOs, this is simply the structure accepted by
Ritor1
parents:
diff changeset
2187 // the DMO's SetAllParameters() method - e.g. struct DSFXChorus for Chorus.
Ritor1
parents:
diff changeset
2188 )
Ritor1
parents:
diff changeset
2189 */
Ritor1
parents:
diff changeset
2190
Ritor1
parents:
diff changeset
2191 #endif
Ritor1
parents:
diff changeset
2192
Ritor1
parents:
diff changeset
2193 #ifdef __cplusplus
Ritor1
parents:
diff changeset
2194 }; /* extern "C" */
Ritor1
parents:
diff changeset
2195 #endif
Ritor1
parents:
diff changeset
2196
Ritor1
parents:
diff changeset
2197 #include <poppack.h>
Ritor1
parents:
diff changeset
2198
Ritor1
parents:
diff changeset
2199 #endif /* #ifndef _DMUSICF_ */