home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / dmusici.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  58.7 KB  |  1,145 lines

  1. /************************************************************************
  2. *                                                                       *
  3. *   dmusici.h -- This module contains the API for the                   *
  4. *                DirectMusic performance layer                          *
  5. *                                                                       *
  6. *   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
  7. *                                                                       *
  8. ************************************************************************/
  9.  
  10. #ifndef _DMUSICI_
  11. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  12. #define _DMUSICI_
  13.  
  14. #include <windows.h>
  15.  
  16. #define COM_NO_WINDOWS_H
  17. #include <objbase.h>
  18.  
  19. #include <mmsystem.h>
  20. #include "dmusicc.h"
  21.  
  22. #include <pshpack8.h>
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. typedef WORD            TRANSITION_TYPE;
  29. typedef __int64         REFERENCE_TIME;
  30. typedef long            MUSIC_TIME;
  31.  
  32. #define DMUS_PPQ        768     /* parts per quarter note */
  33.  
  34. interface IDirectMusic;
  35. interface IDirectMusicTrack;
  36. interface IDirectMusicPerformance;
  37. interface IDirectMusicTool;
  38. interface IDirectMusicSegment;
  39. interface IDirectMusicSegmentState;
  40. interface IDirectMusicGraph;
  41. interface IDirectMusicPort;
  42. interface IDirectMusicBuffer;
  43. interface IDirectMusicInstrument;
  44. interface IDirectMusicDownloadedInstrument;
  45. interface IDirectMusicBand;
  46. interface IDirectMusicChordMap;
  47. interface IDirectMusicLoader;
  48. interface IDirectMusicObject;
  49. #ifndef __cplusplus 
  50. typedef interface IDirectMusic IDirectMusic;
  51. typedef interface IDirectMusicTrack IDirectMusicTrack;
  52. typedef interface IDirectMusicPerformance IDirectMusicPerformance;
  53. typedef interface IDirectMusicTool IDirectMusicTool;
  54. typedef interface IDirectMusicSegment IDirectMusicSegment;
  55. typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
  56. typedef interface IDirectMusicGraph IDirectMusicGraph;
  57. typedef interface IDirectMusicPort IDirectMusicPort;
  58. typedef interface IDirectMusicBuffer IDirectMusicBuffer;
  59. typedef interface IDirectMusicInstrument IDirectMusicInstrument;
  60. typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument;
  61. typedef interface IDirectMusicBand IDirectMusicBand;
  62. typedef interface IDirectMusicChordMap IDirectMusicChordMap;
  63. typedef interface IDirectMusicObject IDirectMusicObject;
  64. typedef interface IDirectMusicLoader IDirectMusicLoader;
  65. #endif
  66.  
  67. typedef enum enumDMUS_COMMANDT_TYPES
  68. {
  69.     DMUS_COMMANDT_GROOVE            = 0,
  70.     DMUS_COMMANDT_FILL              = 1,
  71.     DMUS_COMMANDT_INTRO             = 2,
  72.     DMUS_COMMANDT_BREAK             = 3,
  73.     DMUS_COMMANDT_END               = 4,
  74.     DMUS_COMMANDT_ENDANDINTRO       = 5
  75. } DMUS_COMMANDT_TYPES;
  76.  
  77. typedef enum enumDMUS_SHAPET_TYPES
  78. {
  79.     DMUS_SHAPET_FALLING             = 0,
  80.     DMUS_SHAPET_LEVEL               = 1,
  81.     DMUS_SHAPET_LOOPABLE            = 2,
  82.     DMUS_SHAPET_LOUD                = 3,
  83.     DMUS_SHAPET_QUIET               = 4,
  84.     DMUS_SHAPET_PEAKING             = 5,
  85.     DMUS_SHAPET_RANDOM              = 6,
  86.     DMUS_SHAPET_RISING              = 7,
  87.     DMUS_SHAPET_SONG                = 8
  88. }   DMUS_SHAPET_TYPES;
  89.  
  90. typedef enum enumDMUS_COMPOSEF_FLAGS
  91. {       
  92.     DMUS_COMPOSEF_NONE              = 0,
  93.     DMUS_COMPOSEF_ALIGN             = 0x1,
  94.     DMUS_COMPOSEF_OVERLAP           = 0x2,
  95.     DMUS_COMPOSEF_IMMEDIATE         = 0x4,
  96.     DMUS_COMPOSEF_GRID              = 0x8,
  97.     DMUS_COMPOSEF_BEAT              = 0x10,
  98.     DMUS_COMPOSEF_MEASURE           = 0x20,
  99.     DMUS_COMPOSEF_AFTERPREPARETIME  = 0x40,
  100.     DMUS_COMPOSEF_MODULATE          = 0x1000,
  101.     DMUS_COMPOSEF_LONG              = 0x2000
  102. }   DMUS_COMPOSEF_FLAGS;
  103.  
  104. #define DMUS_PMSG_PART                                                                              \
  105.     DWORD               dwSize;                                                                     \
  106.     REFERENCE_TIME      rtTime;             /* real time (in 100 nanosecond increments) */          \
  107.     MUSIC_TIME          mtTime;             /* music time */                                        \
  108.     DWORD               dwFlags;            /* various bits (see DMUS_PMSG_FLAGS enumeration) */    \
  109.     DWORD               dwPChannel;         /* Performance Channel. The Performance can */          \
  110.                                             /* use this to determine the port/channel. */           \
  111.     DWORD               dwVirtualTrackID;   /* virtual track ID */                                  \
  112.     IDirectMusicTool*   pTool;              /* tool interface pointer */                            \
  113.     IDirectMusicGraph*  pGraph;             /* tool graph interface pointer */                      \
  114.     DWORD               dwType;             /* PMSG type (see DMUS_PMSGT_TYPES defines) */              \
  115.     DWORD               dwVoiceID;          /* unique voice id which allows synthesizers to */      \
  116.                                             /* identify a specific event. For DirectX 6.0, */       \
  117.                                             /* this field should always be 0. */                    \
  118.     DWORD               dwGroupID;          /* Track group id */                                 \
  119.     IUnknown*           punkUser;           /* user com pointer, auto released upon PMSG free */
  120.  
  121. /* every DMUS_PMSG is based off of this structure. The Performance needs 
  122.    to access these members consistently in every PMSG that goes through it. */
  123. typedef struct _DMUS_PMSG
  124. {
  125.     /* begin DMUS_PMSG_PART */
  126.     DMUS_PMSG_PART
  127.     /* end DMUS_PMSG_PART */
  128.  
  129. } DMUS_PMSG;
  130.  
  131. /* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member */
  132. typedef enum enumDMUS_PMSGF_FLAGS
  133. {
  134.     DMUS_PMSGF_REFTIME          = 1,      /* if rtTime is valid */
  135.     DMUS_PMSGF_MUSICTIME        = 2,      /* if mtTime is valid */
  136.     DMUS_PMSGF_TOOL_IMMEDIATE   = 4,      /* if PMSG should be processed immediately */ 
  137.     DMUS_PMSGF_TOOL_QUEUE       = 8,      /* if PMSG should be processed a little early, at Queue time */
  138.     DMUS_PMSGF_TOOL_ATTIME      = 16,     /* if PMSG should be processed at the time stamp */
  139.     DMUS_PMSGF_TOOL_FLUSH       = 32      /* if PMSG is being flushed */
  140.     /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the */
  141.     /* DMUS_PMSG's dwFlags member. */
  142. } DMUS_PMSGF_FLAGS;
  143.  
  144. /* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member */
  145. typedef enum enumDMUS_PMSGT_TYPES
  146. {
  147.     DMUS_PMSGT_MIDI             = 0,      /* MIDI short message */
  148.     DMUS_PMSGT_NOTE             = 1,      /* Interactive Music Note */
  149.     DMUS_PMSGT_SYSEX            = 2,      /* MIDI long message (system exclusive message) */
  150.     DMUS_PMSGT_NOTIFICATION     = 3,      /* Notification message */
  151.     DMUS_PMSGT_TEMPO            = 4,      /* Tempo message */
  152.     DMUS_PMSGT_CURVE            = 5,      /* Control change / pitch bend, etc. curve */
  153.     DMUS_PMSGT_TIMESIG          = 6,      /* Time signature */
  154.     DMUS_PMSGT_PATCH            = 7,      /* Patch changes */
  155.     DMUS_PMSGT_TRANSPOSE        = 8,      /* Transposition messages */
  156.     DMUS_PMSGT_CHANNEL_PRIORITY = 9,      /* Channel priority */
  157.     DMUS_PMSGT_STOP             = 10,     /* Stop message */
  158.     DMUS_PMSGT_DIRTY            = 11,     /* Tells Tools that cache GetParam() info to refresh */
  159.     DMUS_PMSGT_USER             = 255     /* User message */
  160. } DMUS_PMSGT_TYPES;
  161.  
  162. /* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API */
  163. typedef enum enumDMUS_SEGF_FLAGS
  164. {
  165.     DMUS_SEGF_REFTIME           = 64,     /* time parameter is in reference time  */
  166.     DMUS_SEGF_SECONDARY         = 128,    /* secondary segment */
  167.     DMUS_SEGF_QUEUE             = 256,    /* queue at the end of the primary segment queue (primary only) */
  168.     DMUS_SEGF_CONTROL           = 512,    /* play as a control track (secondary segments only) */
  169.     DMUS_SEGF_AFTERPREPARETIME  = 1<<10,  /* play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) */
  170.     DMUS_SEGF_GRID              = 1<<11,  /* play on grid boundary */
  171.     DMUS_SEGF_BEAT              = 1<<12,  /* play on beat boundary */
  172.     DMUS_SEGF_MEASURE           = 1<<13,  /* play on measure boundary */
  173.     DMUS_SEGF_DEFAULT           = 1<<14,  /* use segment's default boundary */
  174.     DMUS_SEGF_NOINVALIDATE      = 1<<15   /* play without invalidating the currently playing segment(s) */
  175. } DMUS_SEGF_FLAGS;
  176.  
  177. /* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can */
  178. /* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values */
  179. /* are intentionally the same */
  180. typedef enum enumDMUS_TIME_RESOLVE_FLAGS
  181. {
  182.     DMUS_TIME_RESOLVE_AFTERPREPARETIME  = 1<<10,  /* resolve to a time after the prepare time */
  183.     DMUS_TIME_RESOLVE_GRID              = 1<<11,  /* resolve to a time on a grid boundary */
  184.     DMUS_TIME_RESOLVE_BEAT              = 1<<12,  /* resolve to a time on a beat boundary */
  185.     DMUS_TIME_RESOLVE_MEASURE           = 1<<13   /* resolve to a time on a measure boundary */
  186. } DMUS_TIME_RESOLVE_FLAGS;
  187.  
  188. /* The following flags are sent in the IDirectMusicTrack::Play() method */
  189. /* inside the dwFlags parameter */
  190. typedef enum enumDMUS_TRACKF_FLAGS
  191. {
  192.     DMUS_TRACKF_SEEK            = 1,      /* set on a seek */
  193.     DMUS_TRACKF_LOOP            = 2,      /* set on a loop (repeat) */
  194.     DMUS_TRACKF_START           = 4,      /* set on first call to Play */
  195.     DMUS_TRACKF_FLUSH           = 8,      /* set when this call is in response to a flush on the perfomance */
  196.     DMUS_TRACKF_DIRTY           = 16,     /* set when the track should consider any cached values from a previous call to GetParam to be invalidated */
  197. } DMUS_TRACKF_FLAGS;
  198.  
  199. #define DMUS_MAXSUBCHORD 8
  200.  
  201. typedef struct _DMUS_SUBCHORD
  202. {
  203.     DWORD   dwChordPattern;     /* Notes in the subchord */
  204.     DWORD   dwScalePattern;     /* Notes in the scale */
  205.     DWORD   dwInversionPoints;  /* Where inversions can occur */
  206.     DWORD   dwLevels;           /* Which levels are supported by this subchord */
  207.     BYTE    bChordRoot;         /* Root of the subchord */
  208.     BYTE    bScaleRoot;         /* Root of the scale */
  209. } DMUS_SUBCHORD;
  210.  
  211. typedef struct _DMUS_CHORD_KEY
  212. {
  213.     WCHAR           wszName[16];        /* Name of the chord */
  214.     WORD            wMeasure;           /* Measure this falls on */
  215.     BYTE            bBeat;              /* Beat this falls on */
  216.     BYTE            bSubChordCount;     /* Number of chords in the list of subchords */
  217.     DMUS_SUBCHORD   SubChordList[DMUS_MAXSUBCHORD]; /* List of sub chords */
  218.     DWORD           dwScale;            /* Scale underlying the entire chord */
  219.     BYTE            bKey;               /* Key underlying the entire chord */
  220. } DMUS_CHORD_KEY;
  221.  
  222. /* DMUS_NOTE_PMSG */
  223. typedef struct _DMUS_NOTE_PMSG
  224. {
  225.     /* begin DMUS_PMSG_PART */
  226.     DMUS_PMSG_PART
  227.     /* end DMUS_PMSG_PART */
  228.  
  229.     MUSIC_TIME mtDuration;     /* duration */
  230.     WORD    wMusicValue;       /* Description of note in chord and key. */
  231.     WORD    wMeasure;          /* Measure in which this note occurs */
  232.     short   nOffset;           /* Offset from grid at which this note occurs */
  233.     BYTE    bBeat;             /* Beat (in measure) at which this note occurs */
  234.     BYTE    bGrid;             /* Grid offset from beat at which this note occurs */
  235.     BYTE    bVelocity;         /* Note velocity */
  236.     BYTE    bFlags;            /* see DMUS_NOTE_FLAGS */
  237.     BYTE    bTimeRange;        /* Range to randomize time. */
  238.     BYTE    bDurRange;         /* Range to randomize duration. */
  239.     BYTE    bVelRange;         /* Range to randomize velocity. */
  240.     BYTE    bPlayModeFlags;    /* Play mode */
  241.     BYTE    bSubChordLevel;    /* Which subchord level this note uses.  */
  242.     BYTE    bMidiValue;        /* The MIDI note value, converted from wMusicValue */
  243.     char    cTranspose;        /* Transposition to add to midi note value after converted from wMusicValue. */
  244. } DMUS_NOTE_PMSG;
  245.  
  246. typedef enum enumDMUS_NOTEF_FLAGS
  247. {
  248.     DMUS_NOTEF_NOTEON = 1,     /* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off */
  249. } DMUS_NOTEF_FLAGS;
  250.  
  251. /* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
  252.    into the appropriate bMidiValue.
  253. */
  254.  
  255. typedef enum enumDMUS_PLAYMODE_FLAGS
  256. {
  257.     DMUS_PLAYMODE_KEY_ROOT          = 1,  /* Transpose on top of the key root. */
  258.     DMUS_PLAYMODE_CHORD_ROOT        = 2,  /* Transpose on top of the chord root. */
  259.     DMUS_PLAYMODE_SCALE_INTERVALS   = 4,  /* Use scale intervals from scale pattern. */
  260.     DMUS_PLAYMODE_CHORD_INTERVALS   = 8,  /* Use chord intervals from chord pattern. */
  261.     DMUS_PLAYMODE_NONE              = 16, /* No mode. Indicates the parent part's mode should be used. */
  262. } DMUS_PLAYMODE_FLAGS;
  263.  
  264. /* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
  265.    in various ways:
  266. */
  267.  
  268. /* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
  269.    notes that should not be transposed by the chord or scale.
  270. */
  271. #define DMUS_PLAYMODE_FIXED             0  
  272. /* In fixed to key, the musicvalue is again a fixed MIDI value, but it
  273.    is transposed on top of the key root. 
  274. */
  275. #define DMUS_PLAYMODE_FIXEDTOKEY        DMUS_PLAYMODE_KEY_ROOT
  276. /* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
  277.    is transposed on top of the chord root. 
  278. */
  279. #define DMUS_PLAYMODE_FIXEDTOCHORD      DMUS_PLAYMODE_CHORD_ROOT
  280. /* In Pedalpoint, the key root is used and the notes only track the intervals in
  281.    the scale. The chord root and intervals are completely ignored. This is useful
  282.    for melodic lines that play relative to the key root.
  283. */
  284. #define DMUS_PLAYMODE_PEDALPOINT        (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  285. /* In the Melodic mode, the chord root is used but the notes only track the intervals in
  286.    the scale. The key root and chord intervals are completely ignored. This is useful
  287.    for melodic lines that play relative to the chord root. 
  288. */
  289. #define DMUS_PLAYMODE_MELODIC           (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
  290. /* Normal chord mode is the prevalent playback mode. 
  291.    The notes track the intervals in the chord, which is based on the chord root. 
  292.    If there is a scale component to the MusicValue, the additional intervals 
  293.    are pulled from the scale and added.
  294.    If the chord does not have an interval to match the chord component of
  295.    the MusicValue, the note is silent.
  296. */
  297. #define DMUS_PLAYMODE_NORMALCHORD       (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
  298. /* If it is desirable to play a note that is above the top of the chord, the
  299.    always play mode (known as "purpleized" in a former life) finds a position
  300.    for the note by using intervals from the scale. Essentially, this mode is
  301.    a combination of the Normal and Melodic playback modes, where a failure
  302.    in Normal causes a second try in Melodic mode.
  303. */
  304. #define DMUS_PLAYMODE_ALWAYSPLAY        (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD)
  305.  
  306. /*  Legacy names for modes... */
  307. #define DMUS_PLAYMODE_PURPLEIZED        DMUS_PLAYMODE_ALWAYSPLAY
  308. #define DMUS_PLAYMODE_SCALE_ROOT        DMUS_PLAYMODE_KEY_ROOT
  309. #define DMUS_PLAYMODE_FIXEDTOSCALE      DMUS_PLAYMODE_FIXEDTOKEY
  310.  
  311.  
  312. /* DMUS_MIDI_PMSG */
  313. typedef struct _DMUS_MIDI_PMSG
  314. {
  315.     /* begin DMUS_PMSG_PART */
  316.     DMUS_PMSG_PART
  317.     /* end DMUS_PMSG_PART */
  318.  
  319.     BYTE    bStatus;
  320.     BYTE    bByte1;
  321.     BYTE    bByte2;
  322.     BYTE    bPad[1];
  323. } DMUS_MIDI_PMSG;
  324.  
  325. /* DMUS_PATCH_PMSG */
  326. typedef struct _DMUS_PATCH_PMSG
  327. {
  328.     /* begin DMUS_PMSG_PART */
  329.     DMUS_PMSG_PART
  330.     /* end DMUS_PMSG_PART */
  331.  
  332.     BYTE    byInstrument;
  333.     BYTE    byMSB;
  334.     BYTE    byLSB;
  335.     BYTE    byPad[1];
  336. } DMUS_PATCH_PMSG;
  337.  
  338. /* DMUS_TRANSPOSE_PMSG */
  339. typedef struct _DMUS_TRANSPOSE_PMSG
  340. {
  341.     /* begin DMUS_PMSG_PART */
  342.     DMUS_PMSG_PART
  343.     /* end DMUS_PMSG_PART */
  344.  
  345.     short   nTranspose;
  346. } DMUS_TRANSPOSE_PMSG;
  347.  
  348. /* DMUS_CHANNEL_PRIORITY_PMSG */
  349. typedef struct _DMUS_CHANNEL_PRIORITY_PMSG
  350. {
  351.     /* begin DMUS_PMSG_PART */
  352.     DMUS_PMSG_PART
  353.     /* end DMUS_PMSG_PART */
  354.  
  355.     DWORD   dwChannelPriority;
  356. } DMUS_CHANNEL_PRIORITY_PMSG;
  357.  
  358. /* DMUS_TEMPO_PMSG */
  359. typedef struct _DMUS_TEMPO_PMSG
  360. {
  361.     /* begin DMUS_PMSG_PART */
  362.     DMUS_PMSG_PART
  363.     /* end DMUS_PMSG_PART */
  364.  
  365.     double  dblTempo;                       /* the tempo */
  366. } DMUS_TEMPO_PMSG;
  367.  
  368. #define DMUS_TEMPO_MAX          1000
  369. #define DMUS_TEMPO_MIN          1
  370.  
  371. #define DMUS_MASTERTEMPO_MAX    100.0f
  372. #define DMUS_MASTERTEMPO_MIN    0.01f
  373.  
  374. /* DMUS_SYSEX_PMSG */
  375. typedef struct _DMUS_SYSEX_PMSG
  376. {
  377.     /* begin DMUS_PMSG_PART */
  378.     DMUS_PMSG_PART
  379.     /* end DMUS_PMSG_PART */
  380.  
  381.     DWORD   dwLen;          /* length of the data */
  382.     BYTE    abData[1];      /* array of data, length equal to dwLen */
  383. } DMUS_SYSEX_PMSG;
  384.  
  385. /* DMUS_CURVE_PMSG */
  386. typedef struct _DMUS_CURVE_PMSG
  387. {
  388.     /* begin DMUS_PMSG_PART */
  389.     DMUS_PMSG_PART
  390.     /* end DMUS_PMSG_PART */
  391.  
  392.     MUSIC_TIME      mtDuration;      /* how long this curve lasts */
  393.     MUSIC_TIME      mtOriginalStart; /* must be set to either zero when this PMSG is created or to the original mtTime of the curve */
  394.     MUSIC_TIME      mtResetDuration; /* how long after the curve is finished to reset to the
  395.                                         reset value, nResetValue */
  396.     short           nStartValue;     /* curve's start value */
  397.     short           nEndValue;       /* curve's end value */
  398.     short           nResetValue;     /* curve's reset value, sent after mtResetDuration or
  399.                                         upon a flush or invalidation */
  400.     WORD            wMeasure;        /* Measure in which this curve occurs */
  401.     short           nOffset;         /* Offset from grid at which this curve occurs */
  402.     BYTE            bBeat;           /* Beat (in measure) at which this curve occurs */
  403.     BYTE            bGrid;           /* Grid offset from beat at which this curve occurs */
  404.     BYTE            bType;           /* type of curve */
  405.     BYTE            bCurveShape;     /* shape of curve */
  406.     BYTE            bCCData;         /* CC# if this is a control change type */
  407.     BYTE            bFlags;          /* set to 1 if the nResetValue must be sent when the 
  408.                                         time is reached or an invalidate occurs because
  409.                                         of a transition. If 0, the curve stays
  410.                                         permanently stuck at the new value. All bits besides
  411.                                         1 are reserved. */
  412.  
  413. } DMUS_CURVE_PMSG;
  414.  
  415. typedef enum enumDMUS_CURVE_FLAGS
  416. {
  417.     DMUS_CURVE_RESET = 1,           /* Set if the curve needs to be reset. */
  418. } DMUS_CURVE_FLAGS;
  419.  
  420.  
  421. #define DMUS_CURVE_RESET    1        
  422.  
  423. /* Curve shapes */
  424. enum
  425.     DMUS_CURVES_LINEAR  = 0,
  426.     DMUS_CURVES_INSTANT = 1,
  427.     DMUS_CURVES_EXP     = 2,
  428.     DMUS_CURVES_LOG     = 3,
  429.     DMUS_CURVES_SINE    = 4
  430. };
  431. /* curve types */
  432. #define DMUS_CURVET_PBCURVE      0x03
  433. #define DMUS_CURVET_CCCURVE      0x04
  434. #define DMUS_CURVET_MATCURVE     0x05
  435. #define DMUS_CURVET_PATCURVE     0x06
  436.  
  437. /* DMUS_TIMESIG_PMSG */
  438. typedef struct _DMUS_TIMESIG_PMSG
  439. {
  440.     /* begin DMUS_PMSG_PART */
  441.     DMUS_PMSG_PART
  442.     /* end DMUS_PMSG_PART */
  443.  
  444.     /* Time signatures define how many beats per measure, which note receives */
  445.     /* the beat, and the grid resolution. */
  446.     BYTE    bBeatsPerMeasure;       /* beats per measure (top of time sig) */
  447.     BYTE    bBeat;                  /* what note receives the beat (bottom of time sig.) */
  448.                                     /* we can assume that 0 means 256th note */
  449.     WORD    wGridsPerBeat;          /* grids per beat */
  450. } DMUS_TIMESIG_PMSG;
  451.  
  452. /* notification type values */
  453. /* The following correspond to GUID_NOTIFICATION_SEGMENT */
  454. #define DMUS_NOTIFICATION_SEGSTART      0
  455. #define DMUS_NOTIFICATION_SEGEND        1
  456. #define DMUS_NOTIFICATION_SEGALMOSTEND  2
  457. #define DMUS_NOTIFICATION_SEGLOOP       3
  458. #define DMUS_NOTIFICATION_SEGABORT      4
  459. /* The following correspond to GUID_NOTIFICATION_PERFORMANCE */
  460. #define DMUS_NOTIFICATION_MUSICSTARTED  0
  461. #define DMUS_NOTIFICATION_MUSICSTOPPED  1
  462. /* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT */
  463. #define DMUS_NOTIFICATION_MEASUREBEAT   0
  464. /* The following corresponds to GUID_NOTIFICATION_CHORD */
  465. #define DMUS_NOTIFICATION_CHORD         0
  466. /* The following correspond to GUID_NOTIFICATION_COMMAND */
  467. #define DMUS_NOTIFICATION_GROOVE        0
  468. #define DMUS_NOTIFICATION_EMBELLISHMENT 1
  469.  
  470. /* DMUS_NOTIFICATION_PMSG */
  471. typedef struct _DMUS_NOTIFICATION_PMSG
  472. {
  473.     /* begin DMUS_PMSG_PART */
  474.     DMUS_PMSG_PART
  475.     /* end DMUS_PMSG_PART */
  476.  
  477.     GUID    guidNotificationType;
  478.     DWORD   dwNotificationOption;
  479.     DWORD   dwField1;
  480.     DWORD   dwField2;
  481. } DMUS_NOTIFICATION_PMSG;
  482.  
  483.  
  484. #define DMUS_MAX_NAME           64         /* Maximum object name length. */
  485. #define DMUS_MAX_CATEGORY       64         /* Maximum object category name length. */
  486. #define DMUS_MAX_FILENAME       MAX_PATH
  487.     
  488. typedef struct _DMUS_VERSION {
  489.   DWORD    dwVersionMS;
  490.   DWORD    dwVersionLS;
  491. }DMUS_VERSION, FAR *LPDMUS_VERSION;
  492.  
  493. /* Time Signature structure, used by IDirectMusicStyle */
  494. /* Also used as a parameter for GetParam() and SetParam */
  495. typedef struct _DMUS_TIMESIGNATURE
  496. {
  497.     MUSIC_TIME mtTime;
  498.     BYTE    bBeatsPerMeasure;       /* beats per measure (top of time sig) */
  499.     BYTE    bBeat;                  /* what note receives the beat (bottom of time sig.) */
  500.                                     /* we can assume that 0 means 256th note */
  501.     WORD    wGridsPerBeat;          /* grids per beat */
  502. } DMUS_TIMESIGNATURE;
  503.  
  504. /*      The DMUSOBJECTDESC structure is used to communicate everything you could */
  505. /*      possibly use to describe a DirectMusic object.  */
  506.  
  507. typedef struct _DMUS_OBJECTDESC
  508. {
  509.     DWORD          dwSize;                 /* Size of this structure. */
  510.     DWORD          dwValidData;            /* Flags indicating which fields below are valid. */
  511.     GUID           guidObject;             /* Unique ID for this object. */
  512.     GUID           guidClass;              /* GUID for the class of object. */
  513.     FILETIME       ftDate;                 /* Last edited date of object. */
  514.     DMUS_VERSION   vVersion;               /* Version. */
  515.     WCHAR          wszName[DMUS_MAX_NAME]; /* Name of object. */
  516.     WCHAR          wszCategory[DMUS_MAX_CATEGORY]; /* Category for object (optional). */
  517.     WCHAR          wszFileName[DMUS_MAX_FILENAME]; /* File path. */
  518.     LONGLONG       llMemLength;            /* Size of Memory data. */
  519.     LPBYTE         pbMemData;              /* Memory pointer for data. */
  520. } DMUS_OBJECTDESC;
  521.  
  522. typedef DMUS_OBJECTDESC *LPDMUS_OBJECTDESC;
  523.  
  524. /*      Flags for dwValidData. When set, a flag indicates that the  */
  525. /*      corresponding field in DMUSOBJECTDESC holds valid data. */
  526.  
  527. #define DMUS_OBJ_OBJECT         (1 << 0)     /* Object GUID is valid. */
  528. #define DMUS_OBJ_CLASS          (1 << 1)     /* Class GUID is valid. */
  529. #define DMUS_OBJ_NAME           (1 << 2)     /* Name is valid. */
  530. #define DMUS_OBJ_CATEGORY       (1 << 3)     /* Category is valid. */
  531. #define DMUS_OBJ_FILENAME       (1 << 4)     /* File path is valid. */
  532. #define DMUS_OBJ_FULLPATH       (1 << 5)     /* Path is full path. */
  533. #define DMUS_OBJ_URL            (1 << 6)     /* Path is URL. */
  534. #define DMUS_OBJ_VERSION        (1 << 7)     /* Version is valid. */
  535. #define DMUS_OBJ_DATE           (1 << 8)     /* Date is valid. */
  536. #define DMUS_OBJ_LOADED         (1 << 9)     /* Object is currently loaded in memory. */
  537. #define DMUS_OBJ_MEMORY         (1 << 10)    /* Object is pointed to by pbMemData. */
  538.  
  539. typedef IDirectMusicObject __RPC_FAR *LPDMUS_OBJECT;
  540. typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER;
  541. typedef IDirectMusicBand __RPC_FAR *LPDMUS_BAND;
  542.  
  543.  
  544. #define DMUSB_LOADED    (1 << 0)        /* Set when band has been loaded */
  545. #define DMUSB_DEFAULT   (1 << 1)        /* Set when band is default band for a style */
  546.  
  547. #undef  INTERFACE
  548. #define INTERFACE  IDirectMusicBand
  549. DECLARE_INTERFACE_(IDirectMusicBand, IUnknown)
  550. {
  551.     /* IUnknown */
  552.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  553.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  554.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  555.  
  556.     /* IDirectMusicBand */
  557.     STDMETHOD(CreateSegment)        (THIS_ IDirectMusicSegment** ppSegment) PURE;
  558.     STDMETHOD(Download)             (THIS_ IDirectMusicPerformance* pPerformance) PURE;     
  559.     STDMETHOD(Unload)               (THIS_ IDirectMusicPerformance* pPerformance) PURE;     
  560. };
  561.  
  562. #undef  INTERFACE
  563. #define INTERFACE  IDirectMusicObject
  564. DECLARE_INTERFACE_(IDirectMusicObject, IUnknown)
  565. {
  566.     /* IUnknown */
  567.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  568.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  569.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  570.  
  571.     /* IDirectMusicObject */
  572.     STDMETHOD(GetDescriptor)        (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  573.     STDMETHOD(SetDescriptor)        (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  574.     STDMETHOD(ParseDescriptor)      (THIS_ LPSTREAM pStream, 
  575.                                            LPDMUS_OBJECTDESC pDesc) PURE;
  576. };
  577.  
  578. #undef  INTERFACE
  579. #define INTERFACE  IDirectMusicLoader
  580. DECLARE_INTERFACE_(IDirectMusicLoader, IUnknown)
  581. {
  582.     /* IUnknown */
  583.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  584.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  585.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  586.  
  587.     /* IDirectMusicLoader */
  588.     STDMETHOD(GetObject)            (THIS_ LPDMUS_OBJECTDESC pDesc,
  589.                                            REFIID riid,
  590.                                            LPVOID FAR *ppv) PURE;
  591.     STDMETHOD(SetObject)            (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
  592.     STDMETHOD(SetSearchDirectory)   (THIS_ REFGUID rguidClass, 
  593.                                            WCHAR *pwzPath, 
  594.                                            BOOL fClear) PURE;
  595.     STDMETHOD(ScanDirectory)        (THIS_ REFGUID rguidClass, 
  596.                                            WCHAR *pwzFileExtension, 
  597.                                            WCHAR *pwzScanFileName) PURE;
  598.     STDMETHOD(CacheObject)          (THIS_ IDirectMusicObject * pObject) PURE;
  599.     STDMETHOD(ReleaseObject)        (THIS_ IDirectMusicObject * pObject) PURE;
  600.     STDMETHOD(ClearCache)           (THIS_ REFGUID rguidClass) PURE;
  601.     STDMETHOD(EnableCache)          (THIS_ REFGUID rguidClass, 
  602.                                            BOOL fEnable) PURE;
  603.     STDMETHOD(EnumObject)           (THIS_ REFGUID rguidClass, 
  604.                                            DWORD dwIndex, 
  605.                                            LPDMUS_OBJECTDESC pDesc) PURE;
  606. };                                  
  607.  
  608. /*  Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. */
  609.  
  610. #undef  INTERFACE
  611. #define INTERFACE  IDirectMusicGetLoader
  612. DECLARE_INTERFACE_(IDirectMusicGetLoader, IUnknown)
  613. {
  614.     /* IUnknown */
  615.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  616.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  617.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  618.  
  619.     /* IDirectMusicGetLoader */
  620.     STDMETHOD(GetLoader)            (THIS_ IDirectMusicLoader ** ppLoader) PURE;
  621. };
  622.  
  623. /*////////////////////////////////////////////////////////////////////
  624. // IDirectMusicSegment */
  625. #undef  INTERFACE
  626. #define INTERFACE  IDirectMusicSegment
  627. DECLARE_INTERFACE_(IDirectMusicSegment, IUnknown)
  628. {
  629.     /*  IUnknown */
  630.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  631.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  632.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  633.  
  634.     /*  IDirectMusicSegment */
  635.     STDMETHOD(GetLength)                (THIS_ MUSIC_TIME* pmtLength) PURE;
  636.     STDMETHOD(SetLength)                (THIS_ MUSIC_TIME mtLength) PURE;
  637.     STDMETHOD(GetRepeats)               (THIS_ DWORD* pdwRepeats) PURE;
  638.     STDMETHOD(SetRepeats)               (THIS_ DWORD  dwRepeats) PURE;
  639.     STDMETHOD(GetDefaultResolution)     (THIS_ DWORD* pdwResolution) PURE;
  640.     STDMETHOD(SetDefaultResolution)     (THIS_ DWORD  dwResolution) PURE;
  641.     STDMETHOD(GetTrack)                 (THIS_ REFGUID rguidType, 
  642.                                                DWORD dwGroupBits, 
  643.                                                DWORD dwIndex, 
  644.                                                IDirectMusicTrack** ppTrack) PURE;
  645.     STDMETHOD(GetTrackGroup)            (THIS_ IDirectMusicTrack* pTrack, 
  646.                                                DWORD* pdwGroupBits) PURE;
  647.     STDMETHOD(InsertTrack)              (THIS_ IDirectMusicTrack* pTrack, 
  648.                                                DWORD dwGroupBits) PURE;
  649.     STDMETHOD(RemoveTrack)              (THIS_ IDirectMusicTrack* pTrack) PURE;
  650.     STDMETHOD(InitPlay)                 (THIS_ IDirectMusicSegmentState** ppSegState, 
  651.                                                IDirectMusicPerformance* pPerformance,
  652.                                                DWORD dwFlags) PURE;
  653.     STDMETHOD(GetGraph)                 (THIS_ IDirectMusicGraph** ppGraph) PURE;
  654.     STDMETHOD(SetGraph)                 (THIS_ IDirectMusicGraph* pGraph) PURE;
  655.     STDMETHOD(AddNotificationType)      (THIS_ REFGUID rguidNotificationType) PURE;
  656.     STDMETHOD(RemoveNotificationType)   (THIS_ REFGUID rguidNotificationType) PURE;
  657.     STDMETHOD(GetParam)                 (THIS_ REFGUID rguidType, 
  658.                                                DWORD dwGroupBits, 
  659.                                                DWORD dwIndex, 
  660.                                                MUSIC_TIME mtTime, 
  661.                                                MUSIC_TIME* pmtNext, 
  662.                                                void* pParam) PURE; 
  663.     STDMETHOD(SetParam)                 (THIS_ REFGUID rguidType, 
  664.                                                DWORD dwGroupBits, 
  665.                                                DWORD dwIndex, 
  666.                                                MUSIC_TIME mtTime, 
  667.                                                void* pParam) PURE;
  668.     STDMETHOD(Clone)                    (THIS_ MUSIC_TIME mtStart, 
  669.                                                MUSIC_TIME mtEnd, 
  670.                                                IDirectMusicSegment** ppSegment) PURE;
  671.     STDMETHOD(SetStartPoint)            (THIS_ MUSIC_TIME mtStart) PURE;
  672.     STDMETHOD(GetStartPoint)            (THIS_ MUSIC_TIME* pmtStart) PURE;
  673.     STDMETHOD(SetLoopPoints)            (THIS_ MUSIC_TIME mtStart, 
  674.                                                MUSIC_TIME mtEnd) PURE;
  675.     STDMETHOD(GetLoopPoints)            (THIS_ MUSIC_TIME* pmtStart, 
  676.                                                MUSIC_TIME* pmtEnd) PURE;
  677.     STDMETHOD(SetPChannelsUsed)         (THIS_ DWORD dwNumPChannels, 
  678.                                                DWORD* paPChannels) PURE;
  679. };
  680.  
  681. /*/////////////////////////////////////////////////////////////////////
  682. // IDirectMusicSegmentState */
  683. #undef  INTERFACE
  684. #define INTERFACE  IDirectMusicSegmentState
  685. DECLARE_INTERFACE_(IDirectMusicSegmentState, IUnknown)
  686. {
  687.     /*  IUnknown */
  688.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  689.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  690.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  691.  
  692.     /*  IDirectMusicSegmentState */
  693.     STDMETHOD(GetRepeats)           (THIS_ DWORD* pdwRepeats) PURE;
  694.     STDMETHOD(GetSegment )          (THIS_ IDirectMusicSegment** ppSegment) PURE;
  695.     STDMETHOD(GetStartTime)         (THIS_ MUSIC_TIME* pmtStart) PURE;
  696.     STDMETHOD(GetSeek)              (THIS_ MUSIC_TIME* pmtSeek) PURE;
  697.     STDMETHOD(GetStartPoint)        (THIS_ MUSIC_TIME* pmtStart) PURE;
  698. };
  699.  
  700. /*////////////////////////////////////////////////////////////////////
  701. // IDirectMusicTrack */
  702. #undef  INTERFACE
  703. #define INTERFACE  IDirectMusicTrack
  704. DECLARE_INTERFACE_(IDirectMusicTrack, IUnknown)
  705. {
  706.     /*  IUnknown */
  707.     STDMETHOD(QueryInterface)         (THIS_ REFIID, LPVOID FAR *) PURE;
  708.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  709.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  710.  
  711.     /*  IDirectMusicTrack */
  712.     STDMETHOD(Init)                   (THIS_ IDirectMusicSegment* pSegment) PURE;
  713.     STDMETHOD(InitPlay)               (THIS_ IDirectMusicSegmentState* pSegmentState, 
  714.                                              IDirectMusicPerformance* pPerformance, 
  715.                                              void** ppStateData, 
  716.                                              DWORD dwVirtualTrackID,
  717.                                              DWORD dwFlags) PURE;
  718.     STDMETHOD(EndPlay)                (THIS_ void* pStateData) PURE;
  719.     STDMETHOD(Play)                   (THIS_ void* pStateData, 
  720.                                              MUSIC_TIME mtStart, 
  721.                                              MUSIC_TIME mtEnd, 
  722.                                              MUSIC_TIME mtOffset, 
  723.                                              DWORD dwFlags, 
  724.                                              IDirectMusicPerformance* pPerf, 
  725.                                              IDirectMusicSegmentState* pSegSt, 
  726.                                              DWORD dwVirtualID) PURE;
  727.     STDMETHOD(GetParam)               (THIS_ REFGUID rguidType, 
  728.                                              MUSIC_TIME mtTime, 
  729.                                              MUSIC_TIME* pmtNext, 
  730.                                              void* pParam) PURE; 
  731.     STDMETHOD(SetParam)               (THIS_ REFGUID rguidType, 
  732.                                              MUSIC_TIME mtTime, 
  733.                                              void* pParam) PURE;
  734.     STDMETHOD(IsParamSupported)       (THIS_ REFGUID rguidType) PURE;
  735.     STDMETHOD(AddNotificationType)    (THIS_ REFGUID rguidNotificationType) PURE;
  736.     STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
  737.     STDMETHOD(Clone)                  (THIS_ MUSIC_TIME mtStart, 
  738.                                              MUSIC_TIME mtEnd, 
  739.                                              IDirectMusicTrack** ppTrack) PURE;
  740. };
  741.  
  742. /*////////////////////////////////////////////////////////////////////
  743. // IDirectMusicPerformance */
  744. #undef  INTERFACE
  745. #define INTERFACE  IDirectMusicPerformance
  746. DECLARE_INTERFACE_(IDirectMusicPerformance, IUnknown)
  747. {
  748.     /*  IUnknown */
  749.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  750.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  751.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  752.  
  753.     /*  IDirectMusicPerformance */
  754.     STDMETHOD(Init)                 (THIS_ IDirectMusic** ppDirectMusic,
  755.                                            LPDIRECTSOUND pDirectSound,
  756.                                            HWND hWnd) PURE;
  757.     STDMETHOD(PlaySegment)          (THIS_ IDirectMusicSegment* pSegment, 
  758.                                            DWORD dwFlags, 
  759.                                            __int64 i64StartTime, 
  760.                                            IDirectMusicSegmentState** ppSegmentState) PURE;
  761.     STDMETHOD(Stop)                 (THIS_ IDirectMusicSegment* pSegment, 
  762.                                            IDirectMusicSegmentState* pSegmentState, 
  763.                                            MUSIC_TIME mtTime, 
  764.                                            DWORD dwFlags) PURE;
  765.     STDMETHOD(GetSegmentState)      (THIS_ IDirectMusicSegmentState** ppSegmentState, 
  766.                                            MUSIC_TIME mtTime) PURE;
  767.     STDMETHOD(SetPrepareTime)       (THIS_ DWORD dwMilliSeconds) PURE;
  768.     STDMETHOD(GetPrepareTime)       (THIS_ DWORD* pdwMilliSeconds) PURE;
  769.     STDMETHOD(SetBumperLength)      (THIS_ DWORD dwMilliSeconds) PURE;
  770.     STDMETHOD(GetBumperLength)      (THIS_ DWORD* pdwMilliSeconds) PURE;
  771.     STDMETHOD(SendPMsg)             (THIS_ DMUS_PMSG* pPMSG) PURE;
  772.     STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime, 
  773.                                            REFERENCE_TIME* prtTime) PURE;
  774.     STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime, 
  775.                                            MUSIC_TIME* pmtTime) PURE;
  776.     STDMETHOD(IsPlaying)            (THIS_ IDirectMusicSegment* pSegment, 
  777.                                            IDirectMusicSegmentState* pSegState) PURE;
  778.     STDMETHOD(GetTime)              (THIS_ REFERENCE_TIME* prtNow, 
  779.                                            MUSIC_TIME* pmtNow) PURE;
  780.     STDMETHOD(AllocPMsg)            (THIS_ ULONG cb, 
  781.                                            DMUS_PMSG** ppPMSG) PURE;
  782.     STDMETHOD(FreePMsg)             (THIS_ DMUS_PMSG* pPMSG) PURE;
  783.     STDMETHOD(GetGraph)             (THIS_ IDirectMusicGraph** ppGraph) PURE;
  784.     STDMETHOD(SetGraph)             (THIS_ IDirectMusicGraph* pGraph) PURE;
  785.     STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, 
  786.                                            REFERENCE_TIME rtMinimum) PURE;
  787.     STDMETHOD(GetNotificationPMsg)  (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE;
  788.     STDMETHOD(AddNotificationType)  (THIS_ REFGUID rguidNotificationType) PURE;
  789.     STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE;
  790.     STDMETHOD(AddPort)              (THIS_ IDirectMusicPort* pPort) PURE;
  791.     STDMETHOD(RemovePort)           (THIS_ IDirectMusicPort* pPort ) PURE;
  792.     STDMETHOD(AssignPChannelBlock)  (THIS_ DWORD dwBlockNum, 
  793.                                            IDirectMusicPort* pPort, 
  794.                                            DWORD dwGroup ) PURE;
  795.     STDMETHOD(AssignPChannel)       (THIS_ DWORD dwPChannel, 
  796.                                            IDirectMusicPort* pPort, 
  797.                                            DWORD dwGroup, 
  798.                                            DWORD dwMChannel ) PURE;
  799.     STDMETHOD(PChannelInfo)         (THIS_ DWORD dwPChannel, 
  800.                                            IDirectMusicPort** ppPort, 
  801.                                            DWORD* pdwGroup, 
  802.                                            DWORD* pdwMChannel ) PURE;
  803.     STDMETHOD(DownloadInstrument)   (THIS_ IDirectMusicInstrument* pInst, 
  804.                                            DWORD dwPChannel, 
  805.                                            IDirectMusicDownloadedInstrument** ppDownInst, 
  806.                                            DMUS_NOTERANGE* pNoteRanges, 
  807.                                            DWORD dwNumNoteRanges, 
  808.                                            IDirectMusicPort** ppPort, 
  809.                                            DWORD* pdwGroup, 
  810.                                            DWORD* pdwMChannel ) PURE;
  811.     STDMETHOD(Invalidate)           (THIS_ MUSIC_TIME mtTime, 
  812.                                            DWORD dwFlags) PURE;
  813.     STDMETHOD(GetParam)             (THIS_ REFGUID rguidType, 
  814.                                            DWORD dwGroupBits, 
  815.                                            DWORD dwIndex, 
  816.                                            MUSIC_TIME mtTime, 
  817.                                            MUSIC_TIME* pmtNext, 
  818.                                            void* pParam) PURE; 
  819.     STDMETHOD(SetParam)             (THIS_ REFGUID rguidType, 
  820.                                            DWORD dwGroupBits, 
  821.                                            DWORD dwIndex, 
  822.                                            MUSIC_TIME mtTime, 
  823.                                            void* pParam) PURE;
  824.     STDMETHOD(GetGlobalParam)       (THIS_ REFGUID rguidType, 
  825.                                            void* pParam, 
  826.                                            DWORD dwSize) PURE;
  827.     STDMETHOD(SetGlobalParam)       (THIS_ REFGUID rguidType, 
  828.                                            void* pParam, 
  829.                                            DWORD dwSize) PURE;
  830.     STDMETHOD(GetLatencyTime)       (THIS_ REFERENCE_TIME* prtTime) PURE;
  831.     STDMETHOD(GetQueueTime)         (THIS_ REFERENCE_TIME* prtTime) PURE;
  832.     STDMETHOD(AdjustTime)           (THIS_ REFERENCE_TIME rtAmount) PURE;
  833.     STDMETHOD(CloseDown)            (THIS) PURE;
  834.     STDMETHOD(GetResolvedTime)      (THIS_ REFERENCE_TIME rtTime,
  835.                                            REFERENCE_TIME* prtResolved,
  836.                                            DWORD dwTimeResolveFlags) PURE;
  837.     STDMETHOD(MIDIToMusic)          (THIS_ BYTE bMIDIValue,
  838.                                            DMUS_CHORD_KEY* pChord,
  839.                                            BYTE bPlayMode,
  840.                                            BYTE bChordLevel,
  841.                                            WORD *pwMusicValue) PURE;
  842.     STDMETHOD(MusicToMIDI)          (THIS_ WORD wMusicValue,
  843.                                            DMUS_CHORD_KEY* pChord,
  844.                                            BYTE bPlayMode,
  845.                                            BYTE bChordLevel,
  846.                                            BYTE *pbMIDIValue) PURE;
  847.     STDMETHOD(TimeToRhythm)         (THIS_ MUSIC_TIME mtTime,
  848.                                            DMUS_TIMESIGNATURE *pTimeSig,
  849.                                            WORD *pwMeasure,
  850.                                            BYTE *pbBeat,
  851.                                            BYTE *pbGrid,
  852.                                            short *pnOffset) PURE;
  853.     STDMETHOD(RhythmToTime)         (THIS_ WORD wMeasure,
  854.                                            BYTE bBeat,
  855.                                            BYTE bGrid,
  856.                                            short nOffset,
  857.                                            DMUS_TIMESIGNATURE *pTimeSig,
  858.                                            MUSIC_TIME *pmtTime) PURE;                                        
  859. };
  860.  
  861. /*////////////////////////////////////////////////////////////////////
  862. // IDirectMusicTool */
  863. #undef  INTERFACE
  864. #define INTERFACE  IDirectMusicTool
  865. DECLARE_INTERFACE_(IDirectMusicTool, IUnknown)
  866. {
  867.     /*  IUnknown */
  868.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  869.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  870.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  871.  
  872.     /*  IDirectMusicTool */
  873.     STDMETHOD(Init)                 (THIS_ IDirectMusicGraph* pGraph) PURE;
  874.     STDMETHOD(GetMsgDeliveryType)   (THIS_ DWORD* pdwDeliveryType ) PURE;
  875.     STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE;
  876.     STDMETHOD(GetMediaTypes)        (THIS_ DWORD** padwMediaTypes, 
  877.                                            DWORD dwNumElements) PURE;
  878.     STDMETHOD(ProcessPMsg)          (THIS_ IDirectMusicPerformance* pPerf, 
  879.                                            DMUS_PMSG* pPMSG) PURE;
  880.     STDMETHOD(Flush)                (THIS_ IDirectMusicPerformance* pPerf, 
  881.                                            DMUS_PMSG* pPMSG, 
  882.                                            REFERENCE_TIME rtTime) PURE;
  883. };
  884.  
  885. /*////////////////////////////////////////////////////////////////////
  886. // IDirectMusicGraph */
  887. #undef  INTERFACE
  888. #define INTERFACE  IDirectMusicGraph
  889. DECLARE_INTERFACE_(IDirectMusicGraph, IUnknown)
  890. {
  891.     /*  IUnknown */
  892.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  893.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  894.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  895.  
  896.     /*  IDirectMusicGraph */
  897.     STDMETHOD(StampPMsg)            (THIS_ DMUS_PMSG* pPMSG) PURE;
  898.     STDMETHOD(InsertTool)           (THIS_ IDirectMusicTool* pTool, 
  899.                                            DWORD* pdwPChannels, 
  900.                                            DWORD cPChannels, 
  901.                                            LONG lIndex) PURE;
  902.     STDMETHOD(GetTool)              (THIS_ DWORD dwIndex, 
  903.                                            IDirectMusicTool** ppTool) PURE;
  904.     STDMETHOD(RemoveTool)           (THIS_ IDirectMusicTool* pTool) PURE;
  905. };
  906.  
  907. /*/////////////////////////////////////////////////////////////////////
  908. // IDirectMusicStyle */
  909. #undef  INTERFACE
  910. #define INTERFACE  IDirectMusicStyle
  911. DECLARE_INTERFACE_(IDirectMusicStyle, IUnknown)
  912. {
  913.     /*  IUnknown */
  914.     STDMETHOD(QueryInterface)         (THIS_ REFIID, LPVOID FAR *) PURE;
  915.     STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
  916.     STDMETHOD_(ULONG,Release)         (THIS) PURE;
  917.  
  918.     /*  IDirectMusicStyle */
  919.     STDMETHOD(GetBand)                (THIS_ WCHAR* pwszName, 
  920.                                              IDirectMusicBand** ppBand) PURE;
  921.     STDMETHOD(EnumBand)               (THIS_ DWORD dwIndex, 
  922.                                              WCHAR *pwszName) PURE;
  923.     STDMETHOD(GetDefaultBand)         (THIS_ IDirectMusicBand** ppBand) PURE;
  924.     STDMETHOD(EnumMotif)              (THIS_ DWORD dwIndex, 
  925.                                              WCHAR* pwszName) PURE;
  926.     STDMETHOD(GetMotif)               (THIS_ WCHAR* pwszName, 
  927.                                              IDirectMusicSegment** ppSegment) PURE;
  928.     STDMETHOD(GetDefaultChordMap)     (THIS_ IDirectMusicChordMap** ppChordMap) PURE;
  929.     STDMETHOD(EnumChordMap)           (THIS_ DWORD dwIndex, 
  930.                                              WCHAR *pwszName) PURE;
  931.     STDMETHOD(GetChordMap)            (THIS_ WCHAR* pwszName, 
  932.                                              IDirectMusicChordMap** ppChordMap) PURE;
  933.     STDMETHOD(GetTimeSignature)       (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE;
  934.     STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType, 
  935.                                              DWORD dwLevel, 
  936.                                              DWORD* pdwMin, 
  937.                                              DWORD* pdwMax) PURE;
  938.     STDMETHOD(GetTempo)               (THIS_ double* pTempo) PURE;
  939. };
  940.  
  941. /*/////////////////////////////////////////////////////////////////////
  942. // IDirectMusicChordMap */
  943. #undef  INTERFACE
  944. #define INTERFACE  IDirectMusicChordMap
  945. DECLARE_INTERFACE_(IDirectMusicChordMap, IUnknown)
  946. {
  947.     /*  IUnknown */
  948.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
  949.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  950.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  951.  
  952.     /*  IDirectMusicChordMap */
  953.     STDMETHOD(GetScale)             (THIS_ DWORD* pdwScale) PURE;
  954. };
  955.  
  956. /*/////////////////////////////////////////////////////////////////////
  957. // IDirectMusicComposer */
  958. #undef  INTERFACE
  959. #define INTERFACE  IDirectMusicComposer
  960. DECLARE_INTERFACE_(IDirectMusicComposer, IUnknown)
  961. {
  962.     /*  IUnknown */
  963.     STDMETHOD(QueryInterface)               (THIS_ REFIID, LPVOID FAR *) PURE;
  964.     STDMETHOD_(ULONG,AddRef)                (THIS) PURE;
  965.     STDMETHOD_(ULONG,Release)               (THIS) PURE;
  966.  
  967.     /*  IDirectMusicComposer */
  968.     STDMETHOD(ComposeSegmentFromTemplate)   (THIS_ IDirectMusicStyle* pStyle, 
  969.                                                    IDirectMusicSegment* pTemplate, 
  970.                                                    WORD wActivity, 
  971.                                                    IDirectMusicChordMap* pChordMap, 
  972.                                                    IDirectMusicSegment** ppSegment) PURE;
  973.     STDMETHOD(ComposeSegmentFromShape)      (THIS_ IDirectMusicStyle* pStyle, 
  974.                                                    WORD wNumMeasures, 
  975.                                                    WORD wShape, 
  976.                                                    WORD wActivity, 
  977.                                                    BOOL fIntro, 
  978.                                                    BOOL fEnd, 
  979.                                                    IDirectMusicChordMap* pChordMap, 
  980.                                                    IDirectMusicSegment** ppSegment ) PURE;
  981.     STDMETHOD(ComposeTransition)            (THIS_ IDirectMusicSegment* pFromSeg, 
  982.                                                    IDirectMusicSegment* pToSeg, 
  983.                                                    MUSIC_TIME mtTime, 
  984.                                                    WORD wCommand, 
  985.                                                    DWORD dwFlags, 
  986.                                                    IDirectMusicChordMap* pChordMap, 
  987.                                                    IDirectMusicSegment** ppTransSeg) PURE;
  988.     STDMETHOD(AutoTransition)               (THIS_ IDirectMusicPerformance* pPerformance, 
  989.                                                    IDirectMusicSegment* pToSeg, 
  990.                                                    WORD wCommand, 
  991.                                                    DWORD dwFlags, 
  992.                                                    IDirectMusicChordMap* pChordMap, 
  993.                                                    IDirectMusicSegment** ppTransSeg, 
  994.                                                    IDirectMusicSegmentState** ppToSegState, 
  995.                                                    IDirectMusicSegmentState** ppTransSegState) PURE;
  996.     STDMETHOD(ComposeTemplateFromShape)     (THIS_ WORD wNumMeasures, 
  997.                                                    WORD wShape, 
  998.                                                    BOOL fIntro, 
  999.                                                    BOOL fEnd, 
  1000.                                                    WORD wEndLength, 
  1001.                                                    IDirectMusicSegment** ppTemplate) PURE;
  1002.     STDMETHOD(ChangeChordMap)            (THIS_ IDirectMusicSegment* pSegment, 
  1003.                                                    BOOL fTrackScale, 
  1004.                                                    IDirectMusicChordMap* pChordMap) PURE;
  1005. };
  1006.  
  1007. /* CLSID's */
  1008. DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1009. DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1010. DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1011. DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1012. DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1013. DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1014. DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1015. DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1016. DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1017. DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1018. DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1019. DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1020. DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1021. DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1022. DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1023. DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1024. DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1025. DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1026. DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00, 0xb6ee, 0x11d1, 0x86, 0xbe, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef);
  1027. DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1028. DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1029.  
  1030. /* Special GUID for all object types. This is used by the loader. */
  1031. DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1032.  
  1033. /* Notification guids */
  1034. DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1035. DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5, 0x4e5d, 0x11d2, 0xbc, 0xc7, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1036. DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1037. DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1038. DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1039.  
  1040. /* Track param type guids */
  1041. /* Use to get/set a DMUS_COMMAND_PARAM param in the Command track */
  1042. DEFINE_GUID(GUID_CommandParam,0xd2ac289d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1043.  
  1044. /* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track */
  1045. DEFINE_GUID(GUID_CommandParam2, 0x28f97ef7, 0x9538, 0x11d2, 0x97, 0xa9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1046.  
  1047. /* Use to get/set a DMUS_CHORD_PARAM param in the Chord track */
  1048. DEFINE_GUID(GUID_ChordParam,0xd2ac289e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1049.  
  1050. /* Use to get a DMUS_RHYTHM_PARAM param in the Chord track */
  1051. DEFINE_GUID(GUID_RhythmParam,0xd2ac289f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1052.  
  1053. /* Use to get/set an IDirectMusicStyle param in the Style track */
  1054. DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1055.  
  1056. /* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks */
  1057. DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1058.  
  1059. /* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track */
  1060. DEFINE_GUID(GUID_TempoParam,0xd2ac28a5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1061.  
  1062. /* Use to set an IDirectMusicBand param in the Band track */
  1063. DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1064.  
  1065. /* Use to get/set an IDirectMusicChordMap param in the ChordMap track */
  1066. DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1067.  
  1068. /* Use to get/set a DMUS_MUTE_PARAM param in the Mute track */
  1069. DEFINE_GUID(GUID_MuteParam,0xd2ac28af, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1070.  
  1071. /* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
  1072.  */
  1073. /* Download bands for the IDirectMusicSegment */
  1074. DEFINE_GUID(GUID_Download,0xd2ac28a7, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1075.  
  1076. /* Unload bands for the IDirectMusicSegment */
  1077. DEFINE_GUID(GUID_Unload,0xd2ac28a8, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1078.  
  1079. /* Connect segment's bands to an IDirectMusicCollection */
  1080. DEFINE_GUID(GUID_ConnectToDLSCollection, 0x1db1ae6b, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1081.  
  1082. /* Enable/disable autodownloading of bands */
  1083. DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1084. DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1085.  
  1086. /* Clear all bands */
  1087. DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1088.  
  1089. /* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file */
  1090. DEFINE_GUID(GUID_StandardMIDIFile, 0x6621075, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e);
  1091. /* For compatibility with beta releases... */
  1092. #define GUID_IgnoreBankSelectForGM     GUID_StandardMIDIFile
  1093.  
  1094. /* Disable/enable param guids. Use these in SetParam calls to disable or enable sending
  1095.  * specific PMsg types.
  1096.  */
  1097. DEFINE_GUID(GUID_DisableTimeSig, 0x45fc707b, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1098. DEFINE_GUID(GUID_EnableTimeSig, 0x45fc707c, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1099. DEFINE_GUID(GUID_DisableTempo, 0x45fc707d, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1100. DEFINE_GUID(GUID_EnableTempo, 0x45fc707e, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1101.  
  1102. /* Used in SetParam calls for pattern-based tracks.  A nonzero value seeds the random number 
  1103. generator for variation selection; a value of zero reverts to the default behavior of 
  1104. getting the seed from the system clock.
  1105. */
  1106. DEFINE_GUID(GUID_SeedVariations, 0x65b76fa5, 0xff37, 0x11d2, 0x81, 0x4e, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58);
  1107.  
  1108. /* Global data guids */
  1109. DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1110. DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1111. DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1112. DEFINE_GUID(GUID_PerfAutoDownload, 0xfb09565b, 0x3631, 0x11d2, 0xbc, 0xb8, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1113.  
  1114. /* GUID for default GM/GS dls collection. */
  1115. DEFINE_GUID(GUID_DefaultGMCollection, 0xf17e8673, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1116.  
  1117. /* IID's */
  1118. DEFINE_GUID(IID_IDirectMusicLoader, 0x2ffaaca2, 0x5dca, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1119. DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844, 0xd13d, 0x11d1, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1120. DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1121. DEFINE_GUID(IID_IDirectMusicSegment, 0xf96029a2, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1122. DEFINE_GUID(IID_IDirectMusicSegmentState, 0xa3afdcc7, 0xd3ee, 0x11d1, 0xbc, 0x8d, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1123. DEFINE_GUID(IID_IDirectMusicTrack, 0xf96029a1, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1124. DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03, 0x6523, 0x11d2, 0x87, 0x1d, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1125. DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1126. DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277, 0x5497, 0x11d2, 0xbc, 0xcb, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb);
  1127. DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1128. DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1129. DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1130. DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1131.  
  1132. /* Alternate interface IDs, available in DX7 release and after. */
  1133. DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
  1134. DEFINE_GUID(IID_IDirectMusicSegment2, 0xd38894d1, 0xc052, 0x11d2, 0x87, 0x2f, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
  1135.  
  1136. #ifdef __cplusplus
  1137. }; /* extern "C" */
  1138. #endif
  1139.  
  1140. #include <poppack.h>
  1141.  
  1142. #pragma option pop /*P_O_Pop*/
  1143. #endif /* #ifndef _DMUSICI_ */
  1144.