Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1964 lines
108 KiB

  1. /************************************************************************
  2. * *
  3. * dmusici.h -- This module contains the API for the *
  4. * DirectMusic performance layer *
  5. * *
  6. * Copyright (c) 1998-1999 Microsoft Corporation
  7. * *
  8. ************************************************************************/
  9. #ifndef _DMUSICI_
  10. #define _DMUSICI_
  11. #include <windows.h>
  12. #define COM_NO_WINDOWS_H
  13. #include <objbase.h>
  14. #include <mmsystem.h>
  15. #include <dmusicc.h>
  16. /* plugin (track and tool) interfaces. This #include will eventually go away. */
  17. #include <dmplugin.h>
  18. #include <pshpack8.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. typedef WORD TRANSITION_TYPE;
  23. typedef __int64 REFERENCE_TIME;
  24. typedef long MUSIC_TIME;
  25. #define MT_MIN 0x80000000 /* Minimum music time value. */
  26. #define MT_MAX 0x7FFFFFFF /* Maximum music time value. */
  27. #define DMUS_PPQ 768 /* parts per quarter note */
  28. interface IDirectMusicTrack;
  29. interface IDirectMusicPerformance;
  30. interface IDirectMusicPerformance8;
  31. interface IDirectMusicTool;
  32. interface IDirectMusicSegment;
  33. interface IDirectMusicSegment8;
  34. interface IDirectMusicSegmentState;
  35. interface IDirectMusicSegmentState8;
  36. interface IDirectMusicGraph;
  37. interface IDirectMusicBuffer;
  38. interface IDirectMusicInstrument;
  39. interface IDirectMusicDownloadedInstrument;
  40. interface IDirectMusicBand;
  41. interface IDirectMusicChordMap;
  42. interface IDirectMusicLoader;
  43. interface IDirectMusicLoader8;
  44. interface IDirectMusicScript;
  45. interface IDirectMusicObject;
  46. interface IDirectMusicStyle8;
  47. interface IDirectMusicPatternTrack;
  48. interface IDirectMusicContainer;
  49. interface IDirectMusicTool8;
  50. interface IDirectMusicTrack8;
  51. interface IDirectMusicSong;
  52. interface IDirectMusicAudioPath;
  53. #ifndef __cplusplus
  54. typedef interface IDirectMusicTrack IDirectMusicTrack;
  55. typedef interface IDirectMusicPerformance IDirectMusicPerformance;
  56. typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8;
  57. typedef interface IDirectMusicTool IDirectMusicTool;
  58. typedef interface IDirectMusicSegment IDirectMusicSegment;
  59. typedef interface IDirectMusicSegment8 IDirectMusicSegment8;
  60. typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
  61. typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8;
  62. typedef interface IDirectMusicGraph IDirectMusicGraph;
  63. typedef interface IDirectMusicBuffer IDirectMusicBuffer;
  64. typedef interface IDirectMusicInstrument IDirectMusicInstrument;
  65. typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument;
  66. typedef interface IDirectMusicBand IDirectMusicBand;
  67. typedef interface IDirectMusicChordMap IDirectMusicChordMap;
  68. typedef interface IDirectMusicObject IDirectMusicObject;
  69. typedef interface IDirectMusicLoader IDirectMusicLoader;
  70. typedef interface IDirectMusicLoader8 IDirectMusicLoader8;
  71. typedef interface IDirectMusicScript IDirectMusicScript;
  72. typedef interface IDirectMusicStyle8 IDirectMusicStyle8;
  73. typedef interface IDirectMusicPatternTrack IDirectMusicPatternTrack;
  74. typedef interface IDirectMusicContainer IDirectMusicContainer;
  75. typedef interface IDirectMusicTool8 IDirectMusicTool8;
  76. typedef interface IDirectMusicTrack8 IDirectMusicTrack8;
  77. typedef interface IDirectMusicSong IDirectMusicSong;
  78. typedef interface IDirectMusicAudioPath IDirectMusicAudioPath;
  79. #endif
  80. typedef enum enumDMUS_STYLET_TYPES
  81. {
  82. DMUS_STYLET_PATTERN = 0,
  83. DMUS_STYLET_MOTIF = 1,
  84. DMUS_STYLET_FRAGMENT = 2,
  85. } DMUS_STYLET_TYPES;
  86. typedef enum enumDMUS_COMMANDT_TYPES
  87. {
  88. DMUS_COMMANDT_GROOVE = 0,
  89. DMUS_COMMANDT_FILL = 1,
  90. DMUS_COMMANDT_INTRO = 2,
  91. DMUS_COMMANDT_BREAK = 3,
  92. DMUS_COMMANDT_END = 4,
  93. DMUS_COMMANDT_ENDANDINTRO = 5
  94. } DMUS_COMMANDT_TYPES;
  95. typedef enum enumDMUS_SHAPET_TYPES
  96. {
  97. DMUS_SHAPET_FALLING = 0,
  98. DMUS_SHAPET_LEVEL = 1,
  99. DMUS_SHAPET_LOOPABLE = 2,
  100. DMUS_SHAPET_LOUD = 3,
  101. DMUS_SHAPET_QUIET = 4,
  102. DMUS_SHAPET_PEAKING = 5,
  103. DMUS_SHAPET_RANDOM = 6,
  104. DMUS_SHAPET_RISING = 7,
  105. DMUS_SHAPET_SONG = 8
  106. } DMUS_SHAPET_TYPES;
  107. typedef enum enumDMUS_COMPOSEF_FLAGS
  108. {
  109. DMUS_COMPOSEF_NONE = 0,
  110. DMUS_COMPOSEF_ALIGN = 0x1,
  111. DMUS_COMPOSEF_OVERLAP = 0x2,
  112. DMUS_COMPOSEF_IMMEDIATE = 0x4,
  113. DMUS_COMPOSEF_GRID = 0x8,
  114. DMUS_COMPOSEF_BEAT = 0x10,
  115. DMUS_COMPOSEF_MEASURE = 0x20,
  116. DMUS_COMPOSEF_AFTERPREPARETIME = 0x40,
  117. DMUS_COMPOSEF_VALID_START_BEAT = 0x80, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any beat. */
  118. DMUS_COMPOSEF_VALID_START_GRID = 0x100, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any grid. */
  119. DMUS_COMPOSEF_VALID_START_TICK = 0x200, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur any time. */
  120. DMUS_COMPOSEF_SEGMENTEND = 0x400, /* Play the transition at the end of the current segment. */
  121. DMUS_COMPOSEF_MARKER = 0x800, /* Play the transition at the next marker in the current segment. */
  122. DMUS_COMPOSEF_MODULATE = 0x1000,
  123. DMUS_COMPOSEF_LONG = 0x2000,
  124. DMUS_COMPOSEF_ENTIRE_TRANSITION = 0x4000, /* play the entire transition pattern */
  125. DMUS_COMPOSEF_1BAR_TRANSITION = 0x8000, /* play one bar of the transition pattern */
  126. DMUS_COMPOSEF_ENTIRE_ADDITION = 0x10000, /* play the additional pattern in its entirety */
  127. DMUS_COMPOSEF_1BAR_ADDITION = 0x20000, /* play one bar of the additional pattern */
  128. DMUS_COMPOSEF_VALID_START_MEASURE = 0x40000, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any bar. */
  129. DMUS_COMPOSEF_DEFAULT = 0x80000, /* Use segment's default boundary */
  130. DMUS_COMPOSEF_NOINVALIDATE = 0x100000, /* Play without invalidating the currently playing segment(s) */
  131. DMUS_COMPOSEF_USE_AUDIOPATH = 0x200000, /* Uses the audio paths that are embedded in the segments */
  132. DMUS_COMPOSEF_INVALIDATE_PRI = 0x400000 /* Invalidate only the current primary seg state */
  133. } DMUS_COMPOSEF_FLAGS;
  134. #define DMUS_PMSG_PART \
  135. DWORD dwSize; \
  136. REFERENCE_TIME rtTime; /* real time (in 100 nanosecond increments) */ \
  137. MUSIC_TIME mtTime; /* music time */ \
  138. DWORD dwFlags; /* various bits (see DMUS_PMSGF_FLAGS enumeration) */ \
  139. DWORD dwPChannel; /* Performance Channel. The Performance can */ \
  140. /* use this to determine the port/channel. */ \
  141. DWORD dwVirtualTrackID; /* virtual track ID */ \
  142. IDirectMusicTool* pTool; /* tool interface pointer */ \
  143. IDirectMusicGraph* pGraph; /* tool graph interface pointer */ \
  144. DWORD dwType; /* PMSG type (see DMUS_PMSGT_TYPES defines) */ \
  145. DWORD dwVoiceID; /* unique voice id which allows synthesizers to */ \
  146. /* identify a specific event. For DirectX 6.0, */ \
  147. /* this field should always be 0. */ \
  148. DWORD dwGroupID; /* Track group id */ \
  149. IUnknown* punkUser; /* user com pointer, auto released upon PMSG free */
  150. /* every DMUS_PMSG is based off of this structure. The Performance needs
  151. to access these members consistently in every PMSG that goes through it. */
  152. typedef struct _DMUS_PMSG
  153. {
  154. /* begin DMUS_PMSG_PART */
  155. DMUS_PMSG_PART
  156. /* end DMUS_PMSG_PART */
  157. } DMUS_PMSG;
  158. #define DMUS_PCHANNEL_BROADCAST_PERFORMANCE 0xFFFFFFFF /* PMsg is sent on all PChannels of the performance. */
  159. #define DMUS_PCHANNEL_BROADCAST_AUDIOPATH 0xFFFFFFFE /* PMsg is sent on all PChannels of the audio path. */
  160. #define DMUS_PCHANNEL_BROADCAST_SEGMENT 0xFFFFFFFD /* PMsg is sent on all PChannels of the segment. */
  161. #define DMUS_PCHANNEL_BROADCAST_GROUPS 0xFFFFFFFC /* A duplicate PMsg is for each Channels Groups in the performance. */
  162. /* The DMUS_PATH constants are used in conjunction with GetObjectInPath to find a requested
  163. interface at a particular stage in the audio path.
  164. */
  165. #define DMUS_PATH_SEGMENT 0x1000 /* Get the segment itself (from a segment state.) */
  166. #define DMUS_PATH_SEGMENT_TRACK 0x1100 /* Look in Track List of Segment. */
  167. #define DMUS_PATH_SEGMENT_GRAPH 0x1200 /* Get the segment's tool graph. */
  168. #define DMUS_PATH_SEGMENT_TOOL 0x1300 /* Look in Tool Graph of Segment. */
  169. #define DMUS_PATH_AUDIOPATH 0x2000 /* Get the audiopath itself (from a segment state.) */
  170. #define DMUS_PATH_AUDIOPATH_GRAPH 0x2200 /* Get the audiopath's tool graph. */
  171. #define DMUS_PATH_AUDIOPATH_TOOL 0x2300 /* Look in Tool Graph of Audio Path. */
  172. #define DMUS_PATH_PERFORMANCE 0x3000 /* Access the performance. */
  173. #define DMUS_PATH_PERFORMANCE_GRAPH 0x3200 /* Get the performance's tool graph. */
  174. #define DMUS_PATH_PERFORMANCE_TOOL 0x3300 /* Look in Tool Graph of Performance. */
  175. #define DMUS_PATH_PORT 0x4000 /* Access the synth. */
  176. #define DMUS_PATH_BUFFER 0x6000 /* Look in DirectSoundBuffer. */
  177. #define DMUS_PATH_BUFFER_DMO 0x6100 /* Access a DMO in the buffer. */
  178. #define DMUS_PATH_MIXIN_BUFFER 0x7000 /* Look in a global mixin buffer. */
  179. #define DMUS_PATH_MIXIN_BUFFER_DMO 0x7100 /* Access a DMO in a global mixin buffer. */
  180. #define DMUS_PATH_PRIMARY_BUFFER 0x8000 /* Access the primary buffer. */
  181. /* To ignore PChannels when calling GetObjectInPath(), use the DMUS_PCHANNEL_ALL constant. */
  182. #define DMUS_PCHANNEL_ALL 0xFFFFFFFB
  183. /* The DMUS_APATH types are used in conjunction with CreateStandardAudioPath to
  184. build default path types. _SHARED_ means the same buffer is shared across multiple
  185. instantiations of the audiopath type. _DYNAMIC_ means a unique buffer is created
  186. every time.
  187. */
  188. #define DMUS_APATH_SHARED_STEREOPLUSREVERB 1 /* A standard music set up with stereo outs and reverb. */
  189. #define DMUS_APATH_DYNAMIC_3D 6 /* An audio path with one dynamic bus from the synth feeding to a dynamic 3d buffer. Does not send to env reverb. */
  190. #define DMUS_APATH_DYNAMIC_MONO 7 /* An audio path with one dynamic bus from the synth feeding to a dynamic mono buffer. */
  191. #define DMUS_APATH_DYNAMIC_STEREO 8 /* An audio path with two dynamic buses from the synth feeding to a dynamic stereo buffer. */
  192. typedef struct _DMUS_AUDIOPARAMS
  193. {
  194. DWORD dwSize; /* Size of this structure. */
  195. BOOL fInitNow; /* If true, the sink and synth are created immediately and results returned in this structure. */
  196. DWORD dwValidData; /* Flags indicating which fields below are valid. */
  197. DWORD dwFeatures; /* Required DMUS_AUDIOF features. */
  198. DWORD dwVoices; /* Required number of voices. */
  199. DWORD dwSampleRate; /* Sample rate of synths and sink. */
  200. CLSID clsidDefaultSynth; /* Class ID of default synthesizer. */
  201. } DMUS_AUDIOPARAMS;
  202. /* dwFeatures flags. These indicate which features are required for the audio environment. */
  203. #define DMUS_AUDIOF_3D 0x1 /* Require 3D buffers. */
  204. #define DMUS_AUDIOF_ENVIRON 0x2 /* Require environmental modeling. */
  205. #define DMUS_AUDIOF_EAX 0x4 /* Require use of EAX effects. */
  206. #define DMUS_AUDIOF_DMOS 0x8 /* Require use of additional DMOs. */
  207. #define DMUS_AUDIOF_STREAMING 0x10 /* Require support for streaming waves. */
  208. #define DMUS_AUDIOF_BUFFERS 0x20 /* Require support for multiple buffers (all above cases need this.) */
  209. #define DMUS_AUDIOF_ALL 0x3F /* Requires everything. */
  210. /* dwValidData flags. These indicate which fields in DMUS_AUDIOPARAMS have been filled in. If fInitNow is set, these also return what was allocated. */
  211. #define DMUS_AUDIOPARAMS_FEATURES 0x00000001
  212. #define DMUS_AUDIOPARAMS_VOICES 0x00000002
  213. #define DMUS_AUDIOPARAMS_SAMPLERATE 0x00000004
  214. #define DMUS_AUDIOPARAMS_DEFAULTSYNTH 0x00000008
  215. /* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member */
  216. typedef enum enumDMUS_PMSGF_FLAGS
  217. {
  218. DMUS_PMSGF_REFTIME = 1, /* if rtTime is valid */
  219. DMUS_PMSGF_MUSICTIME = 2, /* if mtTime is valid */
  220. DMUS_PMSGF_TOOL_IMMEDIATE = 4, /* if PMSG should be processed immediately */
  221. DMUS_PMSGF_TOOL_QUEUE = 8, /* if PMSG should be processed a little early, at Queue time */
  222. DMUS_PMSGF_TOOL_ATTIME = 0x10, /* if PMSG should be processed at the time stamp */
  223. DMUS_PMSGF_TOOL_FLUSH = 0x20, /* if PMSG is being flushed */
  224. DMUS_PMSGF_LOCKTOREFTIME = 0x40, /* if rtTime can not be overriden by a tempo change. */
  225. DMUS_PMSGF_DX8 = 0x80 /* if the message has DX8 or later extensions. */
  226. /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the */
  227. /* DMUS_PMSG's dwFlags member. */
  228. } DMUS_PMSGF_FLAGS;
  229. /* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member */
  230. typedef enum enumDMUS_PMSGT_TYPES
  231. {
  232. DMUS_PMSGT_MIDI = 0, /* MIDI short message */
  233. DMUS_PMSGT_NOTE = 1, /* Interactive Music Note */
  234. DMUS_PMSGT_SYSEX = 2, /* MIDI long message (system exclusive message) */
  235. DMUS_PMSGT_NOTIFICATION = 3, /* Notification message */
  236. DMUS_PMSGT_TEMPO = 4, /* Tempo message */
  237. DMUS_PMSGT_CURVE = 5, /* Control change / pitch bend, etc. curve */
  238. DMUS_PMSGT_TIMESIG = 6, /* Time signature */
  239. DMUS_PMSGT_PATCH = 7, /* Patch changes */
  240. DMUS_PMSGT_TRANSPOSE = 8, /* Transposition messages */
  241. DMUS_PMSGT_CHANNEL_PRIORITY = 9, /* Channel priority */
  242. DMUS_PMSGT_STOP = 10, /* Stop message */
  243. DMUS_PMSGT_DIRTY = 11, /* Tells Tools that cache GetParam() info to refresh */
  244. DMUS_PMSGT_WAVE = 12, /* Carries control information for playing a wave. */
  245. DMUS_PMSGT_LYRIC = 13, /* Lyric message from lyric track. */
  246. DMUS_PMSGT_SCRIPTLYRIC = 14, /* Lyric message sent by a script with the Trace function. */
  247. DMUS_PMSGT_USER = 255 /* User message */
  248. } DMUS_PMSGT_TYPES;
  249. /* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API */
  250. typedef enum enumDMUS_SEGF_FLAGS
  251. {
  252. DMUS_SEGF_REFTIME = 1<<6, /* 0x40 Time parameter is in reference time */
  253. DMUS_SEGF_SECONDARY = 1<<7, /* 0x80 Secondary segment */
  254. DMUS_SEGF_QUEUE = 1<<8, /* 0x100 Queue at the end of the primary segment queue (primary only) */
  255. DMUS_SEGF_CONTROL = 1<<9, /* 0x200 Play as a control track (secondary segments only) */
  256. DMUS_SEGF_AFTERPREPARETIME = 1<<10, /* 0x400 Play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) */
  257. DMUS_SEGF_GRID = 1<<11, /* 0x800 Play on grid boundary */
  258. DMUS_SEGF_BEAT = 1<<12, /* 0x1000 Play on beat boundary */
  259. DMUS_SEGF_MEASURE = 1<<13, /* 0x2000 Play on measure boundary */
  260. DMUS_SEGF_DEFAULT = 1<<14, /* 0x4000 Use segment's default boundary */
  261. DMUS_SEGF_NOINVALIDATE = 1<<15, /* 0x8000 Play without invalidating the currently playing segment(s) */
  262. DMUS_SEGF_ALIGN = 1<<16, /* 0x10000 Align segment with requested boundary, but switch at first valid point */
  263. DMUS_SEGF_VALID_START_BEAT = 1<<17, /* 0x20000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any beat. */
  264. DMUS_SEGF_VALID_START_GRID = 1<<18, /* 0x40000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any grid. */
  265. DMUS_SEGF_VALID_START_TICK = 1<<19, /* 0x80000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur any time. */
  266. DMUS_SEGF_AUTOTRANSITION = 1<<20, /* 0x100000 Compose and play a transition segment, using either the transition template or transition embedded in song. */
  267. DMUS_SEGF_AFTERQUEUETIME = 1<<21, /* 0x200000 Make sure to play after the queue time. This is default for primary segments */
  268. DMUS_SEGF_AFTERLATENCYTIME = 1<<22, /* 0x400000 Make sure to play after the latency time. This is true for all segments, so this is a nop */
  269. DMUS_SEGF_SEGMENTEND = 1<<23, /* 0x800000 Play at the next end of segment. */
  270. DMUS_SEGF_MARKER = 1<<24, /* 0x1000000 Play at next marker in the primary segment. If there are no markers, default to any other resolution requests. */
  271. DMUS_SEGF_TIMESIG_ALWAYS = 1<<25, /* 0x2000000 Even if there is no primary segment, align start time with current time signature. */
  272. DMUS_SEGF_USE_AUDIOPATH = 1<<26, /* 0x4000000 Uses the audio path that is embedded in the segment or song. */
  273. DMUS_SEGF_VALID_START_MEASURE = 1<<27, /* 0x8000000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any bar. */
  274. DMUS_SEGF_INVALIDATE_PRI = 1<<28 /* 0x10000000 invalidate only the current primary seg state */
  275. } DMUS_SEGF_FLAGS;
  276. #define DMUS_SEG_REPEAT_INFINITE 0xFFFFFFFF /* For IDirectMusicSegment::SetRepeat*/
  277. #define DMUS_SEG_ALLTRACKS 0x80000000 /* For IDirectMusicSegment::SetParam() and SetTrackConfig() - selects all tracks instead on nth index. */
  278. #define DMUS_SEG_ANYTRACK 0x80000000 /* For IDirectMusicSegment::GetParam() - checks each track until it finds one that returns data (not DMUS_E_NOT_FOUND.) */
  279. /* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can */
  280. /* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values */
  281. /* are intentionally the same */
  282. typedef enum enumDMUS_TIME_RESOLVE_FLAGS
  283. {
  284. DMUS_TIME_RESOLVE_AFTERPREPARETIME = DMUS_SEGF_AFTERPREPARETIME,
  285. DMUS_TIME_RESOLVE_AFTERQUEUETIME = DMUS_SEGF_AFTERQUEUETIME,
  286. DMUS_TIME_RESOLVE_AFTERLATENCYTIME = DMUS_SEGF_AFTERLATENCYTIME,
  287. DMUS_TIME_RESOLVE_GRID = DMUS_SEGF_GRID,
  288. DMUS_TIME_RESOLVE_BEAT = DMUS_SEGF_BEAT,
  289. DMUS_TIME_RESOLVE_MEASURE = DMUS_SEGF_MEASURE,
  290. DMUS_TIME_RESOLVE_MARKER = DMUS_SEGF_MARKER,
  291. DMUS_TIME_RESOLVE_SEGMENTEND = DMUS_SEGF_SEGMENTEND,
  292. } DMUS_TIME_RESOLVE_FLAGS;
  293. /* The following flags are sent inside the DMUS_CHORD_KEY.dwFlags parameter */
  294. typedef enum enumDMUS_CHORDKEYF_FLAGS
  295. {
  296. DMUS_CHORDKEYF_SILENT = 1, /* is the chord silent? */
  297. } DMUS_CHORDKEYF_FLAGS;
  298. #define DMUS_MAXSUBCHORD 8
  299. typedef struct _DMUS_SUBCHORD
  300. {
  301. DWORD dwChordPattern; /* Notes in the subchord */
  302. DWORD dwScalePattern; /* Notes in the scale */
  303. DWORD dwInversionPoints; /* Where inversions can occur */
  304. DWORD dwLevels; /* Which levels are supported by this subchord */
  305. BYTE bChordRoot; /* Root of the subchord */
  306. BYTE bScaleRoot; /* Root of the scale */
  307. } DMUS_SUBCHORD;
  308. typedef struct _DMUS_CHORD_KEY
  309. {
  310. WCHAR wszName[16]; /* Name of the chord */
  311. WORD wMeasure; /* Measure this falls on */
  312. BYTE bBeat; /* Beat this falls on */
  313. BYTE bSubChordCount; /* Number of chords in the list of subchords */
  314. DMUS_SUBCHORD SubChordList[DMUS_MAXSUBCHORD]; /* List of sub chords */
  315. DWORD dwScale; /* Scale underlying the entire chord */
  316. BYTE bKey; /* Key underlying the entire chord */
  317. BYTE bFlags; /* Miscelaneous flags */
  318. } DMUS_CHORD_KEY;
  319. /* DMUS_NOTE_PMSG */
  320. typedef struct _DMUS_NOTE_PMSG
  321. {
  322. /* begin DMUS_PMSG_PART */
  323. DMUS_PMSG_PART
  324. /* end DMUS_PMSG_PART */
  325. MUSIC_TIME mtDuration; /* duration */
  326. WORD wMusicValue; /* Description of note in chord and key. */
  327. WORD wMeasure; /* Measure in which this note occurs */
  328. short nOffset; /* Offset from grid at which this note occurs */
  329. BYTE bBeat; /* Beat (in measure) at which this note occurs */
  330. BYTE bGrid; /* Grid offset from beat at which this note occurs */
  331. BYTE bVelocity; /* Note velocity */
  332. BYTE bFlags; /* see DMUS_NOTEF_FLAGS */
  333. BYTE bTimeRange; /* Range to randomize time. */
  334. BYTE bDurRange; /* Range to randomize duration. */
  335. BYTE bVelRange; /* Range to randomize velocity. */
  336. BYTE bPlayModeFlags; /* Play mode */
  337. BYTE bSubChordLevel; /* Which subchord level this note uses. */
  338. BYTE bMidiValue; /* The MIDI note value, converted from wMusicValue */
  339. char cTranspose; /* Transposition to add to midi note value after converted from wMusicValue. */
  340. } DMUS_NOTE_PMSG;
  341. typedef enum enumDMUS_NOTEF_FLAGS
  342. {
  343. DMUS_NOTEF_NOTEON = 1, /* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off */
  344. /* DX8 flags: */
  345. DMUS_NOTEF_NOINVALIDATE = 2, /* Don't invalidate this note off. */
  346. DMUS_NOTEF_NOINVALIDATE_INSCALE = 4,/* Don't invalidate if still within the scale. */
  347. DMUS_NOTEF_NOINVALIDATE_INCHORD = 8,/* Don't invalidate if still within the chord. */
  348. DMUS_NOTEF_REGENERATE = 0x10, /* Regenerate the note on an invalidate. */
  349. } DMUS_NOTEF_FLAGS;
  350. /* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
  351. into the appropriate bMidiValue.
  352. */
  353. typedef enum enumDMUS_PLAYMODE_FLAGS
  354. {
  355. DMUS_PLAYMODE_KEY_ROOT = 1, /* Transpose on top of the key root. */
  356. DMUS_PLAYMODE_CHORD_ROOT = 2, /* Transpose on top of the chord root. */
  357. DMUS_PLAYMODE_SCALE_INTERVALS = 4, /* Use scale intervals from scale pattern. */
  358. DMUS_PLAYMODE_CHORD_INTERVALS = 8, /* Use chord intervals from chord pattern. */
  359. DMUS_PLAYMODE_NONE = 16, /* No mode. Indicates the parent part's mode should be used. */
  360. } DMUS_PLAYMODE_FLAGS;
  361. /* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
  362. in various ways:
  363. */
  364. /* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
  365. notes that should not be transposed by the chord or scale.
  366. */
  367. #define DMUS_PLAYMODE_FIXED 0
  368. /* In fixed to key, the musicvalue is again a fixed MIDI value, but it
  369. is transposed on top of the key root.
  370. */
  371. #define DMUS_PLAYMODE_FIXEDTOKEY DMUS_PLAYMODE_KEY_ROOT
  372. /* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
  373. is transposed on top of the chord root.
  374. */
  375. #define DMUS_PLAYMODE_FIXEDTOCHORD DMUS_PLAYMODE_CHORD_ROOT
  376. /* In Pedalpoint, the key root is used and the notes only track the intervals in
  377. the scale. The chord root and intervals are completely ignored. This is useful
  378. for melodic lines that play relative to the key root.
  379. */
  380. #define DMUS_PLAYMODE_PEDALPOINT (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  381. /* In the Melodic mode, the chord root is used but the notes only track the intervals in
  382. the scale. The key root and chord intervals are completely ignored. This is useful
  383. for melodic lines that play relative to the chord root.
  384. */
  385. #define DMUS_PLAYMODE_MELODIC (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  386. /* Normal chord mode is the prevalent playback mode.
  387. The notes track the intervals in the chord, which is based on the chord root.
  388. If there is a scale component to the MusicValue, the additional intervals
  389. are pulled from the scale and added.
  390. If the chord does not have an interval to match the chord component of
  391. the MusicValue, the note is silent.
  392. */
  393. #define DMUS_PLAYMODE_NORMALCHORD (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
  394. /* If it is desirable to play a note that is above the top of the chord, the
  395. always play mode (known as "purpleized" in a former life) finds a position
  396. for the note by using intervals from the scale. Essentially, this mode is
  397. a combination of the Normal and Melodic playback modes, where a failure
  398. in Normal causes a second try in Melodic mode.
  399. */
  400. #define DMUS_PLAYMODE_ALWAYSPLAY (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD)
  401. /* These playmodes are new for dx8. */
  402. /* In PedalpointChord, the key root is used and the notes only track the intervals in
  403. the chord. The chord root and scale intervals are completely ignored. This is useful
  404. for chordal lines that play relative to the key root.
  405. */
  406. #define DMUS_PLAYMODE_PEDALPOINTCHORD (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
  407. /* For completeness, here's a mode that tries for pedalpointchord, but if it fails
  408. uses scale intervals
  409. */
  410. #define DMUS_PLAYMODE_PEDALPOINTALWAYS (DMUS_PLAYMODE_PEDALPOINT | DMUS_PLAYMODE_PEDALPOINTCHORD)
  411. /* Legacy names for modes... */
  412. #define DMUS_PLAYMODE_PURPLEIZED DMUS_PLAYMODE_ALWAYSPLAY
  413. #define DMUS_PLAYMODE_SCALE_ROOT DMUS_PLAYMODE_KEY_ROOT
  414. #define DMUS_PLAYMODE_FIXEDTOSCALE DMUS_PLAYMODE_FIXEDTOKEY
  415. /* DMUS_MIDI_PMSG */
  416. typedef struct _DMUS_MIDI_PMSG
  417. {
  418. /* begin DMUS_PMSG_PART */
  419. DMUS_PMSG_PART
  420. /* end DMUS_PMSG_PART */
  421. BYTE bStatus;
  422. BYTE bByte1;
  423. BYTE bByte2;
  424. BYTE bPad[1];
  425. } DMUS_MIDI_PMSG;
  426. /* DMUS_PATCH_PMSG */
  427. typedef struct _DMUS_PATCH_PMSG
  428. {
  429. /* begin DMUS_PMSG_PART */
  430. DMUS_PMSG_PART
  431. /* end DMUS_PMSG_PART */
  432. BYTE byInstrument;
  433. BYTE byMSB;
  434. BYTE byLSB;
  435. BYTE byPad[1];
  436. } DMUS_PATCH_PMSG;
  437. /* DMUS_TRANSPOSE_PMSG */
  438. typedef struct _DMUS_TRANSPOSE_PMSG
  439. {
  440. /* begin DMUS_PMSG_PART */
  441. DMUS_PMSG_PART
  442. /* end DMUS_PMSG_PART */
  443. short nTranspose;
  444. /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */
  445. WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
  446. } DMUS_TRANSPOSE_PMSG;
  447. /* DMUS_CHANNEL_PRIORITY_PMSG */
  448. typedef struct _DMUS_CHANNEL_PRIORITY_PMSG
  449. {
  450. /* begin DMUS_PMSG_PART */
  451. DMUS_PMSG_PART
  452. /* end DMUS_PMSG_PART */
  453. DWORD dwChannelPriority;
  454. } DMUS_CHANNEL_PRIORITY_PMSG;
  455. /* DMUS_TEMPO_PMSG */
  456. typedef struct _DMUS_TEMPO_PMSG
  457. {
  458. /* begin DMUS_PMSG_PART */
  459. DMUS_PMSG_PART
  460. /* end DMUS_PMSG_PART */
  461. double dblTempo; /* the tempo */
  462. } DMUS_TEMPO_PMSG;
  463. #define DMUS_TEMPO_MAX 1000
  464. #define DMUS_TEMPO_MIN 1
  465. #define DMUS_MASTERTEMPO_MAX 100.0f
  466. #define DMUS_MASTERTEMPO_MIN 0.01f
  467. /* DMUS_SYSEX_PMSG */
  468. typedef struct _DMUS_SYSEX_PMSG
  469. {
  470. /* begin DMUS_PMSG_PART */
  471. DMUS_PMSG_PART
  472. /* end DMUS_PMSG_PART */
  473. DWORD dwLen; /* length of the data */
  474. BYTE abData[1]; /* array of data, length equal to dwLen */
  475. } DMUS_SYSEX_PMSG;
  476. /* DMUS_CURVE_PMSG */
  477. typedef struct _DMUS_CURVE_PMSG
  478. {
  479. /* begin DMUS_PMSG_PART */
  480. DMUS_PMSG_PART
  481. /* end DMUS_PMSG_PART */
  482. MUSIC_TIME mtDuration; /* how long this curve lasts */
  483. MUSIC_TIME mtOriginalStart; /* must be set to either zero when this PMSG is created or to the original mtTime of the curve */
  484. MUSIC_TIME mtResetDuration; /* how long after the curve is finished to allow a flush or
  485. invalidation to reset to the reset value, nResetValue */
  486. short nStartValue; /* curve's start value */
  487. short nEndValue; /* curve's end value */
  488. short nResetValue; /* curve's reset value, set when a flush or invalidation
  489. occurs within mtDuration + mtResetDuration */
  490. WORD wMeasure; /* Measure in which this curve occurs */
  491. short nOffset; /* Offset from grid at which this curve occurs */
  492. BYTE bBeat; /* Beat (in measure) at which this curve occurs */
  493. BYTE bGrid; /* Grid offset from beat at which this curve occurs */
  494. BYTE bType; /* type of curve */
  495. BYTE bCurveShape; /* shape of curve */
  496. BYTE bCCData; /* CC# if this is a control change type */
  497. BYTE bFlags; /* Curve reset and start from current value flags. */
  498. /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */
  499. WORD wParamType; /* RPN or NRPN parameter number. */
  500. WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
  501. } DMUS_CURVE_PMSG;
  502. typedef enum enumDMUS_CURVE_FLAGS
  503. {
  504. DMUS_CURVE_RESET = 1, /* When set, the nResetValue must be sent when the
  505. time is reached or an invalidate occurs because
  506. of a transition. If not set, the curve stays
  507. permanently stuck at the new value. */
  508. DMUS_CURVE_START_FROM_CURRENT = 2/* Ignore Start, start the curve at the current value.
  509. This only works for volume, expression, and pitchbend. */
  510. } DMUS_CURVE_FLAGS;
  511. #define DMUS_CURVE_RESET 1
  512. /* Curve shapes */
  513. enum
  514. {
  515. DMUS_CURVES_LINEAR = 0,
  516. DMUS_CURVES_INSTANT = 1,
  517. DMUS_CURVES_EXP = 2,
  518. DMUS_CURVES_LOG = 3,
  519. DMUS_CURVES_SINE = 4
  520. };
  521. /* curve types */
  522. #define DMUS_CURVET_PBCURVE 0x03 /* Pitch bend curve. */
  523. #define DMUS_CURVET_CCCURVE 0x04 /* Control change curve. */
  524. #define DMUS_CURVET_MATCURVE 0x05 /* Mono aftertouch curve. */
  525. #define DMUS_CURVET_PATCURVE 0x06 /* Poly aftertouch curve. */
  526. #define DMUS_CURVET_RPNCURVE 0x07 /* RPN curve with curve type in wParamType. */
  527. #define DMUS_CURVET_NRPNCURVE 0x08 /* NRPN curve with curve type in wParamType. */
  528. /* DMUS_TIMESIG_PMSG */
  529. typedef struct _DMUS_TIMESIG_PMSG
  530. {
  531. /* begin DMUS_PMSG_PART */
  532. DMUS_PMSG_PART
  533. /* end DMUS_PMSG_PART */
  534. /* Time signatures define how many beats per measure, which note receives */
  535. /* the beat, and the grid resolution. */
  536. BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
  537. BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
  538. /* we can assume that 0 means 256th note */
  539. WORD wGridsPerBeat; /* grids per beat */
  540. } DMUS_TIMESIG_PMSG;
  541. /* notification type values */
  542. /* The following correspond to GUID_NOTIFICATION_SEGMENT */
  543. #define DMUS_NOTIFICATION_SEGSTART 0
  544. #define DMUS_NOTIFICATION_SEGEND 1
  545. #define DMUS_NOTIFICATION_SEGALMOSTEND 2
  546. #define DMUS_NOTIFICATION_SEGLOOP 3
  547. #define DMUS_NOTIFICATION_SEGABORT 4
  548. /* The following correspond to GUID_NOTIFICATION_PERFORMANCE */
  549. #define DMUS_NOTIFICATION_MUSICSTARTED 0
  550. #define DMUS_NOTIFICATION_MUSICSTOPPED 1
  551. #define DMUS_NOTIFICATION_MUSICALMOSTEND 2
  552. /* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT */
  553. #define DMUS_NOTIFICATION_MEASUREBEAT 0
  554. /* The following corresponds to GUID_NOTIFICATION_CHORD */
  555. #define DMUS_NOTIFICATION_CHORD 0
  556. /* The following correspond to GUID_NOTIFICATION_COMMAND */
  557. #define DMUS_NOTIFICATION_GROOVE 0
  558. #define DMUS_NOTIFICATION_EMBELLISHMENT 1
  559. /* The following corresponds to GUID_NOTIFICATION_RECOMPOSE */
  560. #define DMUS_NOTIFICATION_RECOMPOSE 0
  561. /* DMUS_NOTIFICATION_PMSG */
  562. typedef struct _DMUS_NOTIFICATION_PMSG
  563. {
  564. /* begin DMUS_PMSG_PART */
  565. DMUS_PMSG_PART
  566. /* end DMUS_PMSG_PART */
  567. GUID guidNotificationType;
  568. DWORD dwNotificationOption;
  569. DWORD dwField1;
  570. DWORD dwField2;
  571. } DMUS_NOTIFICATION_PMSG;
  572. /* DMUS_WAVE_PMSG */
  573. typedef struct _DMUS_WAVE_PMSG
  574. {
  575. /* begin DMUS_PMSG_PART */
  576. DMUS_PMSG_PART
  577. /* end DMUS_PMSG_PART */
  578. REFERENCE_TIME rtStartOffset; /* How far into the wave to start, in reference time units only. */
  579. REFERENCE_TIME rtDuration; /* Duration of the wave, in either reference time or music time. */
  580. long lOffset; /* Offset from actual time to logical time, in music or ref time. */
  581. long lVolume; /* Initial volume, in 100ths of a dB. */
  582. long lPitch; /* Initial pitch, in 100ths of a semitone. */
  583. BYTE bFlags; /* Flags, including DMUS_WAVEF_OFF... */
  584. } DMUS_WAVE_PMSG;
  585. #define DMUS_WAVEF_OFF 1 /* If wave is playing and this is the off message. */
  586. #define DMUS_WAVEF_STREAMING 2 /* If wave is streaming. */
  587. #define DMUS_WAVEF_NOINVALIDATE 4 /* Don't invalidate this wave. */
  588. #define DMUS_WAVEF_NOPREROLL 8 /* Don't preroll any wave data. */
  589. /* DMUS_LYRIC_PMSG */
  590. typedef struct _DMUS_LYRIC_PMSG
  591. {
  592. /* begin DMUS_PMSG_PART */
  593. DMUS_PMSG_PART
  594. /* end DMUS_PMSG_PART */
  595. WCHAR wszString[1]; /* null-terminated Unicode lyric string (structure is actually larger than size 1) */
  596. } DMUS_LYRIC_PMSG;
  597. #define DMUS_MAX_NAME 64 /* Maximum object name length. */
  598. #define DMUS_MAX_CATEGORY 64 /* Maximum object category name length. */
  599. #define DMUS_MAX_FILENAME MAX_PATH
  600. typedef struct _DMUS_VERSION {
  601. DWORD dwVersionMS;
  602. DWORD dwVersionLS;
  603. }DMUS_VERSION, FAR *LPDMUS_VERSION;
  604. /* Time Signature structure, used by IDirectMusicStyle */
  605. /* Also used as a parameter for GetParam() and SetParam */
  606. typedef struct _DMUS_TIMESIGNATURE
  607. {
  608. MUSIC_TIME mtTime;
  609. BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
  610. BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
  611. /* we can assume that 0 means 256th note */
  612. WORD wGridsPerBeat; /* grids per beat */
  613. } DMUS_TIMESIGNATURE;
  614. typedef struct _DMUS_VALID_START_PARAM
  615. {
  616. MUSIC_TIME mtTime; /* Time of the first legal start
  617. point after (or including) the requested time.
  618. This is a returned value.
  619. Time format is the relative offset from requested time. */
  620. } DMUS_VALID_START_PARAM;
  621. typedef struct _DMUS_PLAY_MARKER_PARAM
  622. {
  623. MUSIC_TIME mtTime; /* Time of the first legal segment play
  624. marker before (or including) the requested time.
  625. This is a returned value.
  626. Time format is the relative offset from requested time. */
  627. } DMUS_PLAY_MARKER_PARAM;
  628. /* The DMUSOBJECTDESC structure is used to communicate everything you could */
  629. /* possibly use to describe a DirectMusic object. */
  630. typedef struct _DMUS_OBJECTDESC
  631. {
  632. DWORD dwSize; /* Size of this structure. */
  633. DWORD dwValidData; /* Flags indicating which fields below are valid. */
  634. GUID guidObject; /* Unique ID for this object. */
  635. GUID guidClass; /* GUID for the class of object. */
  636. FILETIME ftDate; /* Last edited date of object. */
  637. DMUS_VERSION vVersion; /* Version. */
  638. WCHAR wszName[DMUS_MAX_NAME]; /* Name of object. */
  639. WCHAR wszCategory[DMUS_MAX_CATEGORY]; /* Category for object (optional). */
  640. WCHAR wszFileName[DMUS_MAX_FILENAME]; /* File path. */
  641. LONGLONG llMemLength; /* Size of Memory data. */
  642. LPBYTE pbMemData; /* Memory pointer for data. */
  643. IStream * pStream; /* Stream with data. */
  644. } DMUS_OBJECTDESC;
  645. typedef DMUS_OBJECTDESC *LPDMUS_OBJECTDESC;
  646. /* Flags for dwValidData. When set, a flag indicates that the */
  647. /* corresponding field in DMUSOBJECTDESC holds valid data. */
  648. #define DMUS_OBJ_OBJECT (1 << 0) /* Object GUID is valid. */
  649. #define DMUS_OBJ_CLASS (1 << 1) /* Class GUID is valid. */
  650. #define DMUS_OBJ_NAME (1 << 2) /* Name is valid. */
  651. #define DMUS_OBJ_CATEGORY (1 << 3) /* Category is valid. */
  652. #define DMUS_OBJ_FILENAME (1 << 4) /* File path is valid. */
  653. #define DMUS_OBJ_FULLPATH (1 << 5) /* Path is full path. */
  654. #define DMUS_OBJ_URL (1 << 6) /* Path is URL. */
  655. #define DMUS_OBJ_VERSION (1 << 7) /* Version is valid. */
  656. #define DMUS_OBJ_DATE (1 << 8) /* Date is valid. */
  657. #define DMUS_OBJ_LOADED (1 << 9) /* Object is currently loaded in memory. */
  658. #define DMUS_OBJ_MEMORY (1 << 10) /* Object is pointed to by pbMemData. */
  659. #define DMUS_OBJ_STREAM (1 << 11) /* Object is stored in pStream. */
  660. /* The DMUS_SCRIPT_ERRORINFO structure describes an error that occurred in a script.
  661. It is returned by methods in IDirectMusicScript. */
  662. typedef struct _DMUS_SCRIPT_ERRORINFO
  663. {
  664. DWORD dwSize; /* Size of this structure. */
  665. HRESULT hr;
  666. ULONG ulLineNumber;
  667. LONG ichCharPosition;
  668. WCHAR wszSourceFile[DMUS_MAX_FILENAME];
  669. WCHAR wszSourceComponent[DMUS_MAX_FILENAME];
  670. WCHAR wszDescription[DMUS_MAX_FILENAME];
  671. WCHAR wszSourceLineText[DMUS_MAX_FILENAME];
  672. } DMUS_SCRIPT_ERRORINFO;
  673. /* Track configuration flags, used with IDirectMusicSegment8::SetTrackConfig() */
  674. #define DMUS_TRACKCONFIG_OVERRIDE_ALL 1 /* This track should get parameters from this segment before controlling and primary tracks. */
  675. #define DMUS_TRACKCONFIG_OVERRIDE_PRIMARY 2 /* This track should get parameters from this segment before the primary segment tracks. */
  676. #define DMUS_TRACKCONFIG_FALLBACK 4 /* This track should get parameters from this segment if the primary and controlling segments don't succeed. */
  677. #define DMUS_TRACKCONFIG_CONTROL_ENABLED 8 /* GetParam() enabled for this track. */
  678. #define DMUS_TRACKCONFIG_PLAY_ENABLED 0x10 /* Play() enabled for this track. */
  679. #define DMUS_TRACKCONFIG_NOTIFICATION_ENABLED 0x20 /* Notifications enabled for this track. */
  680. #define DMUS_TRACKCONFIG_PLAY_CLOCKTIME 0x40 /* This track plays in clock time, not music time. */
  681. #define DMUS_TRACKCONFIG_PLAY_COMPOSE 0x80 /* This track should regenerate data each time it starts playing. */
  682. #define DMUS_TRACKCONFIG_LOOP_COMPOSE 0x100 /* This track should regenerate data each time it repeats. */
  683. #define DMUS_TRACKCONFIG_COMPOSING 0x200 /* This track is used to compose other tracks. */
  684. #define DMUS_TRACKCONFIG_CONTROL_PLAY 0x10000 /* This track, when played in a controlling segment, overrides playback of primary segment tracks. */
  685. #define DMUS_TRACKCONFIG_CONTROL_NOTIFICATION 0x20000 /* This track, when played in a controlling segment, overrides notification of primary segment tracks. */
  686. /* Additional track config flags for composing transitions */
  687. #define DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART 0x400 /* Get track info from start of From segment */
  688. #define DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT 0x800 /* Get track info from current place in From segment */
  689. #define DMUS_TRACKCONFIG_TRANS1_TOSEGSTART 0x1000 /* Get track info from start of To segment */
  690. #define DMUS_TRACKCONFIG_DEFAULT (DMUS_TRACKCONFIG_CONTROL_ENABLED | DMUS_TRACKCONFIG_PLAY_ENABLED | DMUS_TRACKCONFIG_NOTIFICATION_ENABLED)
  691. /* #defines for melody fragments */
  692. /* Note: Melody formulation is not supported in DX8. */
  693. #define DMUS_MAX_FRAGMENTLABEL 20
  694. #define DMUS_FRAGMENTF_USE_REPEAT 0x1
  695. #define DMUS_FRAGMENTF_REJECT_REPEAT (0x1 << 1)
  696. #define DMUS_FRAGMENTF_USE_LABEL (0x1 << 2)
  697. #define DMUS_CONNECTIONF_INTERVALS (0x1 << 1) /* Use transition intervals */
  698. #define DMUS_CONNECTIONF_OVERLAP (0x1 << 2) /* Use overlapping notes for transitions */
  699. /* Get/SetParam structs for commands */
  700. /* PARAM structures, used by GetParam() and SetParam() */
  701. typedef struct _DMUS_COMMAND_PARAM
  702. {
  703. BYTE bCommand;
  704. BYTE bGrooveLevel;
  705. BYTE bGrooveRange;
  706. BYTE bRepeatMode;
  707. } DMUS_COMMAND_PARAM;
  708. typedef struct _DMUS_COMMAND_PARAM_2
  709. {
  710. MUSIC_TIME mtTime;
  711. BYTE bCommand;
  712. BYTE bGrooveLevel;
  713. BYTE bGrooveRange;
  714. BYTE bRepeatMode;
  715. } DMUS_COMMAND_PARAM_2;
  716. /* Get/SetParam structs for melody fragments */
  717. /* Note: Melody formulation is not supported in DX8. */
  718. typedef struct _DMUS_CONNECTION_RULE
  719. {
  720. DWORD dwFlags; /* DMUS_CONNECTIONF_ flags */
  721. DWORD dwIntervals; /* Legal transition intervals (first 24 bits; two-octave range) */
  722. } DMUS_CONNECTION_RULE;
  723. typedef struct _DMUS_MELODY_FRAGMENT
  724. {
  725. MUSIC_TIME mtTime;
  726. DWORD dwID; /* This fragment's ID */
  727. WCHAR wszVariationLabel[DMUS_MAX_FRAGMENTLABEL]; /* Each style translates this into a set of variations (held in part ref) */
  728. DWORD dwVariationFlags; /* A set of variations */
  729. DWORD dwRepeatFragmentID; /* ID of a fragment to repeat */
  730. DWORD dwFragmentFlags; /* DMUS_FRAGMENTF_ flags */
  731. DWORD dwPlayModeFlags; /* NOT CURRENTLY USED - MUST BE 0 */
  732. DWORD dwTransposeIntervals; /* Legal transposition intervals (first 24 bits; two-octave range) */
  733. DMUS_COMMAND_PARAM Command;
  734. DMUS_CONNECTION_RULE ConnectionArc;
  735. } DMUS_MELODY_FRAGMENT;
  736. typedef IDirectMusicObject __RPC_FAR *LPDMUS_OBJECT;
  737. typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER;
  738. typedef IDirectMusicBand __RPC_FAR *LPDMUS_BAND;
  739. #define DMUSB_LOADED (1 << 0) /* Set when band has been loaded */
  740. #define DMUSB_DEFAULT (1 << 1) /* Set when band is default band for a style */
  741. /*////////////////////////////////////////////////////////////////////
  742. // IDirectMusicBand */
  743. #undef INTERFACE
  744. #define INTERFACE IDirectMusicBand
  745. DECLARE_INTERFACE_(IDirectMusicBand, IUnknown)
  746. {
  747. /* IUnknown */
  748. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  749. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  750. STDMETHOD_(ULONG,Release) (THIS) PURE;
  751. /* IDirectMusicBand */
  752. STDMETHOD(CreateSegment) (THIS_ IDirectMusicSegment** ppSegment) PURE;
  753. STDMETHOD(Download) (THIS_ IDirectMusicPerformance* pPerformance) PURE;
  754. STDMETHOD(Unload) (THIS_ IDirectMusicPerformance* pPerformance) PURE;
  755. };
  756. typedef IDirectMusicBand IDirectMusicBand8;
  757. /*////////////////////////////////////////////////////////////////////
  758. // IDirectMusicObject */
  759. #undef INTERFACE
  760. #define INTERFACE IDirectMusicObject
  761. DECLARE_INTERFACE_(IDirectMusicObject, IUnknown)
  762. {
  763. /* IUnknown */
  764. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  765. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  766. STDMETHOD_(ULONG,Release) (THIS) PURE;
  767. /* IDirectMusicObject */
  768. STDMETHOD(GetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  769. STDMETHOD(SetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  770. STDMETHOD(ParseDescriptor) (THIS_ LPSTREAM pStream,
  771. LPDMUS_OBJECTDESC pDesc) PURE;
  772. };
  773. typedef IDirectMusicObject IDirectMusicObject8;
  774. /*////////////////////////////////////////////////////////////////////
  775. // IDirectMusicLoader */
  776. #undef INTERFACE
  777. #define INTERFACE IDirectMusicLoader
  778. DECLARE_INTERFACE_(IDirectMusicLoader, IUnknown)
  779. {
  780. /* IUnknown */
  781. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  782. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  783. STDMETHOD_(ULONG,Release) (THIS) PURE;
  784. /* IDirectMusicLoader */
  785. STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc,
  786. REFIID riid,
  787. LPVOID FAR *ppv) PURE;
  788. STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  789. STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass,
  790. WCHAR *pwzPath,
  791. BOOL fClear) PURE;
  792. STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass,
  793. WCHAR *pwzFileExtension,
  794. WCHAR *pwzScanFileName) PURE;
  795. STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE;
  796. STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE;
  797. STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE;
  798. STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass,
  799. BOOL fEnable) PURE;
  800. STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
  801. DWORD dwIndex,
  802. LPDMUS_OBJECTDESC pDesc) PURE;
  803. };
  804. /*////////////////////////////////////////////////////////////////////
  805. // IDirectMusicLoader8 */
  806. #undef INTERFACE
  807. #define INTERFACE IDirectMusicLoader8
  808. DECLARE_INTERFACE_(IDirectMusicLoader8, IDirectMusicLoader)
  809. {
  810. /* IUnknown */
  811. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  812. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  813. STDMETHOD_(ULONG,Release) (THIS) PURE;
  814. /* IDirectMusicLoader */
  815. STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc,
  816. REFIID riid,
  817. LPVOID FAR *ppv) PURE;
  818. STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  819. STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass,
  820. WCHAR *pwzPath,
  821. BOOL fClear) PURE;
  822. STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass,
  823. WCHAR *pwzFileExtension,
  824. WCHAR *pwzScanFileName) PURE;
  825. STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE;
  826. STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE;
  827. STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE;
  828. STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass,
  829. BOOL fEnable) PURE;
  830. STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
  831. DWORD dwIndex,
  832. LPDMUS_OBJECTDESC pDesc) PURE;
  833. /* IDirectMusicLoader8 */
  834. STDMETHOD_(void, CollectGarbage) (THIS) PURE;
  835. STDMETHOD(ReleaseObjectByUnknown) (THIS_ IUnknown *pObject) PURE;
  836. STDMETHOD(LoadObjectFromFile) (THIS_ REFGUID rguidClassID,
  837. REFIID iidInterfaceID,
  838. WCHAR *pwzFilePath,
  839. void ** ppObject) PURE;
  840. };
  841. /* Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. */
  842. #undef INTERFACE
  843. #define INTERFACE IDirectMusicGetLoader
  844. DECLARE_INTERFACE_(IDirectMusicGetLoader, IUnknown)
  845. {
  846. /* IUnknown */
  847. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  848. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  849. STDMETHOD_(ULONG,Release) (THIS) PURE;
  850. /* IDirectMusicGetLoader */
  851. STDMETHOD(GetLoader) (THIS_ IDirectMusicLoader ** ppLoader) PURE;
  852. };
  853. typedef IDirectMusicGetLoader IDirectMusicGetLoader8;
  854. /*////////////////////////////////////////////////////////////////////
  855. // IDirectMusicSegment */
  856. #undef INTERFACE
  857. #define INTERFACE IDirectMusicSegment
  858. DECLARE_INTERFACE_(IDirectMusicSegment, IUnknown)
  859. {
  860. /* IUnknown */
  861. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  862. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  863. STDMETHOD_(ULONG,Release) (THIS) PURE;
  864. /* IDirectMusicSegment */
  865. STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE;
  866. STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE;
  867. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  868. STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE;
  869. STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE;
  870. STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE;
  871. STDMETHOD(GetTrack) (THIS_ REFGUID rguidType,
  872. DWORD dwGroupBits,
  873. DWORD dwIndex,
  874. IDirectMusicTrack** ppTrack) PURE;
  875. STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack,
  876. DWORD* pdwGroupBits) PURE;
  877. STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack,
  878. DWORD dwGroupBits) PURE;
  879. STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE;
  880. STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState,
  881. IDirectMusicPerformance* pPerformance,
  882. DWORD dwFlags) PURE;
  883. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  884. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  885. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  886. STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  887. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  888. DWORD dwGroupBits,
  889. DWORD dwIndex,
  890. MUSIC_TIME mtTime,
  891. MUSIC_TIME* pmtNext,
  892. void* pParam) PURE;
  893. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  894. DWORD dwGroupBits,
  895. DWORD dwIndex,
  896. MUSIC_TIME mtTime,
  897. void* pParam) PURE;
  898. STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
  899. MUSIC_TIME mtEnd,
  900. IDirectMusicSegment** ppSegment) PURE;
  901. STDMETHOD(SetStartPoint) (THIS_ MUSIC_TIME mtStart) PURE;
  902. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  903. STDMETHOD(SetLoopPoints) (THIS_ MUSIC_TIME mtStart,
  904. MUSIC_TIME mtEnd) PURE;
  905. STDMETHOD(GetLoopPoints) (THIS_ MUSIC_TIME* pmtStart,
  906. MUSIC_TIME* pmtEnd) PURE;
  907. STDMETHOD(SetPChannelsUsed) (THIS_ DWORD dwNumPChannels,
  908. DWORD* paPChannels) PURE;
  909. };
  910. /*////////////////////////////////////////////////////////////////////
  911. // IDirectMusicSegment8 */
  912. #undef INTERFACE
  913. #define INTERFACE IDirectMusicSegment8
  914. DECLARE_INTERFACE_(IDirectMusicSegment8, IDirectMusicSegment)
  915. {
  916. /* IUnknown */
  917. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  918. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  919. STDMETHOD_(ULONG,Release) (THIS) PURE;
  920. /* IDirectMusicSegment */
  921. STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE;
  922. STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE;
  923. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  924. STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE;
  925. STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE;
  926. STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE;
  927. STDMETHOD(GetTrack) (THIS_ REFGUID rguidType,
  928. DWORD dwGroupBits,
  929. DWORD dwIndex,
  930. IDirectMusicTrack** ppTrack) PURE;
  931. STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack,
  932. DWORD* pdwGroupBits) PURE;
  933. STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack,
  934. DWORD dwGroupBits) PURE;
  935. STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE;
  936. STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState,
  937. IDirectMusicPerformance* pPerformance,
  938. DWORD dwFlags) PURE;
  939. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  940. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  941. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  942. STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  943. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  944. DWORD dwGroupBits,
  945. DWORD dwIndex,
  946. MUSIC_TIME mtTime,
  947. MUSIC_TIME* pmtNext,
  948. void* pParam) PURE;
  949. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  950. DWORD dwGroupBits,
  951. DWORD dwIndex,
  952. MUSIC_TIME mtTime,
  953. void* pParam) PURE;
  954. STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart,
  955. MUSIC_TIME mtEnd,
  956. IDirectMusicSegment** ppSegment) PURE;
  957. STDMETHOD(SetStartPoint) (THIS_ MUSIC_TIME mtStart) PURE;
  958. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  959. STDMETHOD(SetLoopPoints) (THIS_ MUSIC_TIME mtStart,
  960. MUSIC_TIME mtEnd) PURE;
  961. STDMETHOD(GetLoopPoints) (THIS_ MUSIC_TIME* pmtStart,
  962. MUSIC_TIME* pmtEnd) PURE;
  963. STDMETHOD(SetPChannelsUsed) (THIS_ DWORD dwNumPChannels,
  964. DWORD* paPChannels) PURE;
  965. /* IDirectMusicSegment8 */
  966. STDMETHOD(SetTrackConfig) (THIS_ REFGUID rguidTrackClassID, /* Class ID of the type of track on which to set the configuration flags. */
  967. DWORD dwGroupBits, /* Group bits. */
  968. DWORD dwIndex, /* Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id. */
  969. DWORD dwFlagsOn, /* DMUS_TRACKCONFIG_ flags to enable. */
  970. DWORD dwFlagsOff) PURE; /* DMUS_TRACKCONFIG_ flags to disable. */
  971. STDMETHOD(GetAudioPathConfig) (THIS_ IUnknown ** ppAudioPathConfig) PURE;
  972. STDMETHOD(Compose) (THIS_ MUSIC_TIME mtTime,
  973. IDirectMusicSegment* pFromSegment,
  974. IDirectMusicSegment* pToSegment,
  975. IDirectMusicSegment** ppComposedSegment) PURE;
  976. STDMETHOD(Download) (THIS_ IUnknown *pAudioPath) PURE;
  977. STDMETHOD(Unload) (THIS_ IUnknown *pAudioPath) PURE;
  978. };
  979. /*/////////////////////////////////////////////////////////////////////
  980. // IDirectMusicSegmentState */
  981. #undef INTERFACE
  982. #define INTERFACE IDirectMusicSegmentState
  983. DECLARE_INTERFACE_(IDirectMusicSegmentState, IUnknown)
  984. {
  985. /* IUnknown */
  986. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  987. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  988. STDMETHOD_(ULONG,Release) (THIS) PURE;
  989. /* IDirectMusicSegmentState */
  990. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  991. STDMETHOD(GetSegment ) (THIS_ IDirectMusicSegment** ppSegment) PURE;
  992. STDMETHOD(GetStartTime) (THIS_ MUSIC_TIME* pmtStart) PURE;
  993. STDMETHOD(GetSeek) (THIS_ MUSIC_TIME* pmtSeek) PURE;
  994. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  995. };
  996. /*/////////////////////////////////////////////////////////////////////
  997. // IDirectMusicSegmentState8 */
  998. #undef INTERFACE
  999. #define INTERFACE IDirectMusicSegmentState8
  1000. DECLARE_INTERFACE_(IDirectMusicSegmentState8, IDirectMusicSegmentState)
  1001. {
  1002. /* IUnknown */
  1003. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1004. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1005. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1006. /* IDirectMusicSegmentState */
  1007. STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
  1008. STDMETHOD(GetSegment ) (THIS_ IDirectMusicSegment** ppSegment) PURE;
  1009. STDMETHOD(GetStartTime) (THIS_ MUSIC_TIME* pmtStart) PURE;
  1010. STDMETHOD(GetSeek) (THIS_ MUSIC_TIME* pmtSeek) PURE;
  1011. STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE;
  1012. /* IDirectMusicSegmentState8 */
  1013. STDMETHOD(SetTrackConfig) (THIS_ REFGUID rguidTrackClassID, /* Class ID of the type of track on which to set the configuration flags. */
  1014. DWORD dwGroupBits, /* Group bits. */
  1015. DWORD dwIndex, /* Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id. */
  1016. DWORD dwFlagsOn, /* DMUS_TRACKCONFIG_ flags to enable. */
  1017. DWORD dwFlagsOff) PURE; /* DMUS_TRACKCONFIG_ flags to disable. */
  1018. STDMETHOD(GetObjectInPath) (THIS_ DWORD dwPChannel, /* PChannel to search. */
  1019. DWORD dwStage, /* Which stage in the path. */
  1020. DWORD dwBuffer, /* Which buffer to address, if more than one. */
  1021. REFGUID guidObject, /* ClassID of object. */
  1022. DWORD dwIndex, /* Which object of that class. */
  1023. REFGUID iidInterface,/* Requested COM interface. */
  1024. void ** ppObject) PURE; /* Pointer to interface. */
  1025. };
  1026. /*////////////////////////////////////////////////////////////////////
  1027. // IDirectMusicAudioPath */
  1028. #undef INTERFACE
  1029. #define INTERFACE IDirectMusicAudioPath
  1030. DECLARE_INTERFACE_(IDirectMusicAudioPath, IUnknown)
  1031. {
  1032. /* IUnknown */
  1033. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1034. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1035. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1036. /* IDirectMusicAudioPath */
  1037. STDMETHOD(GetObjectInPath) (THIS_ DWORD dwPChannel, /* PChannel to search. */
  1038. DWORD dwStage, /* Which stage in the path. */
  1039. DWORD dwBuffer, /* Which buffer to address, if more than one. */
  1040. REFGUID guidObject, /* ClassID of object. */
  1041. DWORD dwIndex, /* Which object of that class. */
  1042. REFGUID iidInterface,/* Requested COM interface. */
  1043. void ** ppObject) PURE; /* Pointer to interface. */
  1044. STDMETHOD(Activate) (THIS_ BOOL fActivate) PURE;/* True to activate, False to deactivate. */
  1045. STDMETHOD(SetVolume) (THIS_ long lVolume, /* Gain, in 100ths of a dB. This must be negative (0 represents full volume.) */
  1046. DWORD dwDuration) PURE;/* Duration of volume ramp in milliseconds. Note that 0 is more efficient. */
  1047. STDMETHOD(ConvertPChannel) (THIS_ DWORD dwPChannelIn, /* Pchannel of source. */
  1048. DWORD *pdwPChannelOut) PURE; /* Equivalent pchannel on performance. */
  1049. };
  1050. typedef IDirectMusicAudioPath IDirectMusicAudioPath8;
  1051. /*////////////////////////////////////////////////////////////////////
  1052. // IDirectMusicPerformance */
  1053. #undef INTERFACE
  1054. #define INTERFACE IDirectMusicPerformance
  1055. DECLARE_INTERFACE_(IDirectMusicPerformance, IUnknown)
  1056. {
  1057. /* IUnknown */
  1058. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1059. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1060. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1061. /* IDirectMusicPerformance */
  1062. STDMETHOD(Init) (THIS_ IDirectMusic** ppDirectMusic,
  1063. LPDIRECTSOUND pDirectSound,
  1064. HWND hWnd) PURE;
  1065. STDMETHOD(PlaySegment) (THIS_ IDirectMusicSegment* pSegment,
  1066. DWORD dwFlags,
  1067. __int64 i64StartTime,
  1068. IDirectMusicSegmentState** ppSegmentState) PURE;
  1069. STDMETHOD(Stop) (THIS_ IDirectMusicSegment* pSegment,
  1070. IDirectMusicSegmentState* pSegmentState,
  1071. MUSIC_TIME mtTime,
  1072. DWORD dwFlags) PURE;
  1073. STDMETHOD(GetSegmentState) (THIS_ IDirectMusicSegmentState** ppSegmentState,
  1074. MUSIC_TIME mtTime) PURE;
  1075. STDMETHOD(SetPrepareTime) (THIS_ DWORD dwMilliSeconds) PURE;
  1076. STDMETHOD(GetPrepareTime) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1077. STDMETHOD(SetBumperLength) (THIS_ DWORD dwMilliSeconds) PURE;
  1078. STDMETHOD(GetBumperLength) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1079. STDMETHOD(SendPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1080. STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime,
  1081. REFERENCE_TIME* prtTime) PURE;
  1082. STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime,
  1083. MUSIC_TIME* pmtTime) PURE;
  1084. STDMETHOD(IsPlaying) (THIS_ IDirectMusicSegment* pSegment,
  1085. IDirectMusicSegmentState* pSegState) PURE;
  1086. STDMETHOD(GetTime) (THIS_ REFERENCE_TIME* prtNow,
  1087. MUSIC_TIME* pmtNow) PURE;
  1088. STDMETHOD(AllocPMsg) (THIS_ ULONG cb,
  1089. DMUS_PMSG** ppPMSG) PURE;
  1090. STDMETHOD(FreePMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1091. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  1092. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  1093. STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification,
  1094. REFERENCE_TIME rtMinimum) PURE;
  1095. STDMETHOD(GetNotificationPMsg) (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE;
  1096. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  1097. STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE;
  1098. STDMETHOD(AddPort) (THIS_ IDirectMusicPort* pPort) PURE;
  1099. STDMETHOD(RemovePort) (THIS_ IDirectMusicPort* pPort ) PURE;
  1100. STDMETHOD(AssignPChannelBlock) (THIS_ DWORD dwBlockNum,
  1101. IDirectMusicPort* pPort,
  1102. DWORD dwGroup ) PURE;
  1103. STDMETHOD(AssignPChannel) (THIS_ DWORD dwPChannel,
  1104. IDirectMusicPort* pPort,
  1105. DWORD dwGroup,
  1106. DWORD dwMChannel ) PURE;
  1107. STDMETHOD(PChannelInfo) (THIS_ DWORD dwPChannel,
  1108. IDirectMusicPort** ppPort,
  1109. DWORD* pdwGroup,
  1110. DWORD* pdwMChannel ) PURE;
  1111. STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument* pInst,
  1112. DWORD dwPChannel,
  1113. IDirectMusicDownloadedInstrument** ppDownInst,
  1114. DMUS_NOTERANGE* pNoteRanges,
  1115. DWORD dwNumNoteRanges,
  1116. IDirectMusicPort** ppPort,
  1117. DWORD* pdwGroup,
  1118. DWORD* pdwMChannel ) PURE;
  1119. STDMETHOD(Invalidate) (THIS_ MUSIC_TIME mtTime,
  1120. DWORD dwFlags) PURE;
  1121. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  1122. DWORD dwGroupBits,
  1123. DWORD dwIndex,
  1124. MUSIC_TIME mtTime,
  1125. MUSIC_TIME* pmtNext,
  1126. void* pParam) PURE;
  1127. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  1128. DWORD dwGroupBits,
  1129. DWORD dwIndex,
  1130. MUSIC_TIME mtTime,
  1131. void* pParam) PURE;
  1132. STDMETHOD(GetGlobalParam) (THIS_ REFGUID rguidType,
  1133. void* pParam,
  1134. DWORD dwSize) PURE;
  1135. STDMETHOD(SetGlobalParam) (THIS_ REFGUID rguidType,
  1136. void* pParam,
  1137. DWORD dwSize) PURE;
  1138. STDMETHOD(GetLatencyTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1139. STDMETHOD(GetQueueTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1140. STDMETHOD(AdjustTime) (THIS_ REFERENCE_TIME rtAmount) PURE;
  1141. STDMETHOD(CloseDown) (THIS) PURE;
  1142. STDMETHOD(GetResolvedTime) (THIS_ REFERENCE_TIME rtTime,
  1143. REFERENCE_TIME* prtResolved,
  1144. DWORD dwTimeResolveFlags) PURE;
  1145. STDMETHOD(MIDIToMusic) (THIS_ BYTE bMIDIValue,
  1146. DMUS_CHORD_KEY* pChord,
  1147. BYTE bPlayMode,
  1148. BYTE bChordLevel,
  1149. WORD *pwMusicValue) PURE;
  1150. STDMETHOD(MusicToMIDI) (THIS_ WORD wMusicValue,
  1151. DMUS_CHORD_KEY* pChord,
  1152. BYTE bPlayMode,
  1153. BYTE bChordLevel,
  1154. BYTE *pbMIDIValue) PURE;
  1155. STDMETHOD(TimeToRhythm) (THIS_ MUSIC_TIME mtTime,
  1156. DMUS_TIMESIGNATURE *pTimeSig,
  1157. WORD *pwMeasure,
  1158. BYTE *pbBeat,
  1159. BYTE *pbGrid,
  1160. short *pnOffset) PURE;
  1161. STDMETHOD(RhythmToTime) (THIS_ WORD wMeasure,
  1162. BYTE bBeat,
  1163. BYTE bGrid,
  1164. short nOffset,
  1165. DMUS_TIMESIGNATURE *pTimeSig,
  1166. MUSIC_TIME *pmtTime) PURE;
  1167. };
  1168. /*////////////////////////////////////////////////////////////////////
  1169. // IDirectMusicPerformance8 */
  1170. #undef INTERFACE
  1171. #define INTERFACE IDirectMusicPerformance8
  1172. DECLARE_INTERFACE_(IDirectMusicPerformance8, IDirectMusicPerformance)
  1173. {
  1174. /* IUnknown */
  1175. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1176. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1177. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1178. /* IDirectMusicPerformance */
  1179. STDMETHOD(Init) (THIS_ IDirectMusic** ppDirectMusic,
  1180. LPDIRECTSOUND pDirectSound,
  1181. HWND hWnd) PURE;
  1182. STDMETHOD(PlaySegment) (THIS_ IDirectMusicSegment* pSegment,
  1183. DWORD dwFlags,
  1184. __int64 i64StartTime,
  1185. IDirectMusicSegmentState** ppSegmentState) PURE;
  1186. STDMETHOD(Stop) (THIS_ IDirectMusicSegment* pSegment,
  1187. IDirectMusicSegmentState* pSegmentState,
  1188. MUSIC_TIME mtTime,
  1189. DWORD dwFlags) PURE;
  1190. STDMETHOD(GetSegmentState) (THIS_ IDirectMusicSegmentState** ppSegmentState,
  1191. MUSIC_TIME mtTime) PURE;
  1192. STDMETHOD(SetPrepareTime) (THIS_ DWORD dwMilliSeconds) PURE;
  1193. STDMETHOD(GetPrepareTime) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1194. STDMETHOD(SetBumperLength) (THIS_ DWORD dwMilliSeconds) PURE;
  1195. STDMETHOD(GetBumperLength) (THIS_ DWORD* pdwMilliSeconds) PURE;
  1196. STDMETHOD(SendPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1197. STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime,
  1198. REFERENCE_TIME* prtTime) PURE;
  1199. STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime,
  1200. MUSIC_TIME* pmtTime) PURE;
  1201. STDMETHOD(IsPlaying) (THIS_ IDirectMusicSegment* pSegment,
  1202. IDirectMusicSegmentState* pSegState) PURE;
  1203. STDMETHOD(GetTime) (THIS_ REFERENCE_TIME* prtNow,
  1204. MUSIC_TIME* pmtNow) PURE;
  1205. STDMETHOD(AllocPMsg) (THIS_ ULONG cb,
  1206. DMUS_PMSG** ppPMSG) PURE;
  1207. STDMETHOD(FreePMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1208. STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
  1209. STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
  1210. STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification,
  1211. REFERENCE_TIME rtMinimum) PURE;
  1212. STDMETHOD(GetNotificationPMsg) (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE;
  1213. STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  1214. STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE;
  1215. STDMETHOD(AddPort) (THIS_ IDirectMusicPort* pPort) PURE;
  1216. STDMETHOD(RemovePort) (THIS_ IDirectMusicPort* pPort ) PURE;
  1217. STDMETHOD(AssignPChannelBlock) (THIS_ DWORD dwBlockNum,
  1218. IDirectMusicPort* pPort,
  1219. DWORD dwGroup ) PURE;
  1220. STDMETHOD(AssignPChannel) (THIS_ DWORD dwPChannel,
  1221. IDirectMusicPort* pPort,
  1222. DWORD dwGroup,
  1223. DWORD dwMChannel ) PURE;
  1224. STDMETHOD(PChannelInfo) (THIS_ DWORD dwPChannel,
  1225. IDirectMusicPort** ppPort,
  1226. DWORD* pdwGroup,
  1227. DWORD* pdwMChannel ) PURE;
  1228. STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument* pInst,
  1229. DWORD dwPChannel,
  1230. IDirectMusicDownloadedInstrument** ppDownInst,
  1231. DMUS_NOTERANGE* pNoteRanges,
  1232. DWORD dwNumNoteRanges,
  1233. IDirectMusicPort** ppPort,
  1234. DWORD* pdwGroup,
  1235. DWORD* pdwMChannel ) PURE;
  1236. STDMETHOD(Invalidate) (THIS_ MUSIC_TIME mtTime,
  1237. DWORD dwFlags) PURE;
  1238. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  1239. DWORD dwGroupBits,
  1240. DWORD dwIndex,
  1241. MUSIC_TIME mtTime,
  1242. MUSIC_TIME* pmtNext,
  1243. void* pParam) PURE;
  1244. STDMETHOD(SetParam) (THIS_ REFGUID rguidType,
  1245. DWORD dwGroupBits,
  1246. DWORD dwIndex,
  1247. MUSIC_TIME mtTime,
  1248. void* pParam) PURE;
  1249. STDMETHOD(GetGlobalParam) (THIS_ REFGUID rguidType,
  1250. void* pParam,
  1251. DWORD dwSize) PURE;
  1252. STDMETHOD(SetGlobalParam) (THIS_ REFGUID rguidType,
  1253. void* pParam,
  1254. DWORD dwSize) PURE;
  1255. STDMETHOD(GetLatencyTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1256. STDMETHOD(GetQueueTime) (THIS_ REFERENCE_TIME* prtTime) PURE;
  1257. STDMETHOD(AdjustTime) (THIS_ REFERENCE_TIME rtAmount) PURE;
  1258. STDMETHOD(CloseDown) (THIS) PURE;
  1259. STDMETHOD(GetResolvedTime) (THIS_ REFERENCE_TIME rtTime,
  1260. REFERENCE_TIME* prtResolved,
  1261. DWORD dwTimeResolveFlags) PURE;
  1262. STDMETHOD(MIDIToMusic) (THIS_ BYTE bMIDIValue,
  1263. DMUS_CHORD_KEY* pChord,
  1264. BYTE bPlayMode,
  1265. BYTE bChordLevel,
  1266. WORD *pwMusicValue) PURE;
  1267. STDMETHOD(MusicToMIDI) (THIS_ WORD wMusicValue,
  1268. DMUS_CHORD_KEY* pChord,
  1269. BYTE bPlayMode,
  1270. BYTE bChordLevel,
  1271. BYTE *pbMIDIValue) PURE;
  1272. STDMETHOD(TimeToRhythm) (THIS_ MUSIC_TIME mtTime,
  1273. DMUS_TIMESIGNATURE *pTimeSig,
  1274. WORD *pwMeasure,
  1275. BYTE *pbBeat,
  1276. BYTE *pbGrid,
  1277. short *pnOffset) PURE;
  1278. STDMETHOD(RhythmToTime) (THIS_ WORD wMeasure,
  1279. BYTE bBeat,
  1280. BYTE bGrid,
  1281. short nOffset,
  1282. DMUS_TIMESIGNATURE *pTimeSig,
  1283. MUSIC_TIME *pmtTime) PURE;
  1284. /* IDirectMusicPerformance8 */
  1285. STDMETHOD(InitAudio) (THIS_ IDirectMusic** ppDirectMusic, /* Optional DMusic pointer. */
  1286. IDirectSound** ppDirectSound, /* Optional DSound pointer. */
  1287. HWND hWnd, /* HWND for DSound. */
  1288. DWORD dwDefaultPathType, /* Requested default audio path type, also optional. */
  1289. DWORD dwPChannelCount, /* Number of PChannels, if default audio path to be created. */
  1290. DWORD dwFlags, /* DMUS_AUDIOF flags, if no pParams structure. */
  1291. DMUS_AUDIOPARAMS *pParams) PURE; /* Optional initialization structure, defining required voices, buffers, etc. */
  1292. STDMETHOD(PlaySegmentEx) (THIS_ IUnknown* pSource, /* Segment to play. Alternately, could be an IDirectMusicSong (not supported in DX8.) */
  1293. WCHAR *pwzSegmentName, /* If song, which segment in the song (not supported in DX8.) */
  1294. IUnknown* pTransition, /* Optional template segment to compose transition with. */
  1295. DWORD dwFlags, /* DMUS_SEGF_ flags. */
  1296. __int64 i64StartTime, /* Time to start playback. */
  1297. IDirectMusicSegmentState** ppSegmentState, /* Returned Segment State. */
  1298. IUnknown *pFrom, /* Optional segmentstate or audiopath to replace. */
  1299. IUnknown *pAudioPath) PURE; /* Optional audioPath to play on. */
  1300. STDMETHOD(StopEx) (THIS_ IUnknown *pObjectToStop, /* Segstate, AudioPath, Segment, or Song. */
  1301. __int64 i64StopTime,
  1302. DWORD dwFlags) PURE;
  1303. STDMETHOD(ClonePMsg) (THIS_ DMUS_PMSG* pSourcePMSG,
  1304. DMUS_PMSG** ppCopyPMSG) PURE;
  1305. STDMETHOD(CreateAudioPath) (THIS_ IUnknown *pSourceConfig, /* Source configuration, from AudioPathConfig file. */
  1306. BOOL fActivate, /* TRUE to activate on creation. */
  1307. IDirectMusicAudioPath **ppNewPath) PURE; /* Returns created audiopath. */
  1308. STDMETHOD(CreateStandardAudioPath)(THIS_ DWORD dwType, /* Type of path to create. */
  1309. DWORD dwPChannelCount, /* How many PChannels to allocate for it. */
  1310. BOOL fActivate, /* TRUE to activate on creation. */
  1311. IDirectMusicAudioPath **ppNewPath) PURE; /* Returns created audiopath. */
  1312. STDMETHOD(SetDefaultAudioPath) (THIS_ IDirectMusicAudioPath *pAudioPath) PURE;
  1313. STDMETHOD(GetDefaultAudioPath) (THIS_ IDirectMusicAudioPath **ppAudioPath) PURE;
  1314. STDMETHOD(GetParamEx) (THIS_ REFGUID rguidType, /* GetParam command ID. */
  1315. DWORD dwTrackID, /* Virtual track ID of caller. */
  1316. DWORD dwGroupBits, /* Group bits of caller. */
  1317. DWORD dwIndex, /* Index to Nth parameter. */
  1318. MUSIC_TIME mtTime, /* Time of requested parameter. */
  1319. MUSIC_TIME* pmtNext, /* Returned delta to next parameter. */
  1320. void* pParam) PURE; /* Data structure to fill with parameter. */
  1321. };
  1322. /*////////////////////////////////////////////////////////////////////
  1323. // IDirectMusicGraph */
  1324. #undef INTERFACE
  1325. #define INTERFACE IDirectMusicGraph
  1326. DECLARE_INTERFACE_(IDirectMusicGraph, IUnknown)
  1327. {
  1328. /* IUnknown */
  1329. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1330. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1331. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1332. /* IDirectMusicGraph */
  1333. STDMETHOD(StampPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE;
  1334. STDMETHOD(InsertTool) (THIS_ IDirectMusicTool* pTool,
  1335. DWORD* pdwPChannels,
  1336. DWORD cPChannels,
  1337. LONG lIndex) PURE;
  1338. STDMETHOD(GetTool) (THIS_ DWORD dwIndex,
  1339. IDirectMusicTool** ppTool) PURE;
  1340. STDMETHOD(RemoveTool) (THIS_ IDirectMusicTool* pTool) PURE;
  1341. };
  1342. typedef IDirectMusicGraph IDirectMusicGraph8;
  1343. /*/////////////////////////////////////////////////////////////////////
  1344. // IDirectMusicStyle */
  1345. #undef INTERFACE
  1346. #define INTERFACE IDirectMusicStyle
  1347. DECLARE_INTERFACE_(IDirectMusicStyle, IUnknown)
  1348. {
  1349. /* IUnknown */
  1350. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1351. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1352. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1353. /* IDirectMusicStyle */
  1354. STDMETHOD(GetBand) (THIS_ WCHAR* pwszName,
  1355. IDirectMusicBand** ppBand) PURE;
  1356. STDMETHOD(EnumBand) (THIS_ DWORD dwIndex,
  1357. WCHAR *pwszName) PURE;
  1358. STDMETHOD(GetDefaultBand) (THIS_ IDirectMusicBand** ppBand) PURE;
  1359. STDMETHOD(EnumMotif) (THIS_ DWORD dwIndex,
  1360. WCHAR* pwszName) PURE;
  1361. STDMETHOD(GetMotif) (THIS_ WCHAR* pwszName,
  1362. IDirectMusicSegment** ppSegment) PURE;
  1363. STDMETHOD(GetDefaultChordMap) (THIS_ IDirectMusicChordMap** ppChordMap) PURE;
  1364. STDMETHOD(EnumChordMap) (THIS_ DWORD dwIndex,
  1365. WCHAR *pwszName) PURE;
  1366. STDMETHOD(GetChordMap) (THIS_ WCHAR* pwszName,
  1367. IDirectMusicChordMap** ppChordMap) PURE;
  1368. STDMETHOD(GetTimeSignature) (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE;
  1369. STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType,
  1370. DWORD dwLevel,
  1371. DWORD* pdwMin,
  1372. DWORD* pdwMax) PURE;
  1373. STDMETHOD(GetTempo) (THIS_ double* pTempo) PURE;
  1374. };
  1375. /*/////////////////////////////////////////////////////////////////////
  1376. // IDirectMusicStyle8 */
  1377. #undef INTERFACE
  1378. #define INTERFACE IDirectMusicStyle8
  1379. DECLARE_INTERFACE_(IDirectMusicStyle8, IDirectMusicStyle)
  1380. {
  1381. /* IUnknown */
  1382. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1383. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1384. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1385. /* IDirectMusicStyle */
  1386. STDMETHOD(GetBand) (THIS_ WCHAR* pwszName,
  1387. IDirectMusicBand** ppBand) PURE;
  1388. STDMETHOD(EnumBand) (THIS_ DWORD dwIndex,
  1389. WCHAR *pwszName) PURE;
  1390. STDMETHOD(GetDefaultBand) (THIS_ IDirectMusicBand** ppBand) PURE;
  1391. STDMETHOD(EnumMotif) (THIS_ DWORD dwIndex,
  1392. WCHAR* pwszName) PURE;
  1393. STDMETHOD(GetMotif) (THIS_ WCHAR* pwszName,
  1394. IDirectMusicSegment** ppSegment) PURE;
  1395. STDMETHOD(GetDefaultChordMap) (THIS_ IDirectMusicChordMap** ppChordMap) PURE;
  1396. STDMETHOD(EnumChordMap) (THIS_ DWORD dwIndex,
  1397. WCHAR *pwszName) PURE;
  1398. STDMETHOD(GetChordMap) (THIS_ WCHAR* pwszName,
  1399. IDirectMusicChordMap** ppChordMap) PURE;
  1400. STDMETHOD(GetTimeSignature) (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE;
  1401. STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType,
  1402. DWORD dwLevel,
  1403. DWORD* pdwMin,
  1404. DWORD* pdwMax) PURE;
  1405. STDMETHOD(GetTempo) (THIS_ double* pTempo) PURE;
  1406. /* IDirectMusicStyle8 */
  1407. STDMETHOD(EnumPattern) (THIS_ DWORD dwIndex,
  1408. DWORD dwPatternType,
  1409. WCHAR* pwszName) PURE;
  1410. };
  1411. /*/////////////////////////////////////////////////////////////////////
  1412. // IDirectMusicChordMap */
  1413. #undef INTERFACE
  1414. #define INTERFACE IDirectMusicChordMap
  1415. DECLARE_INTERFACE_(IDirectMusicChordMap, IUnknown)
  1416. {
  1417. /* IUnknown */
  1418. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1419. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1420. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1421. /* IDirectMusicChordMap */
  1422. STDMETHOD(GetScale) (THIS_ DWORD* pdwScale) PURE;
  1423. };
  1424. typedef IDirectMusicChordMap IDirectMusicChordMap8;
  1425. /*/////////////////////////////////////////////////////////////////////
  1426. // IDirectMusicComposer */
  1427. #undef INTERFACE
  1428. #define INTERFACE IDirectMusicComposer
  1429. DECLARE_INTERFACE_(IDirectMusicComposer, IUnknown)
  1430. {
  1431. /* IUnknown */
  1432. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1433. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1434. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1435. /* IDirectMusicComposer */
  1436. STDMETHOD(ComposeSegmentFromTemplate) (THIS_ IDirectMusicStyle* pStyle,
  1437. IDirectMusicSegment* pTemplate,
  1438. WORD wActivity,
  1439. IDirectMusicChordMap* pChordMap,
  1440. IDirectMusicSegment** ppSegment) PURE;
  1441. STDMETHOD(ComposeSegmentFromShape) (THIS_ IDirectMusicStyle* pStyle,
  1442. WORD wNumMeasures,
  1443. WORD wShape,
  1444. WORD wActivity,
  1445. BOOL fIntro,
  1446. BOOL fEnd,
  1447. IDirectMusicChordMap* pChordMap,
  1448. IDirectMusicSegment** ppSegment ) PURE;
  1449. STDMETHOD(ComposeTransition) (THIS_ IDirectMusicSegment* pFromSeg,
  1450. IDirectMusicSegment* pToSeg,
  1451. MUSIC_TIME mtTime,
  1452. WORD wCommand,
  1453. DWORD dwFlags,
  1454. IDirectMusicChordMap* pChordMap,
  1455. IDirectMusicSegment** ppTransSeg) PURE;
  1456. STDMETHOD(AutoTransition) (THIS_ IDirectMusicPerformance* pPerformance,
  1457. IDirectMusicSegment* pToSeg,
  1458. WORD wCommand,
  1459. DWORD dwFlags,
  1460. IDirectMusicChordMap* pChordMap,
  1461. IDirectMusicSegment** ppTransSeg,
  1462. IDirectMusicSegmentState** ppToSegState,
  1463. IDirectMusicSegmentState** ppTransSegState) PURE;
  1464. STDMETHOD(ComposeTemplateFromShape) (THIS_ WORD wNumMeasures,
  1465. WORD wShape,
  1466. BOOL fIntro,
  1467. BOOL fEnd,
  1468. WORD wEndLength,
  1469. IDirectMusicSegment** ppTemplate) PURE;
  1470. STDMETHOD(ChangeChordMap) (THIS_ IDirectMusicSegment* pSegment,
  1471. BOOL fTrackScale,
  1472. IDirectMusicChordMap* pChordMap) PURE;
  1473. };
  1474. typedef IDirectMusicComposer IDirectMusicComposer8;
  1475. /*/////////////////////////////////////////////////////////////////////
  1476. // IDirectMusicPatternTrack */
  1477. #undef INTERFACE
  1478. #define INTERFACE IDirectMusicPatternTrack
  1479. DECLARE_INTERFACE_(IDirectMusicPatternTrack, IUnknown)
  1480. {
  1481. /* IUnknown */
  1482. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1483. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1484. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1485. /* IDirectMusicPatternTrack */
  1486. STDMETHOD(CreateSegment) (THIS_ IDirectMusicStyle* pStyle,
  1487. IDirectMusicSegment** ppSegment) PURE;
  1488. STDMETHOD(SetVariation) (THIS_ IDirectMusicSegmentState* pSegState,
  1489. DWORD dwVariationFlags,
  1490. DWORD dwPart) PURE;
  1491. STDMETHOD(SetPatternByName) (THIS_ IDirectMusicSegmentState* pSegState,
  1492. WCHAR* wszName,
  1493. IDirectMusicStyle* pStyle,
  1494. DWORD dwPatternType,
  1495. DWORD* pdwLength) PURE;
  1496. };
  1497. typedef IDirectMusicPatternTrack IDirectMusicPatternTrack8;
  1498. /*/////////////////////////////////////////////////////////////////////
  1499. // IDirectMusicScript */
  1500. #undef INTERFACE
  1501. #define INTERFACE IDirectMusicScript
  1502. DECLARE_INTERFACE_(IDirectMusicScript, IUnknown)
  1503. {
  1504. /* IUnknown */
  1505. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1506. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1507. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1508. /* IDirectMusicScript */
  1509. STDMETHOD(Init) (THIS_ IDirectMusicPerformance *pPerformance,
  1510. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1511. STDMETHOD(CallRoutine) (THIS_ WCHAR *pwszRoutineName,
  1512. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1513. STDMETHOD(SetVariableVariant) (THIS_ WCHAR *pwszVariableName,
  1514. VARIANT varValue,
  1515. BOOL fSetRef,
  1516. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1517. STDMETHOD(GetVariableVariant) (THIS_ WCHAR *pwszVariableName,
  1518. VARIANT *pvarValue,
  1519. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1520. STDMETHOD(SetVariableNumber) (THIS_ WCHAR *pwszVariableName,
  1521. LONG lValue,
  1522. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1523. STDMETHOD(GetVariableNumber) (THIS_ WCHAR *pwszVariableName,
  1524. LONG *plValue,
  1525. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1526. STDMETHOD(SetVariableObject) (THIS_ WCHAR *pwszVariableName,
  1527. IUnknown *punkValue,
  1528. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1529. STDMETHOD(GetVariableObject) (THIS_ WCHAR *pwszVariableName,
  1530. REFIID riid,
  1531. LPVOID FAR *ppv,
  1532. DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE;
  1533. STDMETHOD(EnumRoutine) (THIS_ DWORD dwIndex,
  1534. WCHAR *pwszName) PURE;
  1535. STDMETHOD(EnumVariable) (THIS_ DWORD dwIndex,
  1536. WCHAR *pwszName) PURE;
  1537. };
  1538. typedef IDirectMusicScript IDirectMusicScript8;
  1539. /*/////////////////////////////////////////////////////////////////////
  1540. // IDirectMusicContainer */
  1541. #undef INTERFACE
  1542. #define INTERFACE IDirectMusicContainer
  1543. DECLARE_INTERFACE_(IDirectMusicContainer, IUnknown)
  1544. {
  1545. /* IUnknown */
  1546. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1547. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1548. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1549. /* IDirectMusicContainer */
  1550. STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
  1551. DWORD dwIndex,
  1552. LPDMUS_OBJECTDESC pDesc,
  1553. WCHAR *pwszAlias) PURE;
  1554. };
  1555. typedef IDirectMusicContainer IDirectMusicContainer8;
  1556. /*/////////////////////////////////////////////////////////////////////
  1557. // IDirectMusicSong */
  1558. /* Note: Songs are not supported in DX8. */
  1559. #undef INTERFACE
  1560. #define INTERFACE IDirectMusicSong
  1561. DECLARE_INTERFACE_(IDirectMusicSong, IUnknown)
  1562. {
  1563. /* IUnknown */
  1564. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  1565. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1566. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1567. /* IDirectMusicSong */
  1568. STDMETHOD(Compose) (THIS) PURE;
  1569. STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
  1570. DWORD dwGroupBits,
  1571. DWORD dwIndex,
  1572. MUSIC_TIME mtTime,
  1573. MUSIC_TIME* pmtNext,
  1574. void* pParam) PURE;
  1575. STDMETHOD(GetSegment) (THIS_ WCHAR *pwzName, /* Retrieve a specific segment by name. */
  1576. IDirectMusicSegment **ppSegment) PURE; /* Returned segment. */
  1577. STDMETHOD(GetAudioPathConfig) (THIS_ IUnknown ** ppAudioPathConfig) PURE; /* Retrieve embedded audiopath configuration. */
  1578. STDMETHOD(Download) (THIS_ IUnknown *pAudioPath) PURE; /* Download entire song to ports on performance or audiopath. */
  1579. STDMETHOD(Unload) (THIS_ IUnknown *pAudioPath) PURE; /* Unload entire song from port on performance or audiopath. */
  1580. STDMETHOD(EnumSegment) (THIS_ DWORD dwIndex, /* Nth segment to retrieve. */
  1581. IDirectMusicSegment **ppSegment) PURE; /* Pointer to segment. */
  1582. };
  1583. typedef IDirectMusicSong IDirectMusicSong8;
  1584. /* CLSID's */
  1585. DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1586. DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1587. DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1588. DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1589. DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1590. DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1591. DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1592. DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1593. DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00, 0xb6ee, 0x11d1, 0x86, 0xbe, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
  1594. /* New CLSID's for DX8 */
  1595. DEFINE_GUID(CLSID_DirectMusicPatternTrack,0xd2ac2897, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1596. DEFINE_GUID(CLSID_DirectMusicScript,0x810b5013, 0xe88d, 0x11d2, 0x8b, 0xc1, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {810B5013-E88D-11d2-8BC1-00600893B1B6} */
  1597. DEFINE_GUID(CLSID_DirectMusicContainer,0x9301e380, 0x1f22, 0x11d3, 0x82, 0x26, 0xd2, 0xfa, 0x76, 0x25, 0x5d, 0x47);
  1598. DEFINE_GUID(CLSID_DirectSoundWave,0x8a667154, 0xf9cb, 0x11d2, 0xad, 0x8a, 0x0, 0x60, 0xb0, 0x57, 0x5a, 0xbc);
  1599. /* Note: Songs are not supported in DX8. */
  1600. DEFINE_GUID(CLSID_DirectMusicSong, 0xaed5f0a5, 0xd972, 0x483d, 0xa3, 0x84, 0x64, 0x9d, 0xfe, 0xb9, 0xc1, 0x81);
  1601. DEFINE_GUID(CLSID_DirectMusicAudioPathConfig,0xee0b9ca0, 0xa81e, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1602. /* Special GUID for all object types. This is used by the loader. */
  1603. DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1604. /* Notification guids */
  1605. DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1606. DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5, 0x4e5d, 0x11d2, 0xbc, 0xc7, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1607. DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1608. DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1609. DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1610. DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE, 0xd348372b, 0x945b, 0x45ae, 0xa5, 0x22, 0x45, 0xf, 0x12, 0x5b, 0x84, 0xa5);
  1611. /* Track param type guids */
  1612. /* Use to get/set a DMUS_COMMAND_PARAM param in the Command track */
  1613. DEFINE_GUID(GUID_CommandParam,0xd2ac289d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1614. /* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track */
  1615. DEFINE_GUID(GUID_CommandParam2, 0x28f97ef7, 0x9538, 0x11d2, 0x97, 0xa9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1616. /* Use to get/set a DMUS_COMMAND_PARAM_2 param to be used as the command following all commands in
  1617. the Command track (this information can't be saved) */
  1618. DEFINE_GUID(GUID_CommandParamNext, 0x472afe7a, 0x281b, 0x11d3, 0x81, 0x7d, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1619. /* Use to get/set a DMUS_CHORD_PARAM param in the Chord track */
  1620. DEFINE_GUID(GUID_ChordParam,0xd2ac289e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1621. /* Use to get a DMUS_RHYTHM_PARAM param in the Chord track */
  1622. DEFINE_GUID(GUID_RhythmParam,0xd2ac289f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1623. /* Use to get/set an IDirectMusicStyle param in the Style track */
  1624. DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1625. /* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks */
  1626. DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1627. /* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track */
  1628. DEFINE_GUID(GUID_TempoParam,0xd2ac28a5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1629. /* Use to get the next valid point in a segment at which it may start */
  1630. DEFINE_GUID(GUID_Valid_Start_Time,0x7f6b1760, 0x1fdb, 0x11d3, 0x82, 0x26, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  1631. /* Use to get the next point in the currently playing primary segment at which a new segment may start */
  1632. DEFINE_GUID(GUID_Play_Marker,0xd8761a41, 0x801a, 0x11d3, 0x9b, 0xd1, 0xda, 0xf7, 0xe1, 0xc3, 0xd8, 0x34);
  1633. /* Use to get (GetParam) or add (SetParam) bands in the Band track */
  1634. DEFINE_GUID(GUID_BandParam,0x2bb1938, 0xcb8b, 0x11d2, 0x8b, 0xb9, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6);
  1635. typedef struct _DMUS_BAND_PARAM
  1636. {
  1637. MUSIC_TIME mtTimePhysical; /* Note: If this is a clock-time track, then this field is interpreted in the track's internal time format, which is the number of milliseconds after the beginning of playback. */
  1638. IDirectMusicBand *pBand;
  1639. } DMUS_BAND_PARAM;
  1640. /* Obsolete -- doesn't distinguish physical and logical time. Use GUID_BandParam instead. */
  1641. DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1642. /* Use to get/set an IDirectMusicChordMap param in the ChordMap track */
  1643. DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1644. /* Use to get/set a DMUS_MUTE_PARAM param in the Mute track */
  1645. DEFINE_GUID(GUID_MuteParam,0xd2ac28af, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1646. /* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
  1647. Some of these guids (where noted) also apply to wave tracks.
  1648. */
  1649. /* Download bands/waves for the IDirectMusicSegment */
  1650. DEFINE_GUID(GUID_Download,0xd2ac28a7, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1651. /* Unload bands/waves for the IDirectMusicSegment */
  1652. DEFINE_GUID(GUID_Unload,0xd2ac28a8, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1653. /* Connect segment's bands to an IDirectMusicCollection */
  1654. DEFINE_GUID(GUID_ConnectToDLSCollection, 0x1db1ae6b, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1655. /* Enable/disable autodownloading of bands/waves */
  1656. DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1657. DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1658. /* Clear all bands */
  1659. DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1660. /* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file */
  1661. DEFINE_GUID(GUID_StandardMIDIFile, 0x6621075, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1662. /* For compatibility with beta releases... */
  1663. #define GUID_IgnoreBankSelectForGM GUID_StandardMIDIFile
  1664. /* Disable/enable param guids. Use these in SetParam calls to disable or enable sending
  1665. * specific PMsg types.
  1666. */
  1667. DEFINE_GUID(GUID_DisableTimeSig, 0x45fc707b, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1668. DEFINE_GUID(GUID_EnableTimeSig, 0x45fc707c, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1669. DEFINE_GUID(GUID_DisableTempo, 0x45fc707d, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1670. DEFINE_GUID(GUID_EnableTempo, 0x45fc707e, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1671. /* Used in SetParam calls for pattern-based tracks. A nonzero value seeds the random number
  1672. generator for variation selection; a value of zero reverts to the default behavior of
  1673. getting the seed from the system clock.
  1674. */
  1675. DEFINE_GUID(GUID_SeedVariations, 0x65b76fa5, 0xff37, 0x11d2, 0x81, 0x4e, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1676. /* Used to get/set melody fragments (pParam points to a DMUS_MELODY_FRAGMENT) */
  1677. /* Note: Melody formulation is not supported in DX8. */
  1678. DEFINE_GUID(GUID_MelodyFragment, 0xb291c7f2, 0xb616, 0x11d2, 0x97, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1679. /* Used to clear all melody fragments */
  1680. /* Note: Melody formulation is not supported in DX8. */
  1681. DEFINE_GUID(GUID_Clear_All_MelodyFragments, 0x8509fee6, 0xb617, 0x11d2, 0x97, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1682. /* Used to get the variations currently in effect across PChannels */
  1683. DEFINE_GUID(GUID_Variations, 0x11f72cce, 0x26e6, 0x4ecd, 0xaf, 0x2e, 0xd6, 0x68, 0xe6, 0x67, 0x7, 0xd8);
  1684. typedef struct _DMUS_VARIATIONS_PARAM
  1685. {
  1686. DWORD dwPChannelsUsed; /* number of PChannels in use */
  1687. DWORD* padwPChannels; /* array of PChannels in use */
  1688. DWORD* padwVariations; /* array of variations in effect for each PChannel */
  1689. } DMUS_VARIATIONS_PARAM;
  1690. /* Download bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance */
  1691. DEFINE_GUID(GUID_DownloadToAudioPath,0x9f2c0341, 0xc5c4, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  1692. /* Unload bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance */
  1693. DEFINE_GUID(GUID_UnloadFromAudioPath,0x9f2c0342, 0xc5c4, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  1694. /* Global data guids */
  1695. DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1696. DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1697. DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1698. DEFINE_GUID(GUID_PerfAutoDownload, 0xfb09565b, 0x3631, 0x11d2, 0xbc, 0xb8, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1699. /* GUID for default GM/GS dls collection. */
  1700. DEFINE_GUID(GUID_DefaultGMCollection, 0xf17e8673, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1701. /* GUID to define default synth, placed in AudioPath configuration file. */
  1702. DEFINE_GUID(GUID_Synth_Default,0x26bb9432, 0x45fe, 0x48d3, 0xa3, 0x75, 0x24, 0x72, 0xc5, 0xe3, 0xe7, 0x86);
  1703. /* GUIDs to define default buffer configurations to place in AudioPath configuration file. */
  1704. DEFINE_GUID(GUID_Buffer_Reverb,0x186cc541, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1705. DEFINE_GUID(GUID_Buffer_EnvReverb,0x186cc542, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1706. DEFINE_GUID(GUID_Buffer_Stereo,0x186cc545, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1707. DEFINE_GUID(GUID_Buffer_3D_Dry,0x186cc546, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1708. DEFINE_GUID(GUID_Buffer_Mono,0x186cc547, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74);
  1709. /* IID's */
  1710. DEFINE_GUID(IID_IDirectMusicLoader, 0x2ffaaca2, 0x5dca, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1711. DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844, 0xd13d, 0x11d1, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1712. DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1713. DEFINE_GUID(IID_IDirectMusicSegment, 0xf96029a2, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1714. DEFINE_GUID(IID_IDirectMusicSegmentState, 0xa3afdcc7, 0xd3ee, 0x11d1, 0xbc, 0x8d, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1715. DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03, 0x6523, 0x11d2, 0x87, 0x1d, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1716. DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277, 0x5497, 0x11d2, 0xbc, 0xcb, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1717. DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1718. DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1719. DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1720. DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1721. /* Alternate interface IDs, available in DX7 release and after. */
  1722. DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1723. DEFINE_GUID(IID_IDirectMusicSegment2, 0xd38894d1, 0xc052, 0x11d2, 0x87, 0x2f, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1724. /* Interface IDs for DX8 */
  1725. /* changed interfaces (GUID only) */
  1726. DEFINE_GUID(IID_IDirectMusicLoader8, 0x19e7c08c, 0xa44, 0x4e6a, 0xa1, 0x16, 0x59, 0x5a, 0x7c, 0xd5, 0xde, 0x8c);
  1727. DEFINE_GUID(IID_IDirectMusicPerformance8, 0x679c4137, 0xc62e, 0x4147, 0xb2, 0xb4, 0x9d, 0x56, 0x9a, 0xcb, 0x25, 0x4c);
  1728. DEFINE_GUID(IID_IDirectMusicSegment8,0xc6784488, 0x41a3, 0x418f, 0xaa, 0x15, 0xb3, 0x50, 0x93, 0xba, 0x42, 0xd4);
  1729. DEFINE_GUID(IID_IDirectMusicSegmentState8, 0xa50e4730, 0xae4, 0x48a7, 0x98, 0x39, 0xbc, 0x4, 0xbf, 0xe0, 0x77, 0x72);
  1730. DEFINE_GUID(IID_IDirectMusicStyle8, 0xfd24ad8a, 0xa260, 0x453d, 0xbf, 0x50, 0x6f, 0x93, 0x84, 0xf7, 0x9, 0x85);
  1731. /* new interfaces (GUID + alias) */
  1732. DEFINE_GUID(IID_IDirectMusicPatternTrack, 0x51c22e10, 0xb49f, 0x46fc, 0xbe, 0xc2, 0xe6, 0x28, 0x8f, 0xb9, 0xed, 0xe6);
  1733. #define IID_IDirectMusicPatternTrack8 IID_IDirectMusicPatternTrack
  1734. DEFINE_GUID(IID_IDirectMusicScript, 0x2252373a, 0x5814, 0x489b, 0x82, 0x9, 0x31, 0xfe, 0xde, 0xba, 0xf1, 0x37); /* {2252373A-5814-489b-8209-31FEDEBAF137} */
  1735. #define IID_IDirectMusicScript8 IID_IDirectMusicScript
  1736. DEFINE_GUID(IID_IDirectMusicContainer, 0x9301e386, 0x1f22, 0x11d3, 0x82, 0x26, 0xd2, 0xfa, 0x76, 0x25, 0x5d, 0x47);
  1737. #define IID_IDirectMusicContainer8 IID_IDirectMusicContainer
  1738. /* Note: Songs are not supported in DX8. */
  1739. DEFINE_GUID(IID_IDirectMusicSong, 0xa862b2ec, 0x3676, 0x4982, 0x85, 0xa, 0x78, 0x42, 0x77, 0x5e, 0x1d, 0x86);
  1740. #define IID_IDirectMusicSong8 IID_IDirectMusicSong
  1741. DEFINE_GUID(IID_IDirectMusicAudioPath,0xc87631f5, 0x23be, 0x4986, 0x88, 0x36, 0x5, 0x83, 0x2f, 0xcc, 0x48, 0xf9);
  1742. #define IID_IDirectMusicAudioPath8 IID_IDirectMusicAudioPath
  1743. /* unchanged interfaces (alias only) */
  1744. #define IID_IDirectMusicGetLoader8 IID_IDirectMusicGetLoader
  1745. #define IID_IDirectMusicChordMap8 IID_IDirectMusicChordMap
  1746. #define IID_IDirectMusicGraph8 IID_IDirectMusicGraph
  1747. #define IID_IDirectMusicBand8 IID_IDirectMusicBand
  1748. #define IID_IDirectMusicObject8 IID_IDirectMusicObject
  1749. #define IID_IDirectMusicComposer8 IID_IDirectMusicComposer
  1750. #ifdef __cplusplus
  1751. }; /* extern "C" */
  1752. #endif
  1753. #include <poppack.h>
  1754. #endif /* #ifndef _DMUSICI_ */