OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
structs.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5namespace Dx8 {
6
7#pragma pack(push,1)
8struct GUID final {
9 uint32_t Data1 = 0;
10 uint16_t Data2 = 0;
11 uint16_t Data3 = 0;
12 uint64_t Data4 = 0;
13
14 bool operator == (const GUID& g) const {
15 return Data1==g.Data1 &&
16 Data2==g.Data2 &&
17 Data3==g.Data3 &&
18 Data4==g.Data4;
19 }
20 };
21
22using MUSIC_TIME=uint32_t;
23
26 uint32_t dwPosition = 0;
27 uint32_t dwGroup = 0;
28 char ckid[4] = {};
29 char fccType[4] = {};
30 };
31
35
36struct DMUS_IO_CHORD final {
37 char16_t wszName[16]={};
38 uint32_t mtTime =0;
39 uint16_t wMeasure =0;
40 uint8_t bBeat =0;
42 };
43
44struct DMUS_IO_SUBCHORD final {
45 uint32_t dwChordPattern = 0;
46 uint32_t dwScalePattern = 0;
47 uint32_t dwInversionPoints = 0;
48 uint32_t dwLevels = 0;
49 uint8_t bChordRoot = 0;
50 uint8_t bScaleRoot = 0;
51 };
52
61
62struct DMUS_IO_COMMAND final {
63 uint32_t mtTime = 0;
64 uint16_t wMeasure = 0;
65 uint8_t bBeat = 0;
67 uint8_t bGrooveLevel = 0;
68 uint8_t bGrooveRange = 0;
69 uint8_t bRepeatMode = 0;
70 };
71
72struct DMUS_IO_REFERENCE final {
74 //uint32_t dwValidData = 0;
75 };
76
77struct DMUS_IO_VERSION final {
78 uint32_t dwVersionMS = 0;
79 uint32_t dwVersionLS = 0;
80 };
81
82struct DMUS_IO_TIMESIG final {
83 uint8_t bBeatsPerMeasure = 0;
84 uint8_t bBeat = 0;
85 uint16_t wGridsPerBeat = 0;
86 };
87
88struct DMUS_IO_STYLE final {
90 double dblTempo=0.0;
91 };
92
102
103
104struct DMUS_IO_PATTERN final {
106 uint8_t bGrooveBottom = 0;
107 uint8_t bGrooveTop = 0;
109 uint16_t wNbrMeasures = 0;
110 // uint8_t bDestGrooveBottom = 0;
111 // uint8_t bDestGrooveTop = 0;
112 // uint32_t dwFlags = 0;
113 };
114
131
132struct DMUS_IO_INSTRUMENT final {
133 uint32_t dwPatch = 0;
134 uint32_t dwAssignPatch = 0;
135 uint32_t dwNoteRanges[4] = {};
136 uint32_t dwPChannel = 0;
138 uint8_t bPan = 0;
139 uint8_t bVolume = 0;
140 //uint16_t nTranspose = 0;
141 //uint32_t dwChannelPriority = 0;
142 //uint16_t nPitchBendRange = 0;
143 };
144
153
161
162struct DMUS_IO_STYLEPART final {
164 uint32_t dwVariationChoices[32]={};
166 uint16_t wNbrMeasures=0;
168 // uint8_t bInvertUpper=0;
169 // uint8_t bInvertLower=0;
170 // uint8_t bPad[3]={};
171 // uint32_t dwFlags=0;
172 };
173
174struct DMUS_IO_PARTREF final {
176 uint16_t wLogicalPartID=0;
177 //uint8_t bVariationLockID=0;
178 //uint8_t bSubChordLevel=0;
179 //uint8_t bPriority=0;
180 //uint8_t bRandomVariation=0;
181 //uint16_t wPad=0;
182 //uint32_t dwPChannel=0;
183 };
184
199
200enum Control : uint8_t {
202 ModWheel = 0x01,
203 BreathCtl = 0x02,
204 FootCtl = 0x04,
206 DataMsb = 0x06,
208 Balance = 0x08,
209 Pan = 0x0A,
216 GeneralPurpose4 = 0x13
217 };
218
226
227enum DMUS_CURVE_TYPE : uint8_t {
229 DMUS_CURVET_PBCURVE = 0x03, // Pitch bend curve.
230 DMUS_CURVET_CCCURVE = 0x04, // Control change curve.
235 };
236
237struct DMUS_IO_STYLECURVE final {
238 uint32_t mtGridStart = 0;
239 uint32_t dwVariation = 0;
240 uint32_t mtDuration = 0;
241 uint32_t mtResetDuration = 0;
242 int16_t nTimeOffset = 0;
243 uint16_t nStartValue = 0;
244 uint16_t nEndValue = 0;
245 uint16_t nResetValue = 0;
249 uint8_t bFlags = 0;
250 uint16_t wParamType = 0;
251 uint16_t wMergeIndex = 0;
252 };
253
254#pragma pack(pop)
255}
Definition band.h:10
DMUS_NOTEF_FLAGS
Definition structs.h:154
@ DMUS_NOTEF_NOINVALIDATE_INSCALE
Definition structs.h:157
@ DMUS_NOTEF_NOINVALIDATE
Definition structs.h:156
@ DMUS_NOTEF_NOINVALIDATE_INCHORD
Definition structs.h:158
@ DMUS_NOTEF_NOTEON
Definition structs.h:155
@ DMUS_NOTEF_REGENERATE
Definition structs.h:159
DMUS_COMMANDT_TYPES
Definition structs.h:53
@ DMUS_COMMANDT_BREAK
Definition structs.h:57
@ DMUS_COMMANDT_INTRO
Definition structs.h:56
@ DMUS_COMMANDT_FILL
Definition structs.h:55
@ DMUS_COMMANDT_END
Definition structs.h:58
@ DMUS_COMMANDT_ENDANDINTRO
Definition structs.h:59
@ DMUS_COMMANDT_GROOVE
Definition structs.h:54
DMUS_CHORDKEYF_FLAGS
Definition structs.h:32
@ DMUS_CHORDKEYF_SILENT
Definition structs.h:33
Shape
Definition structs.h:219
@ DMUS_CURVES_EXP
Definition structs.h:222
@ DMUS_CURVES_INSTANT
Definition structs.h:221
@ DMUS_CURVES_LINEAR
Definition structs.h:220
@ DMUS_CURVES_SINE
Definition structs.h:224
@ DMUS_CURVES_LOG
Definition structs.h:223
uint32_t MUSIC_TIME
Definition structs.h:22
DMUS_CURVE_TYPE
Definition structs.h:227
@ DMUS_CURVET_CCCURVE
Definition structs.h:230
@ DMUS_CURVET_PBCURVE
Definition structs.h:229
@ DMUS_CURVET_MATCURVE
Definition structs.h:231
@ DMUS_CURVET_PATCURVE
Definition structs.h:232
@ DMUS_CURVET_RPNCURVE
Definition structs.h:233
@ DMUS_CURVET_NRPNCURVE
Definition structs.h:234
@ DMUS_CURVET_NULL
Definition structs.h:228
DMUS_EMBELLISHT_TYPES
Definition structs.h:93
@ DMUS_EMBELLISHT_ALL
Definition structs.h:100
@ DMUS_EMBELLISHT_INTRO
Definition structs.h:97
@ DMUS_EMBELLISHT_END
Definition structs.h:98
@ DMUS_EMBELLISHT_FILL
Definition structs.h:95
@ DMUS_EMBELLISHT_BREAK
Definition structs.h:96
@ DMUS_EMBELLISHT_MOTIF
Definition structs.h:99
@ DMUS_EMBELLISHT_NORMAL
Definition structs.h:94
DMUS_IO_INST_FLSGS
Definition structs.h:115
@ DMUS_IO_INST_USE_DEFAULT_GM_SET
Definition structs.h:128
@ DMUS_IO_INST_XG
Definition structs.h:126
@ DMUS_IO_INST_PATCH
Definition structs.h:117
@ DMUS_IO_INST_NOTERANGES
Definition structs.h:120
@ DMUS_IO_INST_TRANSPOSE
Definition structs.h:123
@ DMUS_IO_INST_CHANNEL_PRIORITY
Definition structs.h:127
@ DMUS_IO_INST_GS
Definition structs.h:125
@ DMUS_IO_INST_VOLUME
Definition structs.h:122
@ DMUS_IO_INST_GM
Definition structs.h:124
@ DMUS_IO_INST_ASSIGN_PATCH
Definition structs.h:119
@ DMUS_IO_INST_BANKSELECT
Definition structs.h:118
@ DMUS_IO_INST_PAN
Definition structs.h:121
@ DMUS_IO_INST_PITCHBENDRANGE
Definition structs.h:129
@ DMUS_IO_INST_NONE
Definition structs.h:116
DMUS_PLAYMODE_FLAGS
Definition structs.h:145
@ DMUS_PLAYMODE_NONE
Definition structs.h:151
@ DMUS_PLAYMODE_KEY_ROOT
Definition structs.h:147
@ DMUS_PLAYMODE_CHORD_ROOT
Definition structs.h:148
@ DMUS_PLAYMODE_SCALE_INTERVALS
Definition structs.h:149
@ DMUS_PLAYMODE_FIXED
Definition structs.h:146
@ DMUS_PLAYMODE_CHORD_INTERVALS
Definition structs.h:150
Control
Definition structs.h:200
@ Balance
Definition structs.h:208
@ DataMsb
Definition structs.h:206
@ BankSelect
Definition structs.h:201
@ ChannelVolume
Definition structs.h:207
@ Pan
Definition structs.h:209
@ Effect1Ctl
Definition structs.h:211
@ Effect2Ctl
Definition structs.h:212
@ GeneralPurpose2
Definition structs.h:214
@ GeneralPurpose4
Definition structs.h:216
@ ModWheel
Definition structs.h:202
@ BreathCtl
Definition structs.h:203
@ Portamento
Definition structs.h:205
@ GeneralPurpose1
Definition structs.h:213
@ FootCtl
Definition structs.h:204
@ ExpressionCtl
Definition structs.h:210
@ GeneralPurpose3
Definition structs.h:215
char16_t wszName[16]
Definition structs.h:37
DMUS_CHORDKEYF_FLAGS bFlags
Definition structs.h:41
uint16_t wMeasure
Definition structs.h:39
uint32_t mtTime
Definition structs.h:38
uint16_t wMeasure
Definition structs.h:64
uint8_t bGrooveLevel
Definition structs.h:67
uint8_t bRepeatMode
Definition structs.h:69
DMUS_COMMANDT_TYPES bCommand
Definition structs.h:66
uint8_t bGrooveRange
Definition structs.h:68
DMUS_IO_INST_FLSGS dwFlags
Definition structs.h:137
uint32_t dwNoteRanges[4]
Definition structs.h:135
uint16_t wLogicalPartID
Definition structs.h:176
DMUS_EMBELLISHT_TYPES wEmbellishment
Definition structs.h:108
uint8_t bGrooveBottom
Definition structs.h:106
DMUS_IO_TIMESIG timeSig
Definition structs.h:105
uint16_t wNbrMeasures
Definition structs.h:109
DMUS_CURVE_TYPE bEventType
Definition structs.h:246
DMUS_NOTEF_FLAGS bNoteFlags
Definition structs.h:197
DMUS_PLAYMODE_FLAGS bPlayModeFlags
Definition structs.h:196
MUSIC_TIME mtDuration
Definition structs.h:188
MUSIC_TIME mtGridStart
Definition structs.h:186
DMUS_IO_TIMESIG timeSig
Definition structs.h:163
DMUS_PLAYMODE_FLAGS bPlayModeFlags
Definition structs.h:167
uint32_t dwVariationChoices[32]
Definition structs.h:164
DMUS_IO_TIMESIG timeSig
Definition structs.h:89
uint32_t dwScalePattern
Definition structs.h:46
uint32_t dwChordPattern
Definition structs.h:45
uint32_t dwInversionPoints
Definition structs.h:47
uint8_t bBeatsPerMeasure
Definition structs.h:83
uint16_t wGridsPerBeat
Definition structs.h:85
uint32_t dwVersionMS
Definition structs.h:78
uint32_t dwVersionLS
Definition structs.h:79
uint64_t Data4
Definition structs.h:12
uint32_t Data1
Definition structs.h:9
uint16_t Data3
Definition structs.h:11
uint16_t Data2
Definition structs.h:10
bool operator==(const GUID &g) const
Definition structs.h:14