annotate lib/legacy_dx/dmusicf.h @ 145:dac041fc74e8

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