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

  1. /************************************************************************
  2. *                                                                       *
  3. *   dmusicf.h -- This module defines the DirectMusic file formats       *
  4. *                                                                       *
  5. *   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
  6. *                                                                       *
  7. ************************************************************************/
  8.  
  9. #ifndef _DMUSICF_
  10. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  11. #define _DMUSICF_
  12.  
  13. #include <windows.h>
  14.  
  15. #define COM_NO_WINDOWS_H
  16. #include <objbase.h>
  17.  
  18. #include <mmsystem.h>
  19.  
  20. #include <pshpack8.h>
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. interface IDirectMusicCollection;
  27. #ifndef __cplusplus 
  28. typedef interface IDirectMusicCollection IDirectMusicCollection;
  29. #endif
  30.  
  31. /* Common chunks */
  32.  
  33. #define DMUS_FOURCC_GUID_CHUNK        mmioFOURCC('g','u','i','d')
  34. #define DMUS_FOURCC_INFO_LIST         mmioFOURCC('I','N','F','O')
  35. #define DMUS_FOURCC_UNFO_LIST         mmioFOURCC('U','N','F','O')
  36. #define DMUS_FOURCC_UNAM_CHUNK         mmioFOURCC('U','N','A','M')
  37. #define DMUS_FOURCC_UART_CHUNK         mmioFOURCC('U','A','R','T')
  38. #define DMUS_FOURCC_UCOP_CHUNK         mmioFOURCC('U','C','O','P')
  39. #define DMUS_FOURCC_USBJ_CHUNK         mmioFOURCC('U','S','B','J')
  40. #define DMUS_FOURCC_UCMT_CHUNK         mmioFOURCC('U','C','M','T')
  41. #define DMUS_FOURCC_CATEGORY_CHUNK    mmioFOURCC('c','a','t','g')
  42. #define DMUS_FOURCC_VERSION_CHUNK     mmioFOURCC('v','e','r','s')
  43.  
  44. /* The following structures are used by the Tracks, and are the packed structures */
  45. /* that are passed to the Tracks inside the IStream. */
  46.  
  47.  
  48. typedef struct _DMUS_IO_SEQ_ITEM
  49. {
  50.     MUSIC_TIME    mtTime;
  51.     MUSIC_TIME    mtDuration;
  52.     DWORD         dwPChannel;
  53.     short         nOffset; 
  54.     BYTE          bStatus;
  55.     BYTE          bByte1;
  56.     BYTE          bByte2;
  57. } DMUS_IO_SEQ_ITEM;
  58.  
  59.  
  60. typedef struct _DMUS_IO_CURVE_ITEM
  61. {
  62.     MUSIC_TIME  mtStart;
  63.     MUSIC_TIME  mtDuration;
  64.     MUSIC_TIME  mtResetDuration;
  65.     DWORD       dwPChannel;
  66.     short       nOffset;
  67.     short       nStartValue;
  68.     short       nEndValue;
  69.     short       nResetValue;
  70.     BYTE        bType;
  71.     BYTE        bCurveShape;
  72.     BYTE        bCCData;
  73.     BYTE        bFlags;
  74. } DMUS_IO_CURVE_ITEM;
  75.  
  76.  
  77. typedef struct _DMUS_IO_TEMPO_ITEM
  78. {
  79.     MUSIC_TIME    lTime;
  80.     double        dblTempo;
  81. } DMUS_IO_TEMPO_ITEM;
  82.  
  83.  
  84. typedef struct _DMUS_IO_SYSEX_ITEM
  85. {
  86.     MUSIC_TIME    mtTime;
  87.     DWORD         dwPChannel;
  88.     DWORD         dwSysExLength;
  89. } DMUS_IO_SYSEX_ITEM;
  90.  
  91.  
  92. typedef struct _DMUS_IO_TIMESIGNATURE_ITEM
  93. {
  94.     MUSIC_TIME    lTime;
  95.     BYTE          bBeatsPerMeasure;   /* beats per measure (top of time sig) */
  96.     BYTE          bBeat;              /* what note receives the beat (bottom of time sig.) */
  97.                                       /* we can assume that 0 means 256th note */
  98.     WORD          wGridsPerBeat;      /* grids per beat */
  99. } DMUS_IO_TIMESIGNATURE_ITEM;
  100.  
  101. /* PARAM structures, used by GetParam() and SetParam() */
  102. typedef struct _DMUS_COMMAND_PARAM
  103. {
  104.     BYTE bCommand;
  105.     BYTE bGrooveLevel;
  106.     BYTE bGrooveRange;
  107. } DMUS_COMMAND_PARAM;
  108.  
  109. typedef struct _DMUS_COMMAND_PARAM_2
  110. {
  111.     MUSIC_TIME mtTime;
  112.     BYTE bCommand;
  113.     BYTE bGrooveLevel;
  114.     BYTE bGrooveRange;
  115. } DMUS_COMMAND_PARAM_2;
  116.  
  117. typedef DMUS_CHORD_KEY DMUS_CHORD_PARAM; /* DMUS_CHORD_KEY defined in dmusici.h */
  118.  
  119. typedef struct _DMUS_RHYTHM_PARAM
  120. {
  121.     DMUS_TIMESIGNATURE  TimeSig;
  122.     DWORD               dwRhythmPattern;
  123. } DMUS_RHYTHM_PARAM;
  124.  
  125. typedef struct _DMUS_TEMPO_PARAM
  126. {
  127.     MUSIC_TIME  mtTime;
  128.     double      dblTempo;
  129. } DMUS_TEMPO_PARAM;
  130.  
  131.  
  132. typedef struct _DMUS_MUTE_PARAM
  133. {
  134.     DWORD   dwPChannel;
  135.     DWORD   dwPChannelMap;
  136.     BOOL    fMute;
  137. } DMUS_MUTE_PARAM;
  138.  
  139. /* Style chunks */
  140.  
  141. #define DMUS_FOURCC_STYLE_FORM        mmioFOURCC('D','M','S','T')
  142. #define DMUS_FOURCC_STYLE_CHUNK       mmioFOURCC('s','t','y','h')
  143. #define DMUS_FOURCC_PART_LIST         mmioFOURCC('p','a','r','t')
  144. #define DMUS_FOURCC_PART_CHUNK        mmioFOURCC('p','r','t','h')
  145. #define DMUS_FOURCC_NOTE_CHUNK        mmioFOURCC('n','o','t','e')
  146. #define DMUS_FOURCC_CURVE_CHUNK       mmioFOURCC('c','r','v','e')
  147. #define DMUS_FOURCC_PATTERN_LIST      mmioFOURCC('p','t','t','n')
  148. #define DMUS_FOURCC_PATTERN_CHUNK     mmioFOURCC('p','t','n','h')
  149. #define DMUS_FOURCC_RHYTHM_CHUNK      mmioFOURCC('r','h','t','m')
  150. #define DMUS_FOURCC_PARTREF_LIST      mmioFOURCC('p','r','e','f')
  151. #define DMUS_FOURCC_PARTREF_CHUNK     mmioFOURCC('p','r','f','c')
  152. #define DMUS_FOURCC_STYLE_PERS_REF_LIST   mmioFOURCC('p', 'r', 'r', 'f')
  153. #define DMUS_FOURCC_MOTIFSETTINGS_CHUNK   mmioFOURCC('m', 't', 'f', 's')
  154.  
  155. /* Flags used by variations: these make up the DWORDs in dwVariationChoices.               */
  156.  
  157. /* These flags determine the types of chords supported by a given variation in DirectMusic */
  158. /* mode.  The first seven flags (bits 1-7) are set if the variation supports major chords  */
  159. /* rooted in scale positions, so, e.g., if bits 1, 2, and 4 are set, the variation         */
  160. /* supports major chords rooted in the tonic, second, and fourth scale positions.  The     */
  161. /* next seven flags serve the same purpose, but for minor chords, and the following seven  */
  162. /* flags serve the same purpose for chords that are not major or minor (e.g., SUS 4        */
  163. /* chords).  Bits 22, 23, and 24 are set if the variation supports chords rooted in the    */
  164. /* scale, chords rooted sharp of scale tones, and chords rooted flat of scale tones,       */
  165. /* respectively.  For example, to support a C# minor chord in the scale of C Major,        */
  166. /* bits 8 (for tonic minor) and 24 (for sharp) need to be set.  Bits 25, 26, an 27 handle  */
  167. /* chords that are triads, 6th or 7th chords, and chords with extensions, respectively.    */
  168. /* bits 28 and 29 handle chords that are followed by tonic and dominant chords,            */
  169. /* respectively.                                                                           */
  170. #define DMUS_VARIATIONF_MAJOR        0x0000007F /* Seven positions in the scale - major chords. */    
  171. #define DMUS_VARIATIONF_MINOR        0x00003F80 /* Seven positions in the scale - minor chords. */    
  172. #define DMUS_VARIATIONF_OTHER        0x001FC000 /* Seven positions in the scale - other chords. */    
  173. #define DMUS_VARIATIONF_ROOT_SCALE   0x00200000 /* Handles chord roots in the scale. */         
  174. #define DMUS_VARIATIONF_ROOT_FLAT    0x00400000 /* Handles flat chord roots (based on scale notes). */         
  175. #define DMUS_VARIATIONF_ROOT_SHARP   0x00800000 /* Handles sharp chord roots (based on scale notes). */         
  176. #define DMUS_VARIATIONF_TYPE_TRIAD   0x01000000 /* Handles simple chords - triads. */  
  177. #define DMUS_VARIATIONF_TYPE_6AND7   0x02000000 /* Handles simple chords - 6 and 7. */  
  178. #define DMUS_VARIATIONF_TYPE_COMPLEX 0x04000000 /* Handles complex chords. */  
  179. #define DMUS_VARIATIONF_DEST_TO1     0x08000000 /* Handles transitions to 1 chord. */  
  180. #define DMUS_VARIATIONF_DEST_TO5     0x10000000 /* Handles transitions to 5 chord. */  
  181.  
  182. /* The top three bits of the variation flags are the Mode bits.  If all are 0, it's IMA. */  
  183. /* If the smallest is 1, it's Direct Music. */
  184. #define DMUS_VARIATIONF_MODES        0xE0000000
  185. #define DMUS_VARIATIONF_IMA25_MODE   0x00000000
  186. #define DMUS_VARIATIONF_DMUS_MODE    0x20000000
  187.  
  188. #pragma pack(2)
  189.  
  190. typedef struct _DMUS_IO_TIMESIG
  191. {
  192.     /* Time signatures define how many beats per measure, which note receives */
  193.     /* the beat, and the grid resolution. */
  194.     BYTE    bBeatsPerMeasure;   /* beats per measure (top of time sig) */
  195.     BYTE    bBeat;              /* what note receives the beat (bottom of time sig.) */
  196.                                 /* we can assume that 0 means 256th note */
  197.     WORD    wGridsPerBeat;      /* grids per beat */
  198. } DMUS_IO_TIMESIG;
  199.  
  200. typedef struct _DMUS_IO_STYLE
  201. {
  202.     DMUS_IO_TIMESIG     timeSig;        /* Styles have a default Time Signature */
  203.     double              dblTempo;   
  204. } DMUS_IO_STYLE;
  205.  
  206. typedef struct _DMUS_IO_VERSION
  207. {
  208.     DWORD               dwVersionMS;        /* Version # high-order 32 bits */
  209.     DWORD               dwVersionLS;        /* Version # low-order 32 bits  */
  210. } DMUS_IO_VERSION;
  211.  
  212. typedef struct _DMUS_IO_PATTERN
  213. {
  214.     DMUS_IO_TIMESIG     timeSig;        /* Patterns can override the Style's Time sig. */
  215.     BYTE                bGrooveBottom;  /* bottom of groove range */
  216.     BYTE                bGrooveTop;     /* top of groove range */
  217.     WORD                wEmbellishment; /* Fill, Break, Intro, End, Normal, Motif */
  218.     WORD                wNbrMeasures;   /* length in measures */
  219. } DMUS_IO_PATTERN;
  220.  
  221. typedef struct _DMUS_IO_STYLEPART
  222. {
  223.     DMUS_IO_TIMESIG     timeSig;        /* can override pattern's */
  224.     DWORD               dwVariationChoices[32]; /* MOAW choice bitfield */
  225.     GUID                guidPartID;     /* identifies the part */
  226.     WORD                wNbrMeasures;   /* length of the Part */
  227.     BYTE                bPlayModeFlags; /* see PLAYMODE flags */
  228.     BYTE                bInvertUpper;   /* inversion upper limit */
  229.     BYTE                bInvertLower;   /* inversion lower limit */
  230. } DMUS_IO_STYLEPART;
  231.  
  232. typedef struct _DMUS_IO_PARTREF
  233. {
  234.     GUID    guidPartID;         /* unique ID for matching up with parts */
  235.     WORD    wLogicalPartID;     /* corresponds to port/device/midi channel */
  236.     BYTE    bVariationLockID;   /* parts with the same ID lock variations. */
  237.                                 /* high bit is used to identify master Part */
  238.     BYTE    bSubChordLevel;     /* tells which sub chord level this part wants */
  239.     BYTE    bPriority;          /* 256 priority levels. Parts with lower priority */
  240.                                 /* aren't played first when a device runs out of */
  241.                                 /* notes */
  242.     BYTE    bRandomVariation;   /* when set, matching variations play in random order */
  243.                                 /* when clear, matching variations play sequentially */
  244. } DMUS_IO_PARTREF;
  245.  
  246. typedef struct _DMUS_IO_STYLENOTE
  247. {
  248.     MUSIC_TIME  mtGridStart;    /* when this note occurs */
  249.     DWORD       dwVariation;    /* variation bits */
  250.     MUSIC_TIME  mtDuration;     /* how long this note lasts */
  251.     short       nTimeOffset;    /* offset from mtGridStart */
  252.     WORD        wMusicValue;    /* Position in scale. */
  253.     BYTE        bVelocity;      /* Note velocity. */
  254.     BYTE        bTimeRange;     /* Range to randomize start time. */
  255.     BYTE        bDurRange;      /* Range to randomize duration. */
  256.     BYTE        bVelRange;      /* Range to randomize velocity. */
  257.     BYTE        bInversionID;   /* Identifies inversion group to which this note belongs */
  258.     BYTE        bPlayModeFlags; /* Can override part */
  259. } DMUS_IO_STYLENOTE;
  260.  
  261. typedef struct _DMUS_IO_STYLECURVE
  262. {
  263.     MUSIC_TIME  mtGridStart;    /* when this curve occurs */
  264.     DWORD       dwVariation;    /* variation bits */
  265.     MUSIC_TIME  mtDuration;     /* how long this curve lasts */
  266.     MUSIC_TIME  mtResetDuration;/* how long after the end of the curve to reset the curve */
  267.     short       nTimeOffset;    /* offset from mtGridStart */
  268.     short       nStartValue;    /* curve's start value */
  269.     short       nEndValue;      /* curve's end value */
  270.     short       nResetValue;    /* the value to which to reset the curve */
  271.     BYTE        bEventType;     /* type of curve */
  272.     BYTE        bCurveShape;    /* shape of curve */
  273.     BYTE        bCCData;        /* CC# */
  274.     BYTE        bFlags;         /* Bit 1=TRUE means to send nResetValue. Otherwise, don't.
  275.                                    Other bits are reserved. */
  276. } DMUS_IO_STYLECURVE;
  277.  
  278. typedef struct _DMUS_IO_MOTIFSETTINGS
  279. {
  280.     DWORD       dwRepeats;      /* Number of repeats. By default, 0. */
  281.     MUSIC_TIME  mtPlayStart;    /* Start of playback. By default, 0. */
  282.     MUSIC_TIME  mtLoopStart;    /* Start of looping portion. By default, 0. */
  283.     MUSIC_TIME  mtLoopEnd;      /* End of loop. Must be greater than mtLoopStart. By default equal to length of motif. */
  284.     DWORD       dwResolution;   /* Default resolution. */
  285. } DMUS_IO_MOTIFSETTINGS;
  286.  
  287. #pragma pack()
  288.  
  289.  
  290. /*
  291. RIFF
  292. (
  293.     'DMST'          // Style
  294.     <styh-ck>       // Style header chunk
  295.     <guid-ck>       // Every Style has a GUID
  296.     [<UNFO-list>]   // Name, author, copyright info., comments
  297.     [<vers-ck>]     // version chunk
  298.     <part-list>...  // List of parts in the Style, used by patterns
  299.     <pttn-list>...  // List of patterns in the Style
  300.     <DMBD-form>...  // List of bands in the Style
  301.     [<motf-list>]   // List of motifs in the Style
  302.     [<prrf-list>]   // List of chord map references in the Style
  303. )
  304.  
  305.     // <styh-ck>
  306.     styh
  307.     (
  308.         <DMUS_IO_STYLE>
  309.     )
  310.  
  311.     // <guid-ck>
  312.     guid
  313.     (
  314.         <GUID>
  315.     )
  316.  
  317.     // <vers-ck>
  318.     vers
  319.     (
  320.         <DMUS_IO_VERSION>
  321.     )
  322.  
  323.     // <part-list>
  324.     LIST
  325.     (
  326.         'part'
  327.         <prth-ck>       // Part header chunk
  328.         [<UNFO-list>]
  329.         [<note-ck>]     // List of notes in Part
  330.         [<crve-ck>]     // List of curves in Part
  331.     )
  332.  
  333.         // <orth-ck>
  334.         prth
  335.         (
  336.             <DMUS_IO_STYLEPART>
  337.         )
  338.  
  339.         // <note-ck>
  340.         'note'
  341.         (
  342.             // sizeof DMUS_IO_STYLENOTE:DWORD
  343.             <DMUS_IO_STYLENOTE>...
  344.         )
  345.  
  346.         // <crve-ck>
  347.         'crve'
  348.         (
  349.             // sizeof DMUS_IO_STYLECURVE:DWORD
  350.             <DMUS_IO_STYLECURVE>...
  351.         )
  352.  
  353.     // <pttn-list>
  354.     LIST
  355.     (
  356.         'pttn'
  357.         <ptnh-ck>       // Pattern header chunk
  358.         <rhtm-ck>       // List of rhythms for chord matching
  359.         [<UNFO-list>]
  360.         [<mtfs-ck>]     // Motif settings chunk
  361.         <pref-list>...  // List of part reference id's
  362.     )
  363.  
  364.         // <ptnh-ck>
  365.         ptnh
  366.         (
  367.             <DMUS_IO_PATTERN>
  368.         )
  369.  
  370.         // <rhtm-ck>
  371.         'rhtm'
  372.         (
  373.             // DWORD's representing rhythms for chord matching based on number
  374.             // of measures in the pattern
  375.         )
  376.  
  377.         // pref-list
  378.         LIST
  379.         (
  380.             'pref'
  381.             <prfc-ck>   // part ref chunk
  382.         )
  383.  
  384.         // <prfc-ck>
  385.         prfc
  386.         (
  387.             <DMUS_IO_PARTREF>
  388.         )
  389.  
  390.         // <mtfs-ck>
  391.         mtfs
  392.         (
  393.             <DMUS_IO_MOTIFSETTINGS>
  394.         )
  395.  
  396.     // <prrf-list>
  397.     LIST
  398.     (
  399.         'prrf'
  400.         // some number of <DMRF>
  401.     )
  402. */
  403.  
  404. /* Chord and command file formats */
  405.  
  406. #define DMUS_FOURCC_CHORDTRACK_LIST         mmioFOURCC('c','o','r','d')
  407. #define DMUS_FOURCC_CHORDTRACKHEADER_CHUNK  mmioFOURCC('c','r','d','h')
  408. #define DMUS_FOURCC_CHORDTRACKBODY_CHUNK    mmioFOURCC('c','r','d','b')
  409.  
  410. #define DMUS_FOURCC_COMMANDTRACK_CHUNK      mmioFOURCC('c','m','n','d')
  411.  
  412. typedef struct _DMUS_IO_CHORD
  413. {
  414.     WCHAR       wszName[16];    /* Name of the chord */
  415.     MUSIC_TIME  mtTime;         /* Time of this chord */
  416.     WORD        wMeasure;       /* Measure this falls on */
  417.     BYTE        bBeat;          /* Beat this falls on */
  418. } DMUS_IO_CHORD;
  419.  
  420. typedef struct _DMUS_IO_SUBCHORD
  421. {
  422.     DWORD   dwChordPattern;     /* Notes in the subchord */
  423.     DWORD   dwScalePattern;     /* Notes in the scale */
  424.     DWORD   dwInversionPoints;  /* Where inversions can occur */
  425.     DWORD   dwLevels;           /* Which levels are supported by this subchord */
  426.     BYTE    bChordRoot;         /* Root of the subchord */
  427.     BYTE    bScaleRoot;         /* Root of the scale */
  428. } DMUS_IO_SUBCHORD;
  429.  
  430. typedef struct _DMUS_IO_COMMAND
  431. {
  432.     MUSIC_TIME  mtTime;         /* Time of this command */
  433.     WORD        wMeasure;       /* Measure this falls on */
  434.     BYTE        bBeat;          /* Beat this falls on */
  435.     BYTE        bCommand;       /* Command type (see #defines below) */
  436.     BYTE        bGrooveLevel;   /* Groove level (0 if command is not a groove) */
  437.     BYTE        bGrooveRange;   /* Groove range  */
  438. } DMUS_IO_COMMAND;
  439.  
  440.  
  441. /*
  442.  
  443.     // <cord-list>
  444.     LIST
  445.     (
  446.         'cord'
  447.         <crdh-ck>
  448.         <crdb-ck>       // Chord body chunk
  449.     )
  450.  
  451.         // <crdh-ck>
  452.         crdh
  453.         (
  454.             // Scale: dword (upper 8 bits for root, lower 24 for scale)
  455.         )
  456.  
  457.         // <crdb-ck>
  458.         crdb
  459.         (
  460.             // sizeof DMUS_IO_CHORD:dword
  461.             <DMUS_IO_CHORD>
  462.             // # of DMUS_IO_SUBCHORDS:dword
  463.             // sizeof DMUS_IO_SUBCHORDS:dword
  464.             // a number of <DMUS_IO_SUBCHORD>
  465.         )
  466.  
  467.  
  468.     // <cmnd-list>
  469.     'cmnd'
  470.     (
  471.         //sizeof DMUS_IO_COMMAND: DWORD
  472.         <DMUS_IO_COMMAND>...
  473.     )
  474.  
  475. */
  476.  
  477. /*  File io for DirectMusic Tool and ToolGraph objects
  478. */
  479.  
  480. /* RIFF ids: */
  481.  
  482. #define DMUS_FOURCC_TOOLGRAPH_FORM  mmioFOURCC('D','M','T','G')
  483. #define DMUS_FOURCC_TOOL_LIST       mmioFOURCC('t','o','l','l')
  484. #define DMUS_FOURCC_TOOL_FORM       mmioFOURCC('D','M','T','L')
  485. #define DMUS_FOURCC_TOOL_CHUNK      mmioFOURCC('t','o','l','h')
  486.  
  487. /* io structures: */
  488.  
  489. typedef struct _DMUS_IO_TOOL_HEADER
  490. {
  491.     GUID        guidClassID;    /* Class id of tool. */
  492.     long        lIndex;         /* Position in graph. */
  493.     DWORD       cPChannels;     /* Number of items in channels array. */
  494.     FOURCC      ckid;           /* chunk ID of tool's data chunk if 0 fccType valid. */
  495.     FOURCC      fccType;        /* list type if NULL ckid valid. */
  496.     DWORD       dwPChannels[1]; /* Array of PChannels, size determined by cPChannels. */
  497. } DMUS_IO_TOOL_HEADER;
  498.  
  499. /*
  500. RIFF
  501. (
  502.     'DMTG'          // DirectMusic ToolGraph chunk
  503.     [<guid-ck>]     // GUID for ToolGraph
  504.     [<vers-ck>]     // Optional version info
  505.     [<UNFO-list>]   // Name, author, copyright info., comments
  506.     <toll-list>     // List of Tools
  507. )
  508.  
  509.     // <guid-ck>
  510.     'guid'
  511.     (
  512.         <GUID>
  513.     )
  514.  
  515.     // <vers-ck>
  516.     vers
  517.     (
  518.         <DMUS_IO_VERSION>
  519.     )
  520.  
  521.     // <toll-list>
  522.     LIST
  523.     (
  524.         'toll'          // List of tools
  525.         <DMTL-form>...  // Each tool is encapsulated in a RIFF chunk
  526.     )
  527.  
  528. // <DMTL-form>      // Tools can be embedded in a graph or stored as separate files.
  529. RIFF
  530. (
  531.     'DMTL'
  532.     <tolh-ck>
  533.     [<guid-ck>]     // Optional GUID for tool object instance (not to be confused with Class id in track header)
  534.     [<vers-ck>]     // Optional version info
  535.     [<UNFO-list>]   // Optional name, author, copyright info., comments
  536.     [<data>]        // Tool data. Must be a RIFF readable chunk.
  537. )
  538.  
  539.     // <tolh-ck>            // Tool header chunk
  540.     (
  541.         'tolh'
  542.         <DMUS_IO_TOOL_HEADER>   // Tool header
  543.     )
  544. */
  545.  
  546. /*  File io for DirectMusic Band Track object */
  547.  
  548.  
  549. /* RIFF ids: */
  550. #define DMUS_FOURCC_BANDTRACK_FORM  mmioFOURCC('D','M','B','T')
  551. #define DMUS_FOURCC_BANDTRACK_CHUNK mmioFOURCC('b','d','t','h')
  552. #define DMUS_FOURCC_BANDS_LIST      mmioFOURCC('l','b','d','l')
  553. #define DMUS_FOURCC_BAND_LIST       mmioFOURCC('l','b','n','d')
  554. #define DMUS_FOURCC_BANDITEM_CHUNK  mmioFOURCC('b','d','i','h')
  555.  
  556. /*  io structures */
  557. typedef struct _DMUS_IO_BAND_TRACK_HEADER
  558. {
  559.     BOOL bAutoDownload;     /* Determines if Auto-Download is enabled. */
  560. } DMUS_IO_BAND_TRACK_HEADER;
  561.  
  562. typedef struct _DMUS_IO_BAND_ITEM_HEADER
  563. {
  564.     MUSIC_TIME lBandTime;   /* Position in track list. */
  565. } DMUS_IO_BAND_ITEM_HEADER;
  566.  
  567. /*
  568. RIFF
  569. (
  570.     'DMBT'          // DirectMusic Band Track form-type
  571.     [<bdth-ck>]     // Band track header
  572.     [<guid-ck>]     // GUID for band track
  573.     [<vers-ck>]     // Optional version info
  574.     [<UNFO-list>]   // Name, author, copyright info., comments
  575.     <lbdl-list>     // List of Band Lists
  576. )
  577.  
  578.     // <bnth-ck>
  579.     'bdth'
  580.     (
  581.         <DMUS_IO_BAND_TRACK_HEADER>
  582.     )
  583.  
  584.     // <guid-ck>
  585.     'guid'
  586.     (
  587.         <GUID>
  588.     )
  589.  
  590.     // <vers-ck>
  591.     vers
  592.     (
  593.         <DMUS_IO_VERSION>
  594.     )
  595.  
  596.     // <lbdl-list>
  597.     LIST
  598.     (
  599.         'lbdl'          // List of bands
  600.         <lbnd-list>     // Each band is encapsulated in a list
  601.     )
  602.  
  603.         // <lbnd-list>
  604.         LIST
  605.         (
  606.             'lbnd'
  607.             <bdih-ck>
  608.             <DMBD-form> // Band
  609.         )
  610.  
  611.             // <bdih-ck>            // band item header
  612.             (
  613.                 <DMUS_IO_BAND_ITEM_HEADER>  // Band item header
  614.             )
  615. */      
  616.  
  617.  
  618. /*  File io for DirectMusic Band object
  619. */
  620.  
  621. /* RIFF ids: */
  622.  
  623. #define DMUS_FOURCC_BAND_FORM           mmioFOURCC('D','M','B','D')
  624. #define DMUS_FOURCC_INSTRUMENTS_LIST    mmioFOURCC('l','b','i','l')
  625. #define DMUS_FOURCC_INSTRUMENT_LIST     mmioFOURCC('l','b','i','n')
  626. #define DMUS_FOURCC_INSTRUMENT_CHUNK    mmioFOURCC('b','i','n','s')
  627.  
  628. /* Flags for DMUS_IO_INSTRUMENT
  629.  */
  630. #define DMUS_IO_INST_PATCH          (1 << 0)        /* dwPatch is valid. */
  631. #define DMUS_IO_INST_BANKSELECT     (1 << 1)        /* dwPatch contains a valid Bank Select MSB and LSB part */
  632. #define DMUS_IO_INST_ASSIGN_PATCH   (1 << 3)        /* dwAssignPatch is valid */
  633. #define DMUS_IO_INST_NOTERANGES     (1 << 4)        /* dwNoteRanges is valid */
  634. #define DMUS_IO_INST_PAN            (1 << 5)        /* bPan is valid */
  635. #define DMUS_IO_INST_VOLUME         (1 << 6 )       /* bVolume is valid */
  636. #define DMUS_IO_INST_TRANSPOSE      (1 << 7)        /* nTranspose is valid */
  637. #define DMUS_IO_INST_GM             (1 << 8)        /* Instrument is from GM collection */
  638. #define DMUS_IO_INST_GS             (1 << 9)        /* Instrument is from GS collection */
  639. #define DMUS_IO_INST_XG             (1 << 10)       /* Instrument is from XG collection */
  640. #define DMUS_IO_INST_CHANNEL_PRIORITY (1 << 11)     /* dwChannelPriority is valid */
  641. #define DMUS_IO_INST_USE_DEFAULT_GM_SET (1 << 12)   /* Always use the default GM set for this patch,  */
  642.                                                     /* don't rely on the synth caps stating GM or GS in hardware. */
  643.  
  644. /*  io structures */
  645. typedef struct _DMUS_IO_INSTRUMENT
  646. {
  647.     DWORD   dwPatch;            /* MSB, LSB and Program change to define instrument */
  648.     DWORD   dwAssignPatch;      /* MSB, LSB and Program change to assign to instrument when downloading */
  649.     DWORD   dwNoteRanges[4];    /* 128 bits; one for each MIDI note instrument needs to able to play */
  650.     DWORD   dwPChannel;         /* PChannel instrument plays on */
  651.     DWORD   dwFlags;            /* DMUS_IO_INST_ flags */
  652.     BYTE    bPan;               /* Pan for instrument */
  653.     BYTE    bVolume;            /* Volume for instrument */
  654.     short   nTranspose;         /* Number of semitones to transpose notes */
  655.     DWORD   dwChannelPriority;  /* Channel priority */
  656. } DMUS_IO_INSTRUMENT;
  657.  
  658. /*
  659. // <DMBD-form> bands can be embedded in other forms
  660. RIFF
  661. (
  662.     'DMBD'          // DirectMusic Band chunk
  663.     [<guid-ck>]     // GUID for band
  664.     [<vers-ck>]     // Optional version info
  665.     [<UNFO-list>]   // Name, author, copyright info., comments
  666.     <lbil-list>     // List of Instruments
  667. )
  668.  
  669.     // <guid-ck>
  670.     'guid'
  671.     (
  672.         <GUID>
  673.     )
  674.  
  675.     // <vers-ck>
  676.     vers
  677.     (
  678.         <DMUS_IO_VERSION>
  679.     )
  680.  
  681.     // <lbil-list>
  682.     LIST
  683.     (
  684.         'lbil'          // List of instruments
  685.         <lbin-list>     // Each instrument is encapsulated in a list
  686.     )
  687.  
  688.         // <lbin-list>
  689.         LIST
  690.         (
  691.             'lbin'
  692.             <bins-ck>
  693.             [<DMRF-list>]       // Optional reference to DLS Collection file.
  694.         )
  695.  
  696.             // <bins-ck>            // Instrument chunk
  697.             (
  698.                 'bins'
  699.                 <DMUS_IO_INSTRUMENT>    // Instrument header
  700.             )
  701. */      
  702.  
  703. /*  File io for DirectMusic Segment object */
  704.  
  705. /* RIFF ids: */
  706.  
  707. #define DMUS_FOURCC_SEGMENT_FORM    mmioFOURCC('D','M','S','G')
  708. #define DMUS_FOURCC_SEGMENT_CHUNK   mmioFOURCC('s','e','g','h')
  709. #define DMUS_FOURCC_TRACK_LIST      mmioFOURCC('t','r','k','l')
  710. #define DMUS_FOURCC_TRACK_FORM      mmioFOURCC('D','M','T','K')
  711. #define DMUS_FOURCC_TRACK_CHUNK     mmioFOURCC('t','r','k','h')
  712.  
  713. /*  io structures:*/
  714.  
  715. typedef struct _DMUS_IO_SEGMENT_HEADER
  716. {
  717.     DWORD       dwRepeats;      /* Number of repeats. By default, 0. */
  718.     MUSIC_TIME  mtLength;       /* Length, in music time. */
  719.     MUSIC_TIME  mtPlayStart;    /* Start of playback. By default, 0. */
  720.     MUSIC_TIME  mtLoopStart;    /* Start of looping portion. By default, 0. */
  721.     MUSIC_TIME  mtLoopEnd;      /* End of loop. Must be greater than dwPlayStart. By default equal to length. */
  722.     DWORD       dwResolution;   /* Default resolution. */
  723. } DMUS_IO_SEGMENT_HEADER;
  724.  
  725. typedef struct _DMUS_IO_TRACK_HEADER
  726. {
  727.     GUID        guidClassID;    /* Class id of track. */
  728.     DWORD       dwPosition;     /* Position in track list. */
  729.     DWORD       dwGroup;        /* Group bits for track. */
  730.     FOURCC      ckid;           /* chunk ID of track's data chunk if 0 fccType valid. */
  731.     FOURCC      fccType;        /* list type if NULL ckid valid */
  732. } DMUS_IO_TRACK_HEADER;
  733.  
  734. /*
  735. RIFF
  736. (
  737.     'DMSG'          // DirectMusic Segment chunk
  738.     <segh-ck>       // Segment header chunk
  739.     [<guid-ck>]     // GUID for segment
  740.     [<vers-ck>]     // Optional version info
  741.     [<UNFO-list>]   // Name, author, copyright info., comments
  742.     <trkl-list>     // List of Tracks
  743.     [<DMTG-form>]   // Optional ToolGraph
  744. )
  745.  
  746.     // <segh-ck>        
  747.     'segh'
  748.     (
  749.         <DMUS_IO_SEGMENT_HEADER>
  750.     )
  751.     
  752.     // <guid-ck>
  753.     'guid'
  754.     (
  755.         <GUID>
  756.     )
  757.  
  758.     // <vers-ck>
  759.     vers
  760.     (
  761.         <DMUS_IO_VERSION>
  762.     )
  763.  
  764.     // <trkl-list>
  765.     LIST
  766.     (
  767.         'trkl'          // List of tracks
  768.         <DMTK-form>...  // Each track is encapsulated in a RIFF chunk
  769.     )
  770.  
  771. // <DMTK-form>      // Tracks can be embedded in a segment or stored as separate files.
  772. RIFF
  773. (
  774.     'DMTK'
  775.     <trkh-ck>
  776.     [<guid-ck>]     // Optional GUID for track object instance (not to be confused with Class id in track header)
  777.     [<vers-ck>]     // Optional version info
  778.     [<UNFO-list>]   // Optional name, author, copyright info., comments
  779.     [<data>]        // Track data. Must be a RIFF readable chunk.
  780. )
  781.  
  782.     // <trkh-ck>            // Track header chunk
  783.     (
  784.         'trkh'
  785.         <DMUS_IO_TRACK_HEADER>  // Track header
  786.     )
  787. */
  788.  
  789. /*  File io for DirectMusic reference chunk. 
  790.     This is used to embed a reference to an object.
  791. */
  792.  
  793. /*  RIFF ids: */
  794.  
  795. #define DMUS_FOURCC_REF_LIST        mmioFOURCC('D','M','R','F')
  796. #define DMUS_FOURCC_REF_CHUNK       mmioFOURCC('r','e','f','h')
  797. #define DMUS_FOURCC_DATE_CHUNK      mmioFOURCC('d','a','t','e')
  798. #define DMUS_FOURCC_NAME_CHUNK      mmioFOURCC('n','a','m','e')
  799. #define DMUS_FOURCC_FILE_CHUNK      mmioFOURCC('f','i','l','e')
  800.  
  801. typedef struct _DMUS_IO_REFERENCE
  802. {
  803.     GUID    guidClassID;    /* Class id is always required. */
  804.     DWORD   dwValidData;    /* Flags. */
  805. } DMUS_IO_REFERENCE;
  806.  
  807. /*
  808. LIST
  809. (
  810.     'DMRF'          // DirectMusic Reference chunk
  811.     <refh-ck>       // Reference header chunk
  812.     [<guid-ck>]     // Optional object GUID.
  813.     [<date-ck>]     // Optional file date.
  814.     [<name-ck>]     // Optional name.
  815.     [<file-ck>]     // Optional file name.
  816.     [<catg-ck>]     // Optional category name.
  817.     [<vers-ck>]     // Optional version info.
  818. )
  819.  
  820.     // <refh-ck>
  821.     'refh'
  822.     (
  823.         <DMUS_IO_REFERENCE>
  824.     )
  825.  
  826.     // <guid-ck>
  827.     'guid'
  828.     (
  829.         <GUID>
  830.     )
  831.  
  832.     // <date-ck>
  833.     date
  834.     (
  835.         <FILETIME>
  836.     )
  837.  
  838.     // <name-ck>
  839.     name
  840.     (
  841.         // Name, stored as NULL terminated string of WCHARs
  842.     )
  843.  
  844.     // <file-ck>
  845.     file
  846.     (
  847.         // File name, stored as NULL terminated string of WCHARs
  848.     )
  849.  
  850.     // <catg-ck>
  851.     catg
  852.     (
  853.         // Category name, stored as NULL terminated string of WCHARs
  854.     )
  855.  
  856.     // <vers-ck>
  857.     vers
  858.     (
  859.         <DMUS_IO_VERSION>
  860.     )
  861. */
  862.  
  863. /* Chord Maps */
  864.  
  865. /* runtime chunks */
  866. #define DMUS_FOURCC_CHORDMAP_FORM       mmioFOURCC('D','M','P','R')
  867. #define DMUS_FOURCC_IOCHORDMAP_CHUNK    mmioFOURCC('p','e','r','h')
  868. #define DMUS_FOURCC_SUBCHORD_CHUNK      mmioFOURCC('c','h','d','t')
  869. #define DMUS_FOURCC_CHORDENTRY_CHUNK    mmioFOURCC('c','h','e','h')
  870. #define DMUS_FOURCC_SUBCHORDID_CHUNK    mmioFOURCC('s','b','c','n')
  871. #define DMUS_FOURCC_IONEXTCHORD_CHUNK   mmioFOURCC('n','c','r','d')
  872. #define DMUS_FOURCC_NEXTCHORDSEQ_CHUNK  mmioFOURCC('n','c','s','q')
  873. #define DMUS_FOURCC_IOSIGNPOST_CHUNK    mmioFOURCC('s','p','s','h')
  874. #define DMUS_FOURCC_CHORDNAME_CHUNK     mmioFOURCC('I','N','A','M')
  875.  
  876. /* runtime list chunks */
  877. #define DMUS_FOURCC_CHORDENTRY_LIST     mmioFOURCC('c','h','o','e')
  878. #define DMUS_FOURCC_CHORDMAP_LIST       mmioFOURCC('c','m','a','p')
  879. #define DMUS_FOURCC_CHORD_LIST          mmioFOURCC('c','h','r','d')
  880. #define DMUS_FOURCC_CHORDPALETTE_LIST   mmioFOURCC('c','h','p','l')
  881. #define DMUS_FOURCC_CADENCE_LIST        mmioFOURCC('c','a','d','e')
  882. #define DMUS_FOURCC_SIGNPOSTITEM_LIST   mmioFOURCC('s','p','s','t')
  883.  
  884. #define DMUS_FOURCC_SIGNPOST_LIST       mmioFOURCC('s','p','s','q')
  885.  
  886. /* values for dwChord field of DMUS_IO_PERS_SIGNPOST */
  887. /* DMUS_SIGNPOSTF_ flags are also used in templates (DMUS_IO_SIGNPOST) */
  888. #define DMUS_SIGNPOSTF_A        1      
  889. #define DMUS_SIGNPOSTF_B        2
  890. #define DMUS_SIGNPOSTF_C        4
  891. #define DMUS_SIGNPOSTF_D        8
  892. #define DMUS_SIGNPOSTF_E        0x10
  893. #define DMUS_SIGNPOSTF_F        0x20
  894. #define DMUS_SIGNPOSTF_LETTER   (DMUS_SIGNPOSTF_A | DMUS_SIGNPOSTF_B | DMUS_SIGNPOSTF_C | DMUS_SIGNPOSTF_D | DMUS_SIGNPOSTF_E | DMUS_SIGNPOSTF_F)
  895. #define DMUS_SIGNPOSTF_1        0x100
  896. #define DMUS_SIGNPOSTF_2        0x200
  897. #define DMUS_SIGNPOSTF_3        0x400
  898. #define DMUS_SIGNPOSTF_4        0x800
  899. #define DMUS_SIGNPOSTF_5        0x1000
  900. #define DMUS_SIGNPOSTF_6        0x2000
  901. #define DMUS_SIGNPOSTF_7        0x4000
  902. #define DMUS_SIGNPOSTF_ROOT     (DMUS_SIGNPOSTF_1 | DMUS_SIGNPOSTF_2 | DMUS_SIGNPOSTF_3 | DMUS_SIGNPOSTF_4 | DMUS_SIGNPOSTF_5 | DMUS_SIGNPOSTF_6 | DMUS_SIGNPOSTF_7)
  903. #define DMUS_SIGNPOSTF_CADENCE  0x8000
  904.  
  905. /* values for dwChord field of DMUS_IO_PERS_SIGNPOST */
  906. #define DMUS_SPOSTCADENCEF_1  2   /* Use the first cadence chord. */
  907. #define DMUS_SPOSTCADENCEF_2  4   /* Use the second cadence chord. */
  908.  
  909. /* run time data structs */
  910. typedef struct _DMUS_IO_CHORDMAP
  911. {
  912.     WCHAR   wszLoadName[20];
  913.     DWORD   dwScalePattern;
  914.     DWORD   dwFlags;
  915. } DMUS_IO_CHORDMAP;
  916.  
  917. typedef struct _DMUS_IO_CHORDMAP_SUBCHORD
  918. {
  919.     DWORD   dwChordPattern;
  920.     DWORD   dwScalePattern;
  921.     DWORD   dwInvertPattern;
  922.     BYTE    bChordRoot;
  923.     BYTE    bScaleRoot;
  924.     WORD    wCFlags;
  925.     DWORD   dwLevels;   /* parts or which subchord levels this chord supports */
  926. } DMUS_IO_CHORDMAP_SUBCHORD;
  927.  
  928. /* Legacy name... */
  929. typedef DMUS_IO_CHORDMAP_SUBCHORD DMUS_IO_PERS_SUBCHORD;
  930.  
  931. typedef struct _DMUS_IO_CHORDENTRY
  932. {
  933.     DWORD   dwFlags;
  934.     WORD    wConnectionID;  /* replaces runtime "pointer to this" */
  935. } DMUS_IO_CHORDENTRY;
  936.  
  937. typedef struct _DMUS_IO_NEXTCHORD
  938. {
  939.     DWORD   dwFlags;
  940.     WORD    nWeight;
  941.     WORD    wMinBeats;
  942.     WORD    wMaxBeats;
  943.     WORD    wConnectionID;  /* points to an ioChordEntry */
  944. } DMUS_IO_NEXTCHORD;
  945.  
  946. typedef struct _DMUS_IO_CHORDMAP_SIGNPOST
  947. {
  948.     DWORD   dwChords;   /* 1bit per group */
  949.     DWORD   dwFlags;
  950. } DMUS_IO_CHORDMAP_SIGNPOST;
  951.  
  952. /* Legacy name... */
  953. typedef DMUS_IO_CHORDMAP_SIGNPOST DMUS_IO_PERS_SIGNPOST;
  954.  
  955. /*
  956. RIFF
  957. (
  958.     'DMPR'
  959.     <perh-ck>           // Chord map header chunk
  960.     [<guid-ck>]         // guid chunk
  961.     [<vers-ck>]         // version chunk (two DWORDS)
  962.     [<UNFO-list>]       // Unfo chunk
  963.     <chdt-ck>           // subchord database
  964.     <chpl-list>         // chord palette
  965.     <cmap-list>         // chord map
  966.     <spsq-list>         // signpost list
  967.  )
  968.  
  969. <cmap-list> ::= LIST('cmap' <choe-list> )
  970.  
  971. <choe-list> ::= LIST('choe'
  972.                                 <cheh-ck>   // chord entry data
  973.                                 <chrd-list> // chord definition
  974.                                 <ncsq-ck>   // connecting(next) chords
  975.                      )
  976.  
  977. <chrd-list> ::= LIST('chrd' 
  978.                                 <INAM-ck>   // name of chord in wide char format
  979.                                 <sbcn-ck>   // list of subchords composing chord
  980.                     )
  981.  
  982. <chpl-list> ::= LIST('chpl' 
  983.                                 <chrd-list> ... // chord definition
  984.                     )
  985.  
  986. <spsq-list> ::== LIST('spsq' <spst-list> ... )
  987.  
  988. <spst-list> ::= LIST('spst'
  989.                              <spsh-ck>
  990.                              <chrd-list>
  991.                              [<cade-list>]
  992.                     )
  993.  
  994. <cade-list> ::= LIST('cade' <chrd-list> ...)
  995.  
  996. <perh-ck> ::= perh(<DMUS_IO_CHORDMAP>)
  997.  
  998. <chdt-ck> ::= chdt(<cbChordSize::WORD>
  999.                    <DMUS_IO_PERS_SUBCHORD> ... )
  1000.  
  1001. <cheh-ck> ::= cheh(<DMUS_IO_CHORDENTRY>)
  1002.  
  1003. <sbcn-ck> ::= sbcn(<cSubChordID:WORD> ...)
  1004.  
  1005. <ncsq-ck> ::= ncsq(<wNextChordSize:WORD> 
  1006.                    <DMUS_IO_NEXTCHORD>...)
  1007.  
  1008. <spsh-ck> ::= spsh(<DMUS_IO_PERS_SIGNPOST>)
  1009.  
  1010. */
  1011.  
  1012. /* Signpost tracks */
  1013.  
  1014. #define DMUS_FOURCC_SIGNPOST_TRACK_CHUNK     mmioFOURCC( 's', 'g', 'n', 'p' )
  1015.  
  1016.  
  1017. typedef struct _DMUS_IO_SIGNPOST
  1018. {
  1019.     MUSIC_TIME  mtTime;
  1020.     DWORD       dwChords;
  1021.     WORD        wMeasure;
  1022. } DMUS_IO_SIGNPOST;
  1023.  
  1024. /*
  1025.  
  1026.     // <sgnp-list>
  1027.     'sgnp'
  1028.     (
  1029.         //sizeof DMUS_IO_SIGNPOST: DWORD
  1030.         <DMUS_IO_SIGNPOST>...
  1031.     )
  1032.  
  1033. */
  1034.  
  1035. #define DMUS_FOURCC_MUTE_CHUNK  mmioFOURCC('m','u','t','e')
  1036.  
  1037. typedef struct _DMUS_IO_MUTE
  1038. {
  1039.     MUSIC_TIME  mtTime;
  1040.     DWORD       dwPChannel;
  1041.     DWORD       dwPChannelMap;
  1042. } DMUS_IO_MUTE;
  1043.  
  1044. /*
  1045.  
  1046.     // <mute-list>
  1047.     'mute'
  1048.     (
  1049.         //sizeof DMUS_IO_MUTE:DWORD
  1050.         <DMUS_IO_MUTE>...
  1051.     )
  1052.  
  1053.  
  1054. */
  1055.  
  1056. /* Used for both style and chord map tracks */
  1057.  
  1058. #define DMUS_FOURCC_TIME_STAMP_CHUNK    mmioFOURCC('s', 't', 'm', 'p')
  1059.  
  1060. /* Style tracks */
  1061.  
  1062. #define DMUS_FOURCC_STYLE_TRACK_LIST    mmioFOURCC('s', 't', 't', 'r')
  1063. #define DMUS_FOURCC_STYLE_REF_LIST      mmioFOURCC('s', 't', 'r', 'f')
  1064.  
  1065. /*
  1066.  
  1067.     // <sttr-list>
  1068.     LIST('sttr'
  1069.     (
  1070.         // some number of <strf-list>
  1071.     )
  1072.  
  1073.     // <strf-list>
  1074.     LIST('strf'
  1075.     (
  1076.         <stmp-ck>
  1077.         <DMRF>
  1078.     )
  1079.  
  1080.     // <stmp-ck> defined in ..\dmcompos\dmcompp.h
  1081.  
  1082. */
  1083.  
  1084. /* Chord map tracks */
  1085.  
  1086. #define DMUS_FOURCC_PERS_TRACK_LIST mmioFOURCC('p', 'f', 't', 'r')
  1087. #define DMUS_FOURCC_PERS_REF_LIST   mmioFOURCC('p', 'f', 'r', 'f')
  1088.  
  1089. /*
  1090.  
  1091.     // <pftr-list>
  1092.     LIST('pftr'
  1093.     (
  1094.         // some number of <pfrf-list>
  1095.     )
  1096.  
  1097.     // <pfrf-list>
  1098.     LIST('pfrf'
  1099.     (
  1100.         <stmp-ck>
  1101.         <DMRF>
  1102.     )
  1103.  
  1104.   // <stmp-ck>
  1105.   'stmp'
  1106.   (
  1107.     // time:DWORD
  1108.   )
  1109.  
  1110.  
  1111.  
  1112. */
  1113.  
  1114. #define DMUS_FOURCC_TEMPO_TRACK     mmioFOURCC('t','e','t','r')
  1115.  
  1116. /*
  1117.     // tempo list
  1118.     'tetr'
  1119.     (
  1120.         // sizeof DMUS_IO_TEMPO_ITEM: DWORD
  1121.         <DMUS_IO_TEMPO_ITEM>...
  1122.     )
  1123.   */
  1124.  
  1125. #define DMUS_FOURCC_SEQ_TRACK       mmioFOURCC('s','e','q','t')
  1126. #define DMUS_FOURCC_SEQ_LIST        mmioFOURCC('e','v','t','l')
  1127. #define DMUS_FOURCC_CURVE_LIST      mmioFOURCC('c','u','r','l')
  1128.  
  1129. /*
  1130.     // sequence track
  1131.     'seqt'
  1132.     (
  1133.         // sequence list
  1134.         'evtl'
  1135.         (
  1136.             // sizeof DMUS_IO_SEQ_ITEM: DWORD
  1137.             <DMUS_IO_SEQ_ITEM>...
  1138.         )
  1139.         // curve list
  1140.         'curl'
  1141.         (
  1142.             // sizeof DMUS_IO_CURVE_ITEM: DWORD
  1143.             <DMUS_IO_CURVE_ITEM>...
  1144.         )
  1145.     )
  1146. */
  1147.  
  1148. #define DMUS_FOURCC_SYSEX_TRACK     mmioFOURCC('s','y','e','x')
  1149.  
  1150. /*
  1151.     // sysex track
  1152.     'syex'
  1153.     (
  1154.         // list of:
  1155.         // {
  1156.         //      <DMUS_IO_SYSEX_ITEM>
  1157.         //      sys-ex: data
  1158.         // }...
  1159.     )
  1160. */
  1161.  
  1162. #define DMUS_FOURCC_TIMESIGNATURE_TRACK mmioFOURCC('t','i','m','s')
  1163.  
  1164. /*
  1165.     // time signature track
  1166.     'tims'
  1167.     (
  1168.         // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD
  1169.         <DMUS_IO_TIMESIGNATURE_ITEM>...
  1170.     )
  1171. */
  1172.  
  1173. #ifdef __cplusplus
  1174. }; /* extern "C" */
  1175. #endif
  1176.  
  1177. #include <poppack.h>
  1178.  
  1179. #pragma option pop /*P_O_Pop*/
  1180. #endif /* #ifndef _DMUSICF_ */
  1181.