DirectMusic.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:340k
- [<prrf-list>]...// Optional array of chord map references in the Style
- )
- // <styh-ck>
- styh
- (
- <DMUS_IO_STYLE>
- )
- // <guid-ck>
- guid
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- // <part-list>
- LIST
- (
- 'part'
- <prth-ck> // Part header chunk
- [<UNFO-list>] // Name, author, copyright info., comments
- [<note-ck>] // Optional chunk containing an array of notes in Part
- [<crve-ck>] // Optional chunk containing an array of curves in Part
- [<mrkr-ck>] // Optional chunk containing an array of markers in Part
- [<rsln-ck>] // Optional chunk containing an array of variation resolutions in Part
- [<anpn-ck>] // Optional chunk containing an array of resolution anticipations in Part
- )
- // <orth-ck>
- prth
- (
- <DMUS_IO_STYLEPART>
- )
- // <note-ck>
- 'note'
- (
- // sizeof DMUS_IO_STYLENOTE:DWORD
- <DMUS_IO_STYLENOTE>...
- )
- // <crve-ck>
- 'crve'
- (
- // sizeof DMUS_IO_STYLECURVE:DWORD
- <DMUS_IO_STYLECURVE>...
- )
- // <mrkr-ck>
- 'mrkr'
- (
- // sizeof DMUS_IO_STYLEMARKER:DWORD
- <DMUS_IO_STYLEMARKER>...
- )
- // <rsln-ck>
- 'rsln'
- (
- // sizeof DMUS_IO_STYLERESOLUTION:DWORD
- <DMUS_IO_STYLERESOLUTION>...
- )
- // <anpn-ck>
- 'anpn'
- (
- // sizeof DMUS_IO_STYLE_ANTICIPATION:DWORD
- <DMUS_IO_STYLE_ANTICIPATION>...
- )
- // <pttn-list>
- LIST
- (
- 'pttn'
- <ptnh-ck> // Pattern header chunk
- <rhtm-ck> // Chunk containing an array of rhythms for chord matching
- [<UNFO-list>] // Name, author, copyright info., comments
- [<mtfs-ck>] // Motif settings chunk
- [<DMBD-form>] // Optional band to be associated with the pattern (for motifs)
- <pref-list>... // Array of part reference id's
- )
- // <ptnh-ck>
- ptnh
- (
- <DMUS_IO_PATTERN>
- )
- // <rhtm-ck>
- 'rhtm'
- (
- // DWORD's representing rhythms for chord matching based on number
- // of measures in the pattern
- )
- // pref-list
- LIST
- (
- 'pref'
- <prfc-ck> // part ref chunk
- )
- // <prfc-ck>
- prfc
- (
- <DMUS_IO_PARTREF>
- )
- // <mtfs-ck>
- mtfs
- (
- <DMUS_IO_MOTIFSETTINGS>
- )
- // <prrf-list>
- LIST
- (
- 'prrf'
- <DMRF-list>... // Array of Chordmap references
- )
- *)
- const
- (* Pattern chunk, for use in Pattern tracks *)
- DMUS_FOURCC_PATTERN_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('P') shl 16) or (Byte('T') shl 24)); // mmioFOURCC('D','M','P','T')
- {$EXTERNALSYM DMUS_FOURCC_PATTERN_FORM}
- (*
- RIFF
- (
- 'DMPT' // Pattern
- <styh-ck> // Style header chunk
- <pttn-list> // The pattern, in single pattern format (includes DMUS_FOURCC_PART_LIST chunks)
- )
- *)
- (* Chord and command file formats *)
- type
- (* These specify possible values for DMUS_IO_COMMAND.bRepeatMode (dx8) *)
- enumDMUS_PATTERNT_TYPES = (
- DMUS_PATTERNT_RANDOM {= 0}, (* Play randomly. (dx7 behavior) *)
- DMUS_PATTERNT_REPEAT {= 1}, (* Repeat last pattern. *)
- DMUS_PATTERNT_SEQUENTIAL {= 2}, (* Play sequential starting with first matching pattern. *)
- DMUS_PATTERNT_RANDOM_START {= 3}, (* Play sequential starting with a random pattern. *)
- DMUS_PATTERNT_NO_REPEAT {= 4}, (* Play randomly, but don't play the same pattern twice. *)
- DMUS_PATTERNT_RANDOM_ROW {= 5} (* Play randomly as a row: don't repeat any pattern until all have played. *)
- );
- {$EXTERNALSYM enumDMUS_PATTERNT_TYPES}
- DMUS_PATTERNT_TYPES = enumDMUS_PATTERNT_TYPES;
- {$EXTERNALSYM DMUS_PATTERNT_TYPES}
- TDMusPatterntTypes = DMUS_PATTERNT_TYPES;
- const
- DMUS_FOURCC_CHORDTRACK_LIST = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('r') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('c','o','r','d')
- {$EXTERNALSYM DMUS_FOURCC_CHORDTRACK_LIST}
- DMUS_FOURCC_CHORDTRACKHEADER_CHUNK = DWORD(Byte('c') or (Byte('r') shl 8) or (Byte('d') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('c','r','d','h')
- {$EXTERNALSYM DMUS_FOURCC_CHORDTRACKHEADER_CHUNK}
- DMUS_FOURCC_CHORDTRACKBODY_CHUNK = DWORD(Byte('c') or (Byte('r') shl 8) or (Byte('d') shl 16) or (Byte('b') shl 24)); // mmioFOURCC('c','r','d','b')
- {$EXTERNALSYM DMUS_FOURCC_CHORDTRACKBODY_CHUNK}
- DMUS_FOURCC_COMMANDTRACK_CHUNK = DWORD(Byte('c') or (Byte('m') shl 8) or (Byte('n') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('c','m','n','d')
- {$EXTERNALSYM DMUS_FOURCC_COMMANDTRACK_CHUNK}
- type
- PDMusIoChord = ^TDMusIoChord;
- _DMUS_IO_CHORD = packed record
- wszName: array[0..15] of WideChar; (* Name of the chord *)
- mtTime: TMusicTime; (* Time of this chord *)
- wMeasure: Word; (* Measure this falls on *)
- bBeat: Byte; (* Beat this falls on *)
- bFlags: Byte; (* Various flags *)
- end;
- {$EXTERNALSYM _DMUS_IO_CHORD}
- DMUS_IO_CHORD = _DMUS_IO_CHORD;
- {$EXTERNALSYM DMUS_IO_CHORD}
- TDMusIoChord = _DMUS_IO_CHORD;
- PDMusIoSubChord = ^TDMusIoSubChord;
- _DMUS_IO_SUBCHORD = packed record
- dwChordPattern: DWORD; (* Notes in the subchord *)
- dwScalePattern: DWORD; (* Notes in the scale *)
- dwInversionPoints: DWORD; (* Where inversions can occur *)
- dwLevels: DWORD; (* Which levels are supported by this subchord *)
- bChordRoot: Byte; (* Root of the subchord *)
- bScaleRoot: Byte; (* Root of the scale *)
- end;
- {$EXTERNALSYM _DMUS_IO_SUBCHORD}
- DMUS_IO_SUBCHORD = _DMUS_IO_SUBCHORD;
- {$EXTERNALSYM DMUS_IO_SUBCHORD}
- TDMusIoSubChord = _DMUS_IO_SUBCHORD;
- PDMusIoCommand = ^TDMusIoCommand;
- _DMUS_IO_COMMAND = packed record
- mtTime: TMusicTime; (* Time of this command *)
- wMeasure: Word; (* Measure this falls on *)
- bBeat: Byte; (* Beat this falls on *)
- bCommand: Byte; (* Command type (see #defines below) *)
- bGrooveLevel: Byte; (* Groove level (0 if command is not a groove) *)
- bGrooveRange: Byte; (* Groove range *)
- bRepeatMode: Byte; (* Used to control selection of patterns with same groove level *)
- end;
- {$EXTERNALSYM _DMUS_IO_COMMAND}
- DMUS_IO_COMMAND = _DMUS_IO_COMMAND;
- {$EXTERNALSYM DMUS_IO_COMMAND}
- TDMusIoCommand = _DMUS_IO_COMMAND;
- (*
- // <cord-list>
- LIST
- (
- 'cord'
- <crdh-ck>
- <crdb-ck>... // Chord body chunks
- )
- // <crdh-ck>
- crdh
- (
- // Scale: dword (upper 8 bits for root, lower 24 for scale)
- )
- // <crdb-ck>
- crdb
- (
- // sizeof DMUS_IO_CHORD:dword
- <DMUS_IO_CHORD>
- // # of DMUS_IO_SUBCHORDS:dword
- // sizeof DMUS_IO_SUBCHORDS:dword
- // a number of <DMUS_IO_SUBCHORD>
- )
- // <cmnd-list>
- 'cmnd'
- (
- //sizeof DMUS_IO_COMMAND: DWORD
- <DMUS_IO_COMMAND>...
- )
- *)
- (* File io for DirectMusic Tool and ToolGraph objects
- *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_TOOLGRAPH_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('T') shl 16) or (Byte('G') shl 24)); // mmioFOURCC('D','M','T','G')
- {$EXTERNALSYM DMUS_FOURCC_TOOLGRAPH_FORM}
- DMUS_FOURCC_TOOL_LIST = DWORD(Byte('t') or (Byte('o') shl 8) or (Byte('l') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('t','o','l','l')
- {$EXTERNALSYM DMUS_FOURCC_TOOL_LIST}
- DMUS_FOURCC_TOOL_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('T') shl 16) or (Byte('L') shl 24)); // mmioFOURCC('D','M','T','L')
- {$EXTERNALSYM DMUS_FOURCC_TOOL_FORM}
- DMUS_FOURCC_TOOL_CHUNK = DWORD(Byte('t') or (Byte('o') shl 8) or (Byte('l') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('t','o','l','h')
- {$EXTERNALSYM DMUS_FOURCC_TOOL_CHUNK}
- type
- (* io type = recordures: *)
- PDMusIoToolHeader = ^TDMusIoToolHeader;
- _DMUS_IO_TOOL_HEADER = packed record
- guidClassID: TGUID; (* Class id of tool. *)
- lIndex: Longint; (* Position in graph. *)
- cPChannels: DWORD; (* Number of items in channels array. *)
- ckid: FOURCC; (* chunk ID of tool's data chunk if 0 fccType valid. *)
- fccType: FOURCC; (* list type if NULL ckid valid. *)
- dwPChannels: array[0..0] of DWORD; (* Array of PChannels, size determined by cPChannels. *)
- end;
- {$EXTERNALSYM _DMUS_IO_TOOL_HEADER}
- DMUS_IO_TOOL_HEADER = _DMUS_IO_TOOL_HEADER;
- {$EXTERNALSYM DMUS_IO_TOOL_HEADER}
- TDMusIoToolHeader = _DMUS_IO_TOOL_HEADER;
- (*
- RIFF
- (
- 'DMTG' // DirectMusic ToolGraph chunk
- [<guid-ck>] // GUID for ToolGraph
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- <toll-list> // List of Tools
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- // <toll-list>
- LIST
- (
- 'toll' // Array of tools
- <DMTL-form>... // Each tool is encapsulated in a RIFF chunk
- )
- // <DMTL-form> Tools are embedded in a graph. Theoretically, they can be saved as individual files too.
- RIFF
- (
- 'DMTL'
- <tolh-ck>
- [<data>] // Tool data. Must be a RIFF readable chunk.
- )
- // <tolh-ck> // Tool header chunk
- (
- 'tolh'
- <DMUS_IO_TOOL_HEADER> // Tool header
- )
- *)
- (* The AudioPath file carries everything for describing a specific audio path,
- including Tool Graph and Buffer Descriptor.
- This can even be used for configuring a complete performance.
- *)
- const
- DMUS_FOURCC_AUDIOPATH_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('A') shl 16) or (Byte('P') shl 24)); // mmioFOURCC('D','M','A','P')
- {$EXTERNALSYM DMUS_FOURCC_AUDIOPATH_FORM}
- (*
- RIFF
- (
- 'DMAP' // DirectMusic AudioPath chunk
- [<guid-ck>] // GUID for this Audio Path configuration
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- [<DMTG-form>] // Optional ToolGraph
- [<pcsl-list>] // Optional list of port configurations
- [<dbfl-list>]...// Optional array of Dsound buffer descriptors
- )
- *)
- DMUS_FOURCC_PORTCONFIGS_LIST = DWORD(Byte('p') or (Byte('c') shl 8) or (Byte('s') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('p','c','s','l')
- {$EXTERNALSYM DMUS_FOURCC_PORTCONFIGS_LIST}
- DMUS_FOURCC_PORTCONFIG_LIST = DWORD(Byte('p') or (Byte('c') shl 8) or (Byte('f') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('p','c','f','l')
- {$EXTERNALSYM DMUS_FOURCC_PORTCONFIG_LIST}
- DMUS_FOURCC_PORTCONFIG_ITEM = DWORD(Byte('p') or (Byte('c') shl 8) or (Byte('f') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','c','f','h')
- {$EXTERNALSYM DMUS_FOURCC_PORTCONFIG_ITEM}
- DMUS_FOURCC_PORTPARAMS_ITEM = DWORD(Byte('p') or (Byte('p') shl 8) or (Byte('r') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','p','r','h')
- {$EXTERNALSYM DMUS_FOURCC_PORTPARAMS_ITEM}
- DMUS_FOURCC_DSBUFFER_LIST = DWORD(Byte('d') or (Byte('b') shl 8) or (Byte('f') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('d','b','f','l')
- {$EXTERNALSYM DMUS_FOURCC_DSBUFFER_LIST}
- DMUS_FOURCC_DSBUFFATTR_ITEM = DWORD(Byte('d') or (Byte('d') shl 8) or (Byte('a') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('d','d','a','h')
- {$EXTERNALSYM DMUS_FOURCC_DSBUFFATTR_ITEM}
- DMUS_FOURCC_PCHANNELS_LIST = DWORD(Byte('p') or (Byte('c') shl 8) or (Byte('h') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('p','c','h','l')
- {$EXTERNALSYM DMUS_FOURCC_PCHANNELS_LIST}
- DMUS_FOURCC_PCHANNELS_ITEM = DWORD(Byte('p') or (Byte('c') shl 8) or (Byte('h') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','c','h','h')
- {$EXTERNALSYM DMUS_FOURCC_PCHANNELS_ITEM}
- type
- PDMusIoPortConfigHeader = ^TDMusIoPortConfigHeader;
- _DMUS_IO_PORTCONFIG_HEADER = packed record
- guidPort: TGUID; (* GUID of requested port. *)
- dwPChannelBase: DWORD; (* PChannel that this should start on. *)
- dwPChannelCount: DWORD; (* How many channels. *)
- dwFlags: DWORD; (* Various flags. *)
- end;
- {$EXTERNALSYM _DMUS_IO_PORTCONFIG_HEADER}
- DMUS_IO_PORTCONFIG_HEADER = _DMUS_IO_PORTCONFIG_HEADER;
- {$EXTERNALSYM DMUS_IO_PORTCONFIG_HEADER}
- TDMusIoPortConfigHeader = _DMUS_IO_PORTCONFIG_HEADER;
- const
- DMUS_PORTCONFIGF_DRUMSON10 = 1; (* This port configured for drums on channel 10. *)
- {$EXTERNALSYM DMUS_PORTCONFIGF_DRUMSON10}
- DMUS_PORTCONFIGF_USEDEFAULT = 2; (* Use the default port. *)
- {$EXTERNALSYM DMUS_PORTCONFIGF_USEDEFAULT}
- (* Each portconfig has one or more pchannel to buffer mappings. Each buffer
- is identified by a guid. Each pchannel can map to one or more buffers.
- This is defined with one or more DMUS_IO_PCHANNELTOBUFFER_HEADER
- structures. Each defines a range of PChannels and the set of buffers
- that they connect to.
- *)
- type
- PDMusIoPChannelToBufferHeader = ^TDMusIoPChannelToBufferHeader;
- _DMUS_IO_PCHANNELTOBUFFER_HEADER = packed record
- dwPChannelBase: DWORD; (* PChannel that this should start on. *)
- dwPChannelCount: DWORD; (* How many PChannels. *)
- dwBufferCount: DWORD; (* How many buffers do these connect to. *)
- dwFlags: DWORD; (* Various flags. Currently reserved for future use. Must be 0. *)
- end;
- {$EXTERNALSYM _DMUS_IO_PCHANNELTOBUFFER_HEADER}
- DMUS_IO_PCHANNELTOBUFFER_HEADER = _DMUS_IO_PCHANNELTOBUFFER_HEADER;
- {$EXTERNALSYM DMUS_IO_PCHANNELTOBUFFER_HEADER}
- TDMusIoPChannelToBufferHeader = _DMUS_IO_PCHANNELTOBUFFER_HEADER;
- (* Each buffer is represented by an DSBC form. This is wrapped by the
- DMUS_IO_BUFFER_ATTRIBUTES_HEADER which identifies how to use the
- buffer. In particular, it indicates whether this gets dynamically duplicated
- or all references to this should share the same instance.
- To resolve references, the unique GUID of the buffer is also stored
- in this structure.
- *)
- PDMusIoBufferAttributesHeader = ^TDMusIoBufferAttributesHeader;
- _DMUS_IO_BUFFER_ATTRIBUTES_HEADER = packed record
- guidBufferID: TGUID; (* Each buffer config has a unique ID. *)
- dwFlags: DWORD; (* Various flags. *)
- end;
- {$EXTERNALSYM _DMUS_IO_BUFFER_ATTRIBUTES_HEADER}
- DMUS_IO_BUFFER_ATTRIBUTES_HEADER = _DMUS_IO_BUFFER_ATTRIBUTES_HEADER;
- {$EXTERNALSYM DMUS_IO_BUFFER_ATTRIBUTES_HEADER}
- TDMusIoBufferAttributesHeader = _DMUS_IO_BUFFER_ATTRIBUTES_HEADER;
- const
- (* DMUS_IO_BUFFER_ATTRIBUTES_HEADER.dwFlags: *)
- DMUS_BUFFERF_SHARED = 1; (* Share this with other audio paths, instead of creating unique copies. *)
- {$EXTERNALSYM DMUS_BUFFERF_SHARED}
- DMUS_BUFFERF_DEFINED = 2; (* Use one of the standard predefined buffers (see GUID_Buffer... in dmusici.h.) *)
- {$EXTERNALSYM DMUS_BUFFERF_DEFINED}
- DMUS_BUFFERF_MIXIN = 8; (* This is a mixin buffer. *)
- {$EXTERNALSYM DMUS_BUFFERF_MIXIN}
- (*
- LIST
- (
- 'pcsl' // Array of port configurations
- <pcfl-list>... // One or more port configurations, each in a list chunk
- )
- LIST
- (
- 'pcfl' // List container for one port configuration.
- <pcfh-ck> // Portconfig header chunk.
- <pprh-ck> // Port params, to be used to create the port.
- [<dbfl-list>]...// Optional array of Dsound buffer descriptors
- [<pchl-list>] // Optional list of pchannel to buffer assignments
- )
- // <pcfh-ck> // Port config header chunk
- (
- 'pcfh'
- <DMUS_IO_PORTCONFIG_HEADER> // Port config header
- )
- // <pprh-ck> // Port params header chunk
- (
- 'pprh'
- <DMUS_PORTPARAMS8> // Port params header
- )
- LIST
- (
- 'pchl' // List container for one or more pchannel to buffer assignments.
- <pchh-ck>... // One or more pchannel to buffer assignment headers and data.
- // <pchh-ck>
- (
- 'pchh'
- <DMUS_IO_PCHANNELTOBUFFER_HEADER> // Description of PChannels
- <GUID>... // Array of GUIDs defining the buffers they all connect to.
- )
- )
- LIST
- (
- 'dbfl' // List container for one buffer and buffer attributes header.
- <ddah-ck> // Buffer attributes header.
- [<DSBC-form>] // Buffer configuration. Not required when header uses a predefined buffer type.
- // <ddah-ck>
- (
- 'ddah'
- <DMUS_IO_BUFFER_ATTRIBUTES_HEADER> // Buffer attributes.
- )
- )
- *)
- (* File io for DirectMusic Band Track object *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_BANDTRACK_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('B') shl 16) or (Byte('T') shl 24)); // mmioFOURCC('D','M','B','T')
- {$EXTERNALSYM DMUS_FOURCC_BANDTRACK_FORM}
- DMUS_FOURCC_BANDTRACK_CHUNK = DWORD(Byte('b') or (Byte('d') shl 8) or (Byte('t') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('b','d','t','h')
- {$EXTERNALSYM DMUS_FOURCC_BANDTRACK_CHUNK}
- DMUS_FOURCC_BANDS_LIST = DWORD(Byte('l') or (Byte('b') shl 8) or (Byte('d') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('l','b','d','l')
- {$EXTERNALSYM DMUS_FOURCC_BANDS_LIST}
- DMUS_FOURCC_BAND_LIST = DWORD(Byte('l') or (Byte('b') shl 8) or (Byte('n') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('l','b','n','d')
- {$EXTERNALSYM DMUS_FOURCC_BAND_LIST}
- DMUS_FOURCC_BANDITEM_CHUNK = DWORD(Byte('b') or (Byte('d') shl 8) or (Byte('i') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('b','d','i','h')
- {$EXTERNALSYM DMUS_FOURCC_BANDITEM_CHUNK}
- DMUS_FOURCC_BANDITEM_CHUNK2 = DWORD(Byte('b') or (Byte('d') shl 8) or (Byte('2') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('b','d','2','h')
- {$EXTERNALSYM DMUS_FOURCC_BANDITEM_CHUNK2}
- type
- (* io structures *)
- PDMusIoBandTrackHeader = ^TDMusIoBandTrackHeader;
- _DMUS_IO_BAND_TRACK_HEADER = packed record
- bAutoDownload: BOOL; (* Determines if Auto-Download is enabled. *)
- end;
- {$EXTERNALSYM _DMUS_IO_BAND_TRACK_HEADER}
- DMUS_IO_BAND_TRACK_HEADER = _DMUS_IO_BAND_TRACK_HEADER;
- {$EXTERNALSYM DMUS_IO_BAND_TRACK_HEADER}
- TDMusIoBandTrackHeader = _DMUS_IO_BAND_TRACK_HEADER;
- PDMusIoBandItemHeader = ^TDMusIoBandItemHeader;
- _DMUS_IO_BAND_ITEM_HEADER = packed record
- lBandTime: TMusicTime; (* Position in track list. *)
- end;
- {$EXTERNALSYM _DMUS_IO_BAND_ITEM_HEADER}
- DMUS_IO_BAND_ITEM_HEADER = _DMUS_IO_BAND_ITEM_HEADER;
- {$EXTERNALSYM DMUS_IO_BAND_ITEM_HEADER}
- TDMusIoBandItemHeader = _DMUS_IO_BAND_ITEM_HEADER;
- PDMusIoBandItemHeader2 = ^TDMusIoBandItemHeader2;
- _DMUS_IO_BAND_ITEM_HEADER2 = packed record
- lBandTimeLogical: TMusicTime; (* Position in track list. Time in the music with which band change is associated. *)
- lBandTimePhysical: TMusicTime; (* Precise time band change will take effect. Should be close to logical time. *)
- end;
- {$EXTERNALSYM _DMUS_IO_BAND_ITEM_HEADER2}
- DMUS_IO_BAND_ITEM_HEADER2 = _DMUS_IO_BAND_ITEM_HEADER2;
- {$EXTERNALSYM DMUS_IO_BAND_ITEM_HEADER2}
- TDMusIoBandItemHeader2 = _DMUS_IO_BAND_ITEM_HEADER2;
- (*
- RIFF
- (
- 'DMBT' // DirectMusic Band Track form-type
- [<bdth-ck>] // Band track header
- [<guid-ck>] // GUID for band track
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- <lbdl-list> // List of Band items
- )
- // <bnth-ck>
- 'bdth'
- (
- <DMUS_IO_BAND_TRACK_HEADER>
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- // <lbdl-list>
- LIST
- (
- 'lbdl'
- <lbnd-list>... // Array of bands, each encapsulated in a list chunk
- )
- // <lbnd-list>
- LIST
- (
- 'lbnd'
- <bdih-ck> or <bd2h-ck> // bdih is a legacy format. bd2h is preferred for new content.
- <DMBD-form> // Band
- )
- // <bdih-ck> or <bd2h-ck> // band item header
- (
- <DMUS_IO_BAND_ITEM_HEADER> or <DMUS_IO_BAND_ITEM_HEADER2> // Band item header
- )
- *)
- (* File io for DirectMusic Band object
- *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_BAND_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('B') shl 16) or (Byte('D') shl 24)); // mmioFOURCC('D','M','B','D')
- {$EXTERNALSYM DMUS_FOURCC_BAND_FORM}
- DMUS_FOURCC_INSTRUMENTS_LIST = DWORD(Byte('l') or (Byte('b') shl 8) or (Byte('i') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('l','b','i','l')
- {$EXTERNALSYM DMUS_FOURCC_INSTRUMENTS_LIST}
- DMUS_FOURCC_INSTRUMENT_LIST = DWORD(Byte('l') or (Byte('b') shl 8) or (Byte('i') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('l','b','i','n')
- {$EXTERNALSYM DMUS_FOURCC_INSTRUMENT_LIST}
- DMUS_FOURCC_INSTRUMENT_CHUNK = DWORD(Byte('b') or (Byte('i') shl 8) or (Byte('n') shl 16) or (Byte('s') shl 24)); // mmioFOURCC('b','i','n','s')
- {$EXTERNALSYM DMUS_FOURCC_INSTRUMENT_CHUNK}
- (* Flags for DMUS_IO_INSTRUMENT
- *)
- DMUS_IO_INST_PATCH = (1 shl 0); (* dwPatch is valid. *)
- {$EXTERNALSYM DMUS_IO_INST_PATCH}
- DMUS_IO_INST_BANKSELECT = (1 shl 1); (* dwPatch contains a valid Bank Select MSB and LSB part *)
- {$EXTERNALSYM DMUS_IO_INST_BANKSELECT}
- DMUS_IO_INST_ASSIGN_PATCH = (1 shl 3); (* dwAssignPatch is valid *)
- {$EXTERNALSYM DMUS_IO_INST_ASSIGN_PATCH}
- DMUS_IO_INST_NOTERANGES = (1 shl 4); (* dwNoteRanges is valid *)
- {$EXTERNALSYM DMUS_IO_INST_NOTERANGES}
- DMUS_IO_INST_PAN = (1 shl 5); (* bPan is valid *)
- {$EXTERNALSYM DMUS_IO_INST_PAN}
- DMUS_IO_INST_VOLUME = (1 shl 6); (* bVolume is valid *)
- {$EXTERNALSYM DMUS_IO_INST_VOLUME}
- DMUS_IO_INST_TRANSPOSE = (1 shl 7); (* nTranspose is valid *)
- {$EXTERNALSYM DMUS_IO_INST_TRANSPOSE}
- DMUS_IO_INST_GM = (1 shl 8); (* Instrument is from GM collection *)
- {$EXTERNALSYM DMUS_IO_INST_GM}
- DMUS_IO_INST_GS = (1 shl 9); (* Instrument is from GS collection *)
- {$EXTERNALSYM DMUS_IO_INST_GS}
- DMUS_IO_INST_XG = (1 shl 10); (* Instrument is from XG collection *)
- {$EXTERNALSYM DMUS_IO_INST_XG}
- DMUS_IO_INST_CHANNEL_PRIORITY = (1 shl 11); (* dwChannelPriority is valid *)
- {$EXTERNALSYM DMUS_IO_INST_CHANNEL_PRIORITY}
- DMUS_IO_INST_USE_DEFAULT_GM_SET = (1 shl 12); (* Always use the default GM set for this patch, *)
- {$EXTERNALSYM DMUS_IO_INST_USE_DEFAULT_GM_SET}
- (* don't rely on the synth caps stating GM or GS in hardware. *)
- DMUS_IO_INST_PITCHBENDRANGE = (1 shl 13); (* nPitchBendRange is valid *)
- {$EXTERNALSYM DMUS_IO_INST_PITCHBENDRANGE}
- type
- (* io structures *)
- PDMusIoInstrument = ^TDMusIoInstrument;
- _DMUS_IO_INSTRUMENT = packed record
- dwPatch: DWORD; (* MSB, LSB and Program change to define instrument *)
- dwAssignPatch: DWORD; (* MSB, LSB and Program change to assign to instrument when downloading *)
- dwNoteRanges: array[0..3] of DWORD; (* 128 bits; one for each MIDI note instrument needs to able to play *)
- dwPChannel: DWORD; (* PChannel instrument plays on *)
- dwFlags: DWORD; (* DMUS_IO_INST_ flags *)
- bPan: Byte; (* Pan for instrument *)
- bVolume: Byte; (* Volume for instrument *)
- nTranspose: Smallint; (* Number of semitones to transpose notes *)
- dwChannelPriority: DWORD; (* Channel priority *)
- nPitchBendRange: Smallint; (* Number of semitones shifted by pitch bend *)
- end;
- {$EXTERNALSYM _DMUS_IO_INSTRUMENT}
- DMUS_IO_INSTRUMENT = _DMUS_IO_INSTRUMENT;
- {$EXTERNALSYM DMUS_IO_INSTRUMENT}
- TDMusIoInstrument = _DMUS_IO_INSTRUMENT;
- (*
- // <DMBD-form> bands can be embedded in other forms
- RIFF
- (
- 'DMBD' // DirectMusic Band chunk
- [<guid-ck>] // GUID for band
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- <lbil-list> // List of Instruments
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- // <lbil-list>
- LIST
- (
- 'lbil' // Array of instruments
- <lbin-list>... // Each instrument is encapsulated in a list
- )
- // <lbin-list>
- LIST
- (
- 'lbin'
- <bins-ck>
- [<DMRF-list>] // Optional reference to DLS Collection file.
- )
- // <bins-ck> // Instrument chunk
- (
- 'bins'
- <DMUS_IO_INSTRUMENT> // Instrument header
- )
- *)
- (* This RIFF id and io struct have been added to allow wave files (and the wave object) to
- differentiate between streaming and one-shot waves, and to give a prefetch for streaming
- waves *)
- const
- DMUS_FOURCC_WAVEHEADER_CHUNK = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('v') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('w','a','v','h')
- {$EXTERNALSYM DMUS_FOURCC_WAVEHEADER_CHUNK}
- type
- PDMusIoWaveHeader = ^TDMusIoWaveHeader;
- _DMUS_IO_WAVE_HEADER = packed record
- rtReadAhead: TReferenceTime; (* How far ahead in the stream wave data will be read (in REFERENCE_TIME). Ignored for one-shot waves. *)
- dwFlags: DWORD; (* Various flags, including whether this is a streaming wave and whether it can be invalidated. *)
- end;
- {$EXTERNALSYM _DMUS_IO_WAVE_HEADER}
- DMUS_IO_WAVE_HEADER = _DMUS_IO_WAVE_HEADER;
- {$EXTERNALSYM DMUS_IO_WAVE_HEADER}
- TDMusIoWaveHeader = _DMUS_IO_WAVE_HEADER;
- (* File io for Wave track *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_WAVETRACK_LIST = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('v') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('w','a','v','t')
- {$EXTERNALSYM DMUS_FOURCC_WAVETRACK_LIST}
- DMUS_FOURCC_WAVETRACK_CHUNK = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('t') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('w','a','t','h')
- {$EXTERNALSYM DMUS_FOURCC_WAVETRACK_CHUNK}
- DMUS_FOURCC_WAVEPART_LIST = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('v') shl 16) or (Byte('p') shl 24)); // mmioFOURCC('w','a','v','p')
- {$EXTERNALSYM DMUS_FOURCC_WAVEPART_LIST}
- DMUS_FOURCC_WAVEPART_CHUNK = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('p') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('w','a','p','h')
- {$EXTERNALSYM DMUS_FOURCC_WAVEPART_CHUNK}
- DMUS_FOURCC_WAVEITEM_LIST = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('v') shl 16) or (Byte('i') shl 24)); // mmioFOURCC('w','a','v','i')
- {$EXTERNALSYM DMUS_FOURCC_WAVEITEM_LIST}
- DMUS_FOURCC_WAVE_LIST = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('v') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('w','a','v','e')
- {$EXTERNALSYM DMUS_FOURCC_WAVE_LIST}
- DMUS_FOURCC_WAVEITEM_CHUNK = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('i') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('w','a','i','h')
- {$EXTERNALSYM DMUS_FOURCC_WAVEITEM_CHUNK}
- (* This flag is included in DMUS_IO_WAVE_TRACK_HEADER.dwFlags. If set, the track will get its
- variations from a pattern track, via GetParam(GUID_Variations). *)
- DMUS_WAVETRACKF_SYNC_VAR = $1;
- {$EXTERNALSYM DMUS_WAVETRACKF_SYNC_VAR}
- (* This is also included in DMUS_IO_WAVE_TRACK_HEADER.dwFlags. If set, variation control
- information will persist from one playback instance to the next.*)
- DMUS_WAVETRACKF_PERSIST_CONTROL = $2;
- {$EXTERNALSYM DMUS_WAVETRACKF_PERSIST_CONTROL}
- type
- PDMusIoWaveTrackHeader = ^TDMusIoWaveTrackHeader;
- _DMUS_IO_WAVE_TRACK_HEADER = packed record
- lVolume: Longint; (* Gain, in 1/100th of dB, to be applied to all waves. Note: All gain values should be negative. *)
- dwFlags: DWORD; (* Flags, including whether this track syncs to a pattern track for its variations. *)
- end;
- {$EXTERNALSYM _DMUS_IO_WAVE_TRACK_HEADER}
- DMUS_IO_WAVE_TRACK_HEADER = _DMUS_IO_WAVE_TRACK_HEADER;
- {$EXTERNALSYM DMUS_IO_WAVE_TRACK_HEADER}
- TDMusIoWaveTrackHeader = _DMUS_IO_WAVE_TRACK_HEADER;
- PDMusIoWavePartHeader = ^TDMusIoWavePartHeader;
- _DMUS_IO_WAVE_PART_HEADER = packed record
- lVolume: Longint; (* Gain, in 1/100th of dB, to be applied to all waves in wave part. Note: All gain values should be negative. *)
- dwVariations: DWORD; (* Variation mask for which of 32 variations *)
- dwPChannel: DWORD; (* PChannel *)
- dwLockToPart: DWORD; (* Part ID to lock to. *)
- dwFlags: DWORD; (* Flags, including stuff for managing how variations are chosen (in low-order nibble) *)
- dwIndex: DWORD; (* Index for distinguishing multiple parts on the same PChannel*)
- end;
- {$EXTERNALSYM _DMUS_IO_WAVE_PART_HEADER}
- DMUS_IO_WAVE_PART_HEADER = _DMUS_IO_WAVE_PART_HEADER;
- {$EXTERNALSYM DMUS_IO_WAVE_PART_HEADER}
- TDMusIoWavePartHeader = _DMUS_IO_WAVE_PART_HEADER;
- PDMusIoWaveItemHeader = ^TDMusIoWaveItemHeader;
- _DMUS_IO_WAVE_ITEM_HEADER = packed record
- lVolume: Longint; (* Gain, in 1/100th of dB. Note: All gain values should be negative. *)
- lPitch: Longint; (* Pitch offset in 1/100th of a semitone. *)
- dwVariations: DWORD; (* Variation flags for which of 32 variations this wave belongs to. *)
- rtTime: TReferenceTime; (* Start time, in REFERENCE_TIME, if clock time track, or MUSIC_TIME for music time track. *)
- rtStartOffset: TReferenceTime; (* Distance into wave to start playback, in reference time units. *)
- rtReserved: TReferenceTime; (* Reserved field. *)
- rtDuration: TReferenceTime; (* Duration, in REFERENCE_TIME or MUSIC_TIME, depending on track timing format. *)
- mtLogicalTime: TMusicTime; (* If in music track format, this indicates the musical boundary where this belongs. Otherwise, ignored. *)
- dwLoopStart: DWORD; (* Start point for a looping wave. *)
- dwLoopEnd: DWORD; (* End point for a looping wave. *)
- dwFlags: DWORD; (* Various flags, including whether this is a streaming wave and whether it can be invalidated. *)
- wVolumeRange: Word; (* Random range for volume. *)
- wPitchRange: Word; (* Random range for pitch. *)
- end;
- {$EXTERNALSYM _DMUS_IO_WAVE_ITEM_HEADER}
- DMUS_IO_WAVE_ITEM_HEADER = _DMUS_IO_WAVE_ITEM_HEADER;
- {$EXTERNALSYM DMUS_IO_WAVE_ITEM_HEADER}
- TDMusIoWaveItemHeader = _DMUS_IO_WAVE_ITEM_HEADER;
- (*
- LIST
- {
- 'wavt' // Wave track chunk
- <wath-ck> // Wave track header
- <wavp-list>... // Array of Wave Parts
- }
- // <wath-ck>
- 'wath'
- {
- <DMUS_IO_WAVE_TRACK_HEADER>
- }
- // <wavp-list>
- LIST
- {
- 'wavp'
- <waph-ck> // Wave Part Header
- <wavi-list> // List of wave items
- }
- // <waph-ck>
- 'waph'
- {
- <DMUS_IO_WAVE_PART_HEADER>
- }
- // <wavi-list>
- LIST
- {
- 'wavi'
- <wave-list>... // Array of waves; each wave is encapsulated in a list
- }
- // <wave-list>
- LIST
- {
- 'wave'
- <waih-ck> // Wave item header
- <DMRF-list> // Reference to wave object
- }
- // <waih-ck>
- 'waih'
- {
- <DMUS_IO_WAVE_ITEM_HEADER>
- }
- *)
- (* File io for DirectMusic Container file. This embeds a set of related files. And,
- in turn, it can be embedded within a segment or script file.
- *)
- const
- DMUS_FOURCC_CONTAINER_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('C') shl 16) or (Byte('N') shl 24)); // mmioFOURCC('D','M','C','N')
- {$EXTERNALSYM DMUS_FOURCC_CONTAINER_FORM}
- DMUS_FOURCC_CONTAINER_CHUNK = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('n') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('c','o','n','h')
- {$EXTERNALSYM DMUS_FOURCC_CONTAINER_CHUNK}
- DMUS_FOURCC_CONTAINED_ALIAS_CHUNK = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('b') shl 16) or (Byte('a') shl 24)); // mmioFOURCC('c','o','b','a')
- {$EXTERNALSYM DMUS_FOURCC_CONTAINED_ALIAS_CHUNK}
- DMUS_FOURCC_CONTAINED_OBJECT_CHUNK = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('b') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('c','o','b','h')
- {$EXTERNALSYM DMUS_FOURCC_CONTAINED_OBJECT_CHUNK}
- DMUS_FOURCC_CONTAINED_OBJECTS_LIST = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('s') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('c','o','s','l')
- {$EXTERNALSYM DMUS_FOURCC_CONTAINED_OBJECTS_LIST}
- DMUS_FOURCC_CONTAINED_OBJECT_LIST = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('b') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('c','o','b','l')
- {$EXTERNALSYM DMUS_FOURCC_CONTAINED_OBJECT_LIST}
- type
- PDMusIoContainerHeader = ^TDMusIoContainerHeader;
- _DMUS_IO_CONTAINER_HEADER = packed record
- dwFlags: DWORD; (* Flags. *)
- end;
- {$EXTERNALSYM _DMUS_IO_CONTAINER_HEADER}
- DMUS_IO_CONTAINER_HEADER = _DMUS_IO_CONTAINER_HEADER;
- {$EXTERNALSYM DMUS_IO_CONTAINER_HEADER}
- TDMusIoContainerHeader = _DMUS_IO_CONTAINER_HEADER;
- const
- DMUS_CONTAINER_NOLOADS = (1 shl 1); (* Contained items are not loaded when the container is loaded.
- Entries will be created in the loader (via SetObject) but
- the actual objects will not be created until they are
- specifically loaded at a later time. *)
- {$EXTERNALSYM DMUS_CONTAINER_NOLOADS}
- type
- PDMusIoContainedObjectHeader = ^TDMusIoContainedObjectHeader;
- _DMUS_IO_CONTAINED_OBJECT_HEADER = packed record
- guidClassID: TGUID; (* Class id of object. *)
- dwFlags: DWORD; (* Flags, for example DMUS_CONTAINED_OBJF_KEEP. *)
- ckid: FOURCC; (* chunk ID of track's data chunk if 0 fccType valid. *)
- fccType: FOURCC; (* list type if NULL ckid valid */
- (* Note that LIST:DMRF may be used for ckid and fccType in order to reference an
- object instead of embedding it within the container. *)
- end;
- {$EXTERNALSYM _DMUS_IO_CONTAINED_OBJECT_HEADER}
- DMUS_IO_CONTAINED_OBJECT_HEADER = _DMUS_IO_CONTAINED_OBJECT_HEADER;
- {$EXTERNALSYM DMUS_IO_CONTAINED_OBJECT_HEADER}
- TDMusIoContainedObjectHeader = _DMUS_IO_CONTAINED_OBJECT_HEADER;
- const
- DMUS_CONTAINED_OBJF_KEEP = 1; (* Keep the object cached in the loader after the container is released. *)
- {$EXTERNALSYM DMUS_CONTAINED_OBJF_KEEP}
- (*
- RIFF
- (
- 'DMCN' // DirectMusic Container chunk
- <conh-ck> // Container header chunk
- [<guid-ck>] // GUID for container
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- <cosl-list> // List of objects.
- )
- // <conh-ck>
- 'conh'
- (
- <DMUS_IO_CONTAINER_HEADER>
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- LIST
- (
- 'cosl' // Array of embedded objects.
- <cobl-list>... // Each object is encapsulated in a LIST chunk
- )
- // <cobl-list> // Encapsulates one object
- LIST
- (
- 'cobl'
- [<coba-ck>] // Alias. An alternative name by which this object is known
- // within the container.
- <cobh-ck> // Required header, includes CLASS ID for object.
- [<data>] or <DMRF> // Object data of the type specified in <cobh-ck>.
- // If DMRF, it is a reference of where to find the object.
- // Otherwise, it could be any RIFF readable chunk in the
- // exact same format as a file. The object will load
- // itself from this data.
- )
- // <coba-ck>
- 'coba'
- (
- // Alias, stored as NULL terminated string of WCHARs
- )
- // <cobh-ck>
- 'cobh'
- (
- <DMUS_IO_CONTAINED_OBJECT_HEADER>
- )
- *)
- (* File io for DirectMusic Segment object *)
- (* RIFF ids: *)
- const
- DMUS_FOURCC_SEGMENT_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('S') shl 16) or (Byte('G') shl 24)); // mmioFOURCC('D','M','S','G')
- {$EXTERNALSYM DMUS_FOURCC_SEGMENT_FORM}
- DMUS_FOURCC_SEGMENT_CHUNK = DWORD(Byte('s') or (Byte('e') shl 8) or (Byte('g') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('s','e','g','h')
- {$EXTERNALSYM DMUS_FOURCC_SEGMENT_CHUNK}
- DMUS_FOURCC_TRACK_LIST = DWORD(Byte('t') or (Byte('r') shl 8) or (Byte('k') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('t','r','k','l')
- {$EXTERNALSYM DMUS_FOURCC_TRACK_LIST}
- DMUS_FOURCC_TRACK_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('T') shl 16) or (Byte('K') shl 24)); // mmioFOURCC('D','M','T','K')
- {$EXTERNALSYM DMUS_FOURCC_TRACK_FORM}
- DMUS_FOURCC_TRACK_CHUNK = DWORD(Byte('t') or (Byte('r') shl 8) or (Byte('k') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('t','r','k','h')
- {$EXTERNALSYM DMUS_FOURCC_TRACK_CHUNK}
- DMUS_FOURCC_TRACK_EXTRAS_CHUNK = DWORD(Byte('t') or (Byte('r') shl 8) or (Byte('k') shl 16) or (Byte('x') shl 24)); // mmioFOURCC('t','r','k','x')
- {$EXTERNALSYM DMUS_FOURCC_TRACK_EXTRAS_CHUNK}
- (* io structures:*)
- type
- PDMusIoSegmentHeader = ^TDMusIoSegmentHeader;
- _DMUS_IO_SEGMENT_HEADER = packed record
- dwRepeats: DWORD; (* Number of repeats. By default, 0. *)
- mtLength: TMusicTime; (* Length, in music time. *)
- mtPlayStart: TMusicTime; (* Start of playback. By default, 0. *)
- mtLoopStart: TMusicTime; (* Start of looping portion. By default, 0. *)
- mtLoopEnd: TMusicTime; (* End of loop. Must be greater than dwPlayStart. Or, 0, indicating loop full segment. *)
- dwResolution: DWORD; (* Default resolution. *)
- // Following added for DX8:
- rtLength: TReferenceTime; (* Length, in reference time (overrides music time length.) *)
- dwFlags: DWORD;
- dwReserved: DWORD; (* Reserved. *)
- // Added for DX9.
- rtLoopStart: TReferenceTime; (* Clock time loop start. *)
- rtLoopEnd: TReferenceTime; (* Clock time loop end. *)
- rtPlayStart: TReferenceTime; (* Start of playback in clock time. *)
- end;
- {$EXTERNALSYM _DMUS_IO_SEGMENT_HEADER}
- DMUS_IO_SEGMENT_HEADER = _DMUS_IO_SEGMENT_HEADER;
- {$EXTERNALSYM DMUS_IO_SEGMENT_HEADER}
- TDMusIoSegmentHeader = _DMUS_IO_SEGMENT_HEADER;
- const
- DMUS_SEGIOF_REFLENGTH = 1; // Use the time in rtLength for the segment length.
- {$EXTERNALSYM DMUS_SEGIOF_REFLENGTH}
- DMUS_SEGIOF_CLOCKTIME = 2; // This is a clock time segment.
- {$EXTERNALSYM DMUS_SEGIOF_CLOCKTIME}
- type
- PDMusIoTrackHeader = ^TDMusIoTrackHeader;
- _DMUS_IO_TRACK_HEADER = packed record
- guidClassID: TGUID; (* Class id of track. *)
- dwPosition: DWORD; (* Position in track list. *)
- dwGroup: DWORD; (* Group bits for track. *)
- ckid: FOURCC; (* chunk ID of track's data chunk. *)
- fccType: FOURCC; (* list type if ckid is RIFF or LIST *)
- end;
- {$EXTERNALSYM _DMUS_IO_TRACK_HEADER}
- DMUS_IO_TRACK_HEADER = _DMUS_IO_TRACK_HEADER;
- {$EXTERNALSYM DMUS_IO_TRACK_HEADER}
- TDMusIoTrackHeader = _DMUS_IO_TRACK_HEADER;
- (* Additional parameters for the track header chunk, introduced in DX8 and
- on, are stored in a separate chunk. *)
- PDMusIoTrackExtrasHeader = ^TDMusIoTrackExtrasHeader;
- _DMUS_IO_TRACK_EXTRAS_HEADER = packed record
- dwFlags: DWORD; (* DX8 Added flags for control tracks. *)
- dwPriority: DWORD; (* Priority for composition. *)
- end;
- {$EXTERNALSYM _DMUS_IO_TRACK_EXTRAS_HEADER}
- DMUS_IO_TRACK_EXTRAS_HEADER = _DMUS_IO_TRACK_EXTRAS_HEADER;
- {$EXTERNALSYM DMUS_IO_TRACK_EXTRAS_HEADER}
- TDMusIoTrackExtrasHeader = _DMUS_IO_TRACK_EXTRAS_HEADER;
- (*
- RIFF
- (
- 'DMSG' // DirectMusic Segment chunk
- <segh-ck> // Segment header chunk
- [<guid-ck>] // GUID for segment
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- [<DMCN-form>] // Optional container of objects embedded in file. Must precede tracklist.
- <trkl-list> // List of Tracks
- [<DMTG-form>] // Optional ToolGraph
- [<DMAP-form>] // Optional Audio Path
- )
- // <segh-ck>
- 'segh'
- (
- <DMUS_IO_SEGMENT_HEADER>
- )
-
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- // <trkl-list>
- LIST
- (
- 'trkl' // Array of tracks
- <DMTK-form>... // Each track is encapsulated in a RIFF chunk
- )
- // <DMTK-form> // Tracks can be embedded in a segment or stored as separate files.
- RIFF
- (
- 'DMTK'
- <trkh-ck>
- [<trkx-ck>] // Optional track flags.
- [<guid-ck>] // Optional GUID for track object instance (not to be confused with Class id in track header)
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Optional name, author, copyright info., comments
- [<data>] // Track data. Must be a RIFF readable chunk.
- )
- // <trkh-ck> // Track header chunk
- (
- 'trkh'
- <DMUS_IO_TRACK_HEADER> // Track header
- )
- // <trkx-ck> // Track flags chunk
- (
- 'trkx'
- <DMUS_IO_TRACK_EXTRAS_HEADER> // DX8 Track flags header
- )
- *)
- (* File io for DirectMusic reference chunk.
- This is used to embed a reference to an object.
- *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_REF_LIST = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('R') shl 16) or (Byte('F') shl 24)); // mmioFOURCC('D','M','R','F')
- {$EXTERNALSYM DMUS_FOURCC_REF_LIST}
- DMUS_FOURCC_REF_CHUNK = DWORD(Byte('r') or (Byte('e') shl 8) or (Byte('f') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('r','e','f','h')
- {$EXTERNALSYM DMUS_FOURCC_REF_CHUNK}
- DMUS_FOURCC_DATE_CHUNK = DWORD(Byte('d') or (Byte('a') shl 8) or (Byte('t') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('d','a','t','e')
- {$EXTERNALSYM DMUS_FOURCC_DATE_CHUNK}
- DMUS_FOURCC_NAME_CHUNK = DWORD(Byte('n') or (Byte('a') shl 8) or (Byte('m') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('n','a','m','e')
- {$EXTERNALSYM DMUS_FOURCC_NAME_CHUNK}
- DMUS_FOURCC_FILE_CHUNK = DWORD(Byte('f') or (Byte('i') shl 8) or (Byte('l') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('f','i','l','e')
- {$EXTERNALSYM DMUS_FOURCC_FILE_CHUNK}
- type
- PDMusIoReference = ^TDMusIoReference;
- _DMUS_IO_REFERENCE = packed record
- guidClassID: TGUID; (* Class id is always required. *)
- dwValidData: DWORD; (* Flags. *)
- end;
- {$EXTERNALSYM _DMUS_IO_REFERENCE}
- DMUS_IO_REFERENCE = _DMUS_IO_REFERENCE;
- {$EXTERNALSYM DMUS_IO_REFERENCE}
- TDMusIoReference = _DMUS_IO_REFERENCE;
- (*
- LIST
- (
- 'DMRF' // DirectMusic Reference chunk
- <refh-ck> // Reference header chunk
- [<guid-ck>] // Optional object GUID.
- [<date-ck>] // Optional file date.
- [<name-ck>] // Optional name.
- [<file-ck>] // Optional file name.
- [<catg-ck>] // Optional category name.
- [<vers-ck>] // Optional version info.
- )
- // <refh-ck>
- 'refh'
- (
- <DMUS_IO_REFERENCE>
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <date-ck>
- date
- (
- <FILETIME>
- )
- // <name-ck>
- name
- (
- // Name, stored as NULL terminated string of WCHARs
- )
- // <file-ck>
- file
- (
- // File name, stored as NULL terminated string of WCHARs
- )
- // <catg-ck>
- catg
- (
- // Category name, stored as NULL terminated string of WCHARs
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- *)
- const
- (* Chord Maps *)
- (* runtime chunks *)
- DMUS_FOURCC_CHORDMAP_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('P') shl 16) or (Byte('R') shl 24)); // mmioFOURCC('D','M','P','R')
- {$EXTERNALSYM DMUS_FOURCC_CHORDMAP_FORM}
- DMUS_FOURCC_IOCHORDMAP_CHUNK = DWORD(Byte('p') or (Byte('e') shl 8) or (Byte('r') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','e','r','h')
- {$EXTERNALSYM DMUS_FOURCC_IOCHORDMAP_CHUNK}
- DMUS_FOURCC_SUBCHORD_CHUNK = DWORD(Byte('c') or (Byte('h') shl 8) or (Byte('d') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('c','h','d','t')
- {$EXTERNALSYM DMUS_FOURCC_SUBCHORD_CHUNK}
- DMUS_FOURCC_CHORDENTRY_CHUNK = DWORD(Byte('c') or (Byte('h') shl 8) or (Byte('e') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('c','h','e','h')
- {$EXTERNALSYM DMUS_FOURCC_CHORDENTRY_CHUNK}
- DMUS_FOURCC_SUBCHORDID_CHUNK = DWORD(Byte('s') or (Byte('b') shl 8) or (Byte('c') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('s','b','c','n')
- {$EXTERNALSYM DMUS_FOURCC_SUBCHORDID_CHUNK}
- DMUS_FOURCC_IONEXTCHORD_CHUNK = DWORD(Byte('n') or (Byte('c') shl 8) or (Byte('r') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('n','c','r','d')
- {$EXTERNALSYM DMUS_FOURCC_IONEXTCHORD_CHUNK}
- DMUS_FOURCC_NEXTCHORDSEQ_CHUNK = DWORD(Byte('n') or (Byte('c') shl 8) or (Byte('s') shl 16) or (Byte('q') shl 24)); // mmioFOURCC('n','c','s','q')
- {$EXTERNALSYM DMUS_FOURCC_NEXTCHORDSEQ_CHUNK}
- DMUS_FOURCC_IOSIGNPOST_CHUNK = DWORD(Byte('s') or (Byte('p') shl 8) or (Byte('s') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('s','p','s','h')
- {$EXTERNALSYM DMUS_FOURCC_IOSIGNPOST_CHUNK}
- DMUS_FOURCC_CHORDNAME_CHUNK = DWORD(Byte('I') or (Byte('N') shl 8) or (Byte('A') shl 16) or (Byte('M') shl 24)); // mmioFOURCC('I','N','A','M')
- {$EXTERNALSYM DMUS_FOURCC_CHORDNAME_CHUNK}
- (* runtime list chunks *)
- DMUS_FOURCC_CHORDENTRY_LIST = DWORD(Byte('c') or (Byte('h') shl 8) or (Byte('o') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('c','h','o','e')
- {$EXTERNALSYM DMUS_FOURCC_CHORDENTRY_LIST}
- DMUS_FOURCC_CHORDMAP_LIST = DWORD(Byte('c') or (Byte('m') shl 8) or (Byte('a') shl 16) or (Byte('p') shl 24)); // mmioFOURCC('c','m','a','p')
- {$EXTERNALSYM DMUS_FOURCC_CHORDMAP_LIST}
- DMUS_FOURCC_CHORD_LIST = DWORD(Byte('c') or (Byte('h') shl 8) or (Byte('r') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('c','h','r','d')
- {$EXTERNALSYM DMUS_FOURCC_CHORD_LIST}
- DMUS_FOURCC_CHORDPALETTE_LIST = DWORD(Byte('c') or (Byte('h') shl 8) or (Byte('p') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('c','h','p','l')
- {$EXTERNALSYM DMUS_FOURCC_CHORDPALETTE_LIST}
- DMUS_FOURCC_CADENCE_LIST = DWORD(Byte('c') or (Byte('a') shl 8) or (Byte('d') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('c','a','d','e')
- {$EXTERNALSYM DMUS_FOURCC_CADENCE_LIST}
- DMUS_FOURCC_SIGNPOSTITEM_LIST = DWORD(Byte('s') or (Byte('p') shl 8) or (Byte('s') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('s','p','s','t')
- {$EXTERNALSYM DMUS_FOURCC_SIGNPOSTITEM_LIST}
- DMUS_FOURCC_SIGNPOST_LIST = DWORD(Byte('s') or (Byte('p') shl 8) or (Byte('s') shl 16) or (Byte('q') shl 24)); // mmioFOURCC('s','p','s','q')
- {$EXTERNALSYM DMUS_FOURCC_SIGNPOST_LIST}
- (* values for dwChord field of DMUS_IO_PERS_SIGNPOST *)
- (* DMUS_SIGNPOSTF_ flags are also used in templates (DMUS_IO_SIGNPOST) *)
- DMUS_SIGNPOSTF_A = 1;
- {$EXTERNALSYM DMUS_SIGNPOSTF_A}
- DMUS_SIGNPOSTF_B = 2;
- {$EXTERNALSYM DMUS_SIGNPOSTF_B}
- DMUS_SIGNPOSTF_C = 4;
- {$EXTERNALSYM DMUS_SIGNPOSTF_C}
- DMUS_SIGNPOSTF_D = 8;
- {$EXTERNALSYM DMUS_SIGNPOSTF_D}
- DMUS_SIGNPOSTF_E = $10;
- {$EXTERNALSYM DMUS_SIGNPOSTF_E}
- DMUS_SIGNPOSTF_F = $20;
- {$EXTERNALSYM DMUS_SIGNPOSTF_F}
- DMUS_SIGNPOSTF_LETTER = (DMUS_SIGNPOSTF_A or DMUS_SIGNPOSTF_B or DMUS_SIGNPOSTF_C or DMUS_SIGNPOSTF_D or DMUS_SIGNPOSTF_E or DMUS_SIGNPOSTF_F);
- {$EXTERNALSYM DMUS_SIGNPOSTF_LETTER}
- DMUS_SIGNPOSTF_1 = $100;
- {$EXTERNALSYM DMUS_SIGNPOSTF_1}
- DMUS_SIGNPOSTF_2 = $200;
- {$EXTERNALSYM DMUS_SIGNPOSTF_2}
- DMUS_SIGNPOSTF_3 = $400;
- {$EXTERNALSYM DMUS_SIGNPOSTF_3}
- DMUS_SIGNPOSTF_4 = $800;
- {$EXTERNALSYM DMUS_SIGNPOSTF_4}
- DMUS_SIGNPOSTF_5 = $1000;
- {$EXTERNALSYM DMUS_SIGNPOSTF_5}
- DMUS_SIGNPOSTF_6 = $2000;
- {$EXTERNALSYM DMUS_SIGNPOSTF_6}
- DMUS_SIGNPOSTF_7 = $4000;
- {$EXTERNALSYM DMUS_SIGNPOSTF_7}
- DMUS_SIGNPOSTF_ROOT = (DMUS_SIGNPOSTF_1 or DMUS_SIGNPOSTF_2 or DMUS_SIGNPOSTF_3 or DMUS_SIGNPOSTF_4 or DMUS_SIGNPOSTF_5 or DMUS_SIGNPOSTF_6 or DMUS_SIGNPOSTF_7);
- {$EXTERNALSYM DMUS_SIGNPOSTF_ROOT}
- DMUS_SIGNPOSTF_CADENCE = $8000;
- {$EXTERNALSYM DMUS_SIGNPOSTF_CADENCE}
- // values for dwFlags field of DMUS_IO_CHORDMAP
- DMUS_CHORDMAPF_VERSION8 = 1; // Chordmap is version 8 or above.
- {$EXTERNALSYM DMUS_CHORDMAPF_VERSION8}
- // values for dwChord field of DMUS_IO_PERS_SIGNPOST
- DMUS_SPOSTCADENCEF_1 = 2; // Use the first cadence chord.
- {$EXTERNALSYM DMUS_SPOSTCADENCEF_1}
- DMUS_SPOSTCADENCEF_2 = 4; // Use the second cadence chord.
- {$EXTERNALSYM DMUS_SPOSTCADENCEF_2}
- type
- // run time data structs
- PDMusIoChordMap = ^TDMusIoChordMap;
- _DMUS_IO_CHORDMAP = packed record
- wszLoadName: array[0..19] of WideChar;
- dwScalePattern: DWORD;
- dwFlags: DWORD; // Various flags. Only lower 16 bits are significant.
- end;
- {$EXTERNALSYM _DMUS_IO_CHORDMAP}
- DMUS_IO_CHORDMAP = _DMUS_IO_CHORDMAP;
- {$EXTERNALSYM DMUS_IO_CHORDMAP}
- TDMusIoChordMap = _DMUS_IO_CHORDMAP;
- PDMusIoChordmapSubChord = ^TDMusIoChordmapSubChord;
- _DMUS_IO_CHORDMAP_SUBCHORD = packed record
- dwChordPattern: DWORD;
- dwScalePattern: DWORD;
- dwInvertPattern: DWORD;
- bChordRoot: Byte;
- bScaleRoot: Byte;
- wCFlags: Word;
- dwLevels: DWORD; // parts or which subchord levels this chord supports
- end;
- {$EXTERNALSYM _DMUS_IO_CHORDMAP_SUBCHORD}
- DMUS_IO_CHORDMAP_SUBCHORD = _DMUS_IO_CHORDMAP_SUBCHORD;
- {$EXTERNALSYM DMUS_IO_CHORDMAP_SUBCHORD}
- TDMusIoChordmapSubChord = _DMUS_IO_CHORDMAP_SUBCHORD;
- // Legacy name...
- DMUS_IO_PERS_SUBCHORD = DMUS_IO_CHORDMAP_SUBCHORD;
- {$EXTERNALSYM DMUS_IO_PERS_SUBCHORD}
- PDMusIoChordEntry = ^TDMusIoChordEntry;
- _DMUS_IO_CHORDENTRY = packed record
- dwFlags: DWORD;
- wConnectionID: Word; // replaces runtime "pointer to this"
- end;
- {$EXTERNALSYM _DMUS_IO_CHORDENTRY}
- DMUS_IO_CHORDENTRY = _DMUS_IO_CHORDENTRY;
- {$EXTERNALSYM DMUS_IO_CHORDENTRY}
- TDMusIoChordEntry = _DMUS_IO_CHORDENTRY;
- PDMusIoNextChord = ^TDMusIoNextChord;
- _DMUS_IO_NEXTCHORD = packed record
- dwFlags: DWORD;
- nWeight: Word;
- wMinBeats: Word;
- wMaxBeats: Word;
- wConnectionID: Word; // points to an ioChordEntry
- end;
- {$EXTERNALSYM _DMUS_IO_NEXTCHORD}
- DMUS_IO_NEXTCHORD = _DMUS_IO_NEXTCHORD;
- {$EXTERNALSYM DMUS_IO_NEXTCHORD}
- TDMusIoNextChord = _DMUS_IO_NEXTCHORD;
- PDMusIoChordMapSignPost = ^TDMusIoChordMapSignPost;
- _DMUS_IO_CHORDMAP_SIGNPOST = packed record
- dwChords: DWORD; // 1bit per group
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _DMUS_IO_CHORDMAP_SIGNPOST}
- DMUS_IO_CHORDMAP_SIGNPOST = _DMUS_IO_CHORDMAP_SIGNPOST;
- {$EXTERNALSYM DMUS_IO_CHORDMAP_SIGNPOST}
- TDMusIoChordMapSignPost = _DMUS_IO_CHORDMAP_SIGNPOST;
- // Legacy name...
- DMUS_IO_PERS_SIGNPOST = DMUS_IO_CHORDMAP_SIGNPOST;
- {$EXTERNALSYM DMUS_IO_PERS_SIGNPOST}
- (*
- RIFF
- (
- 'DMPR'
- <perh-ck> // Chord map header chunk
- [<guid-ck>] // guid chunk
- [<vers-ck>] // version chunk (two DWORDS)
- [<UNFO-list>] // Unfo chunk
- <chdt-ck> // subchord database
- <chpl-list> // chord palette
- <cmap-list> // chord map
- <spsq-list> // signpost list
- )
- <cmap-list> ::= LIST('cmap' <choe-list> )
- <choe-list> ::= LIST('choe'
- <cheh-ck> // chord entry data
- <chrd-list> // chord definition
- <ncsq-ck> // connecting(next) chords
- )
- <chrd-list> ::= LIST('chrd'
- <INAM-ck> // name of chord in wide char format
- <sbcn-ck> // list of subchords composing chord
- )
- <chpl-list> ::= LIST('chpl'
- <chrd-list> ... // chord definition
- )
- <spsq-list> ::== LIST('spsq' <spst-list> ... )
- <spst-list> ::= LIST('spst'
- <spsh-ck>
- <chrd-list>
- [<cade-list>]
- )
- <cade-list> ::= LIST('cade' <chrd-list> ...)
- <perh-ck> ::= perh(<DMUS_IO_CHORDMAP>)
- <chdt-ck> ::= chdt(<cbChordSize::WORD>
- <DMUS_IO_PERS_SUBCHORD> ... )
- <cheh-ck> ::= cheh(<DMUS_IO_CHORDENTRY>)
- <sbcn-ck> ::= sbcn(<cSubChordID:WORD> ...)
- <ncsq-ck> ::= ncsq(<wNextChordSize:WORD>
- <DMUS_IO_NEXTCHORD>...)
- <spsh-ck> ::= spsh(<DMUS_IO_PERS_SIGNPOST>)
- *)
- (* File io for DirectMusic Script object *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_SCRIPT_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('S') shl 16) or (Byte('C') shl 24)); // mmioFOURCC('D','M','S','C')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPT_FORM}
- DMUS_FOURCC_SCRIPT_CHUNK = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('h') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('s','c','h','d')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPT_CHUNK}
- DMUS_FOURCC_SCRIPTVERSION_CHUNK = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('v') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('s','c','v','e')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTVERSION_CHUNK}
- DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('l') shl 16) or (Byte('a') shl 24)); // mmioFOURCC('s','c','l','a')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK}
- DMUS_FOURCC_SCRIPTSOURCE_CHUNK = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('s') shl 16) or (Byte('r') shl 24)); // mmioFOURCC('s','c','s','r')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTSOURCE_CHUNK}
- type
- (* io structures: *)
- PDMusIoScriptHeader = ^TDMusIoScriptHeader;
- _DMUS_IO_SCRIPT_HEADER = packed record
- dwFlags: DWORD; // DMUS_SCRIPTIOF_ flags
- end;
- {$EXTERNALSYM _DMUS_IO_SCRIPT_HEADER}
- DMUS_IO_SCRIPT_HEADER = _DMUS_IO_SCRIPT_HEADER;
- {$EXTERNALSYM DMUS_IO_SCRIPT_HEADER}
- TDMusIoScriptHeader = _DMUS_IO_SCRIPT_HEADER;
- const
- DMUS_SCRIPTIOF_LOAD_ALL_CONTENT = (1 shl 0);
- {$EXTERNALSYM DMUS_SCRIPTIOF_LOAD_ALL_CONTENT}
- // If set, when the script loads it will also load all the content in its container.
- DMUS_SCRIPTIOF_DOWNLOAD_ALL_SEGMENTS = (1 shl 1);
- {$EXTERNALSYM DMUS_SCRIPTIOF_DOWNLOAD_ALL_SEGMENTS}
- (* If set and LOAD_ALL_CONTENT is also set, when the script initializes it will also download all the segments in its container.
- If set and LOAD_ALL_CONTENT is not set, when the script calls segment.Load on a segment then the segment will also be downloaded.
- If not set, the script must manually download and unload by calling segment.DownloadSoundData and segment.UnloadSoundData. *)
- (*
- RIFF
- (
- 'DMSC' // DirectMusic Script chunk
- <schd-ck> // Script header chunk
- [<guid-ck>] // GUID for script
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- <scve-ck> // Version of DirectMusic this script was authored to run against
- <DMCN-form> // Container of content referenced by the script.
- <scla-ck> // ActiveX scripting language in which the script is written
- <scsr-ck> or <DMRF> // The script's source code.
- // If scsr-ck, the source is embedding in the chunk.
- // If DMRF, it is a reference of where to find a text file with the source.
- // Class id (guidClassID in DMUS_IO_REFERENCE) must be GUID_NULL because
- // this text file is not a DirectMusic object in its own right.
- )
- // <schd-ck>
- 'schd'
- (
- <DMUS_FOURCC_SCRIPT_CHUNK>
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- vers
- (
- <DMUS_IO_VERSION>
- )
- // <scve-ck>
- scve
- (
- <DMUS_IO_VERSION>
- )
- 'scla'
- (
- // Language name, stored as NULL terminated string of WCHARs
- )
- 'scsr'
- (
- // Source code, stored as NULL terminated string of WCHARs
- )
- *)
- const
- (* Signpost tracks *)
- DMUS_FOURCC_SIGNPOST_TRACK_CHUNK = DWORD(Byte('s') or (Byte('g') shl 8) or (Byte('n') shl 16) or (Byte('p') shl 24)); // mmioFOURCC('s','g','n','p')
- {$EXTERNALSYM DMUS_FOURCC_SIGNPOST_TRACK_CHUNK}
- type
- PDMusIoSignPost = ^TDMusIoSignPost;
- _DMUS_IO_SIGNPOST = packed record
- mtTime: TMusicTime;
- dwChords: DWORD;
- wMeasure: Word;
- end;
- {$EXTERNALSYM _DMUS_IO_SIGNPOST}
- DMUS_IO_SIGNPOST = _DMUS_IO_SIGNPOST;
- {$EXTERNALSYM DMUS_IO_SIGNPOST}
- TDMusIoSignPost = _DMUS_IO_SIGNPOST;
- (*
- // <sgnp-list>
- 'sgnp'
- (
- //sizeof DMUS_IO_SIGNPOST: DWORD
- <DMUS_IO_SIGNPOST>...
- )
- *)
- const
- DMUS_FOURCC_MUTE_CHUNK = DWORD(Byte('m') or (Byte('u') shl 8) or (Byte('t') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('m','u','t','e')
- {$EXTERNALSYM DMUS_FOURCC_MUTE_CHUNK}
- type
- PDMusIoMute = ^TDMusIoMute;
- _DMUS_IO_MUTE = packed record
- mtTime: TMusicTime;
- dwPChannel: DWORD;
- dwPChannelMap: DWORD;
- end;
- {$EXTERNALSYM _DMUS_IO_MUTE}
- DMUS_IO_MUTE = _DMUS_IO_MUTE;
- {$EXTERNALSYM DMUS_IO_MUTE}
- TDMusIoMute = _DMUS_IO_MUTE;
- (*
- // <mute-list>
- 'mute'
- (
- //sizeof DMUS_IO_MUTE:DWORD
- <DMUS_IO_MUTE>...
- )
- *)
- const
- (* Used for both style and chord map tracks *)
- DMUS_FOURCC_TIME_STAMP_CHUNK = DWORD(Byte('s') or (Byte('t') shl 8) or (Byte('m') shl 16) or (Byte('p') shl 24)); // mmioFOURCC('s','t','m','p')
- {$EXTERNALSYM DMUS_FOURCC_TIME_STAMP_CHUNK}
- (* Style tracks *)
- DMUS_FOURCC_STYLE_TRACK_LIST = DWORD(Byte('s') or (Byte('t') shl 8) or (Byte('t') shl 16) or (Byte('r') shl 24)); // mmioFOURCC('s','t','t','r')
- {$EXTERNALSYM DMUS_FOURCC_STYLE_TRACK_LIST}
- DMUS_FOURCC_STYLE_REF_LIST = DWORD(Byte('s') or (Byte('t') shl 8) or (Byte('r') shl 16) or (Byte('f') shl 24)); // mmioFOURCC('s','t','r','f')
- {$EXTERNALSYM DMUS_FOURCC_STYLE_REF_LIST}
- (*
- // <sttr-list>
- LIST('sttr'
- (
- <strf-list>... // Array of Style references
- )
- // <strf-list>
- LIST('strf'
- (
- <stmp-ck>
- <DMRF>
- )
- // <stmp-ck>
- 'stmp'
- (
- // time:DWORD
- )
- *)
- const
- (* Chord map tracks *)
- DMUS_FOURCC_PERS_TRACK_LIST = DWORD(Byte('p') or (Byte('f') shl 8) or (Byte('t') shl 16) or (Byte('r') shl 24)); // mmioFOURCC('p','f','t','r')
- {$EXTERNALSYM DMUS_FOURCC_PERS_TRACK_LIST}
- DMUS_FOURCC_PERS_REF_LIST = DWORD(Byte('p') or (Byte('f') shl 8) or (Byte('r') shl 16) or (Byte('f') shl 24)); // mmioFOURCC('p','f','r','f')
- {$EXTERNALSYM DMUS_FOURCC_PERS_REF_LIST}
- (*
- // <pftr-list>
- LIST('pftr'
- (
- <pfrf-list>... // Array of Chord map references
- )
- // <pfrf-list>
- LIST('pfrf'
- (
- <stmp-ck>
- <DMRF>
- )
- // <stmp-ck>
- 'stmp'
- (
- // time:DWORD
- )
- *)
- DMUS_FOURCC_TEMPO_TRACK = DWORD(Byte('t') or (Byte('e') shl 8) or (Byte('t') shl 16) or (Byte('r') shl 24)); // mmioFOURCC('t','e','t','r')
- {$EXTERNALSYM DMUS_FOURCC_TEMPO_TRACK}
- (*
- // tempo array
- 'tetr'
- (
- // sizeof DMUS_IO_TEMPO_ITEM: DWORD
- <DMUS_IO_TEMPO_ITEM>...
- )
- *)
- DMUS_FOURCC_SEQ_TRACK = DWORD(Byte('s') or (Byte('e') shl 8) or (Byte('q') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('s','e','q','t')
- {$EXTERNALSYM DMUS_FOURCC_SEQ_TRACK}
- DMUS_FOURCC_SEQ_LIST = DWORD(Byte('e') or (Byte('v') shl 8) or (Byte('t') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('e','v','t','l')
- {$EXTERNALSYM DMUS_FOURCC_SEQ_LIST}
- DMUS_FOURCC_CURVE_LIST = DWORD(Byte('c') or (Byte('u') shl 8) or (Byte('r') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('c','u','r','l')
- {$EXTERNALSYM DMUS_FOURCC_CURVE_LIST}
- (*
- // sequence track
- 'seqt'
- (
- // sequence array
- 'evtl'
- (
- // sizeof DMUS_IO_SEQ_ITEM: DWORD
- <DMUS_IO_SEQ_ITEM>...
- )
- // curve array
- 'curl'
- (
- // sizeof DMUS_IO_CURVE_ITEM: DWORD
- <DMUS_IO_CURVE_ITEM>...
- )
- )
- *)
- DMUS_FOURCC_SYSEX_TRACK = DWORD(Byte('s') or (Byte('y') shl 8) or (Byte('e') shl 16) or (Byte('x') shl 24)); // mmioFOURCC('s','y','e','x')
- {$EXTERNALSYM DMUS_FOURCC_SYSEX_TRACK}
- (*
- // sysex track
- 'syex'
- (
- {
- <DMUS_IO_SYSEX_ITEM>
- <BYTE>... // Array of bytes, length defined in the DMUS_IO_SYSEXITEM structure
- }...
- )
- *)
- DMUS_FOURCC_TIMESIGNATURE_TRACK = DWORD(Byte('t') or (Byte('i') shl 8) or (Byte('m') shl 16) or (Byte('s') shl 24)); // mmioFOURCC('t','i','m','s')
- {$EXTERNALSYM DMUS_FOURCC_TIMESIGNATURE_TRACK}
- type
- PDMusIoTimeSignatureItem = ^TDMusIoTimeSignatureItem;
- _DMUS_IO_TIMESIGNATURE_ITEM = packed record
- lTime: TMusicTime;
- bBeatsPerMeasure: Byte; // beats per measure (top of time sig)
- bBeat: Byte; // what note receives the beat (bottom of time sig.)
- // we can assume that 0 means 256th note
- wGridsPerBeat: Word; // grids per beat
- end;
- {$EXTERNALSYM _DMUS_IO_TIMESIGNATURE_ITEM}
- DMUS_IO_TIMESIGNATURE_ITEM = _DMUS_IO_TIMESIGNATURE_ITEM;
- {$EXTERNALSYM DMUS_IO_TIMESIGNATURE_ITEM}
- TDMusIoTimeSignatureItem = _DMUS_IO_TIMESIGNATURE_ITEM;
- (* DX6 time signature track
- 'tims'
- (
- // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD
- <DMUS_IO_TIMESIGNATURE_ITEM>...
- )
- *)
- (* DX8 Time signature track. The track has been updated from DX7 to support a list of
- RIFF chunks. This will allow the time signature track to expand in the future.
- *)
- const
- DMUS_FOURCC_TIMESIGTRACK_LIST = DWORD(Byte('T') or (Byte('I') shl 8) or (Byte('M') shl 16) or (Byte('S') shl 24)); // mmioFOURCC('T','I','M','S')
- {$EXTERNALSYM DMUS_FOURCC_TIMESIGTRACK_LIST}
- DMUS_FOURCC_TIMESIG_CHUNK = DMUS_FOURCC_TIMESIGNATURE_TRACK;
- {$EXTERNALSYM DMUS_FOURCC_TIMESIG_CHUNK}
- (*
- LIST
- (
- 'TIMS' // Time Signature Track list-type
- <tims-ck> // Chunk containing an array of time signatures
- )
- 'tims'
- (
- // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD
- <DMUS_IO_TIMESIGNATURE_ITEM>...
- )
- *)
- (* DX8 Marker track. This is used to store valid start points and other
- flow control parameters that may come later. For example, if we want
- to implement more sophisticated looping and branching constructs, they
- would live in this track.
- *)
- const
- DMUS_FOURCC_MARKERTRACK_LIST = DWORD(Byte('M') or (Byte('A') shl 8) or (Byte('R') shl 16) or (Byte('K') shl 24)); // mmioFOURCC('M','A','R','K')
- {$EXTERNALSYM DMUS_FOURCC_MARKERTRACK_LIST}
- DMUS_FOURCC_VALIDSTART_CHUNK = DWORD(Byte('v') or (Byte('a') shl 8) or (Byte('l') shl 16) or (Byte('s') shl 24)); // mmioFOURCC('v','a','l','s')
- {$EXTERNALSYM DMUS_FOURCC_VALIDSTART_CHUNK}
- DMUS_FOURCC_PLAYMARKER_CHUNK = DWORD(Byte('p') or (Byte('l') shl 8) or (Byte('a') shl 16) or (Byte('y') shl 24)); // mmioFOURCC('p','l','a','y')
- {$EXTERNALSYM DMUS_FOURCC_PLAYMARKER_CHUNK}
- type
- (* io structures *)
- PDMusIoValidStart = ^TDMusIoValidStart;
- _DMUS_IO_VALID_START = packed record
- mtTime: TMusicTime; // Time of a legal start.
- end;
- {$EXTERNALSYM _DMUS_IO_VALID_START}
- DMUS_IO_VALID_START = _DMUS_IO_VALID_START;
- {$EXTERNALSYM DMUS_IO_VALID_START}
- TDMusIoValidStart = _DMUS_IO_VALID_START;
- PDMusIoPlayMarker = ^TDMusIoPlayMarker;
- _DMUS_IO_PLAY_MARKER = packed record
- mtTime: TMusicTime; // Time of a next legal play point marker.
- end;
- {$EXTERNALSYM _DMUS_IO_PLAY_MARKER}
- DMUS_IO_PLAY_MARKER = _DMUS_IO_PLAY_MARKER;
- {$EXTERNALSYM DMUS_IO_PLAY_MARKER}
- TDMusIoPlayMarker = _DMUS_IO_PLAY_MARKER;
- (*
- LIST
- (
- 'MARK' // Marker Track list-type
- [<vals-ck>] // Chunk containing an array of start points
- [<play-ck>] // Chunk containing an array of play start markers
- )
- 'vals'
- (
- // size of DMUS_IO_VALID_START : DWORD
- <DMUS_IO_VALID_START>...
- )
- 'play'
- (
- // size of DMUS_IO_PLAY_MARKER : DWORD
- <DMUS_IO_PLAY_MARKER>...
- )
- *)
- (* segment trigger tracks *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_SEGTRACK_LIST = DWORD(Byte('s') or (Byte('e') shl 8) or (Byte('g') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('s','e','g','t')
- {$EXTERNALSYM DMUS_FOURCC_SEGTRACK_LIST}
- DMUS_FOURCC_SEGTRACK_CHUNK = DWORD(Byte('s') or (Byte('g') shl 8) or (Byte('t') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('s','g','t','h')
- {$EXTERNALSYM DMUS_FOURCC_SEGTRACK_CHUNK}
- DMUS_FOURCC_SEGMENTS_LIST = DWORD(Byte('l') or (Byte('s') shl 8) or (Byte('g') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('l','s','g','l')
- {$EXTERNALSYM DMUS_FOURCC_SEGMENTS_LIST}
- DMUS_FOURCC_SEGMENT_LIST = DWORD(Byte('l') or (Byte('s') shl 8) or (Byte('e') shl 16) or (Byte('g') shl 24)); // mmioFOURCC('l','s','e','g')
- {$EXTERNALSYM DMUS_FOURCC_SEGMENT_LIST}
- DMUS_FOURCC_SEGMENTITEM_CHUNK = DWORD(Byte('s') or (Byte('g') shl 8) or (Byte('i') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('s','g','i','h')
- {$EXTERNALSYM DMUS_FOURCC_SEGMENTITEM_CHUNK}
- DMUS_FOURCC_SEGMENTITEMNAME_CHUNK = DWORD(Byte('s') or (Byte('n') shl 8) or (Byte('a') shl 16) or (Byte('m') shl 24)); // mmioFOURCC('s','n','a','m')
- {$EXTERNALSYM DMUS_FOURCC_SEGMENTITEMNAME_CHUNK}
- type
- (* io structures *)
- PDMusIoSegmentTrackHeader = ^TDMusIoSegmentTrackHeader;
- _DMUS_IO_SEGMENT_TRACK_HEADER = packed record
- dwFlags: DWORD; // Reserved leave as 0.
- end;
- {$EXTERNALSYM _DMUS_IO_SEGMENT_TRACK_HEADER}
- DMUS_IO_SEGMENT_TRACK_HEADER = _DMUS_IO_SEGMENT_TRACK_HEADER;
- {$EXTERNALSYM DMUS_IO_SEGMENT_TRACK_HEADER}
- TDMusIoSegmentTrackHeader = _DMUS_IO_SEGMENT_TRACK_HEADER;
- PDMusIoSegmentItemHeader = ^TDMusIoSegmentItemHeader;
- _DMUS_IO_SEGMENT_ITEM_HEADER = packed record
- lTimeLogical: TMusicTime; // Position in track list. Time in the music with which the event is associated.
- lTimePhysical: TMusicTime; // Precise time event will be triggered. Should be close to logical time.
- dwPlayFlags: DWORD; // Flags for PlaySegment().
- dwFlags: DWORD; // Flags.
- end;
- {$EXTERNALSYM _DMUS_IO_SEGMENT_ITEM_HEADER}
- DMUS_IO_SEGMENT_ITEM_HEADER = _DMUS_IO_SEGMENT_ITEM_HEADER;
- {$EXTERNALSYM DMUS_IO_SEGMENT_ITEM_HEADER}
- TDMusIoSegmentItemHeader = _DMUS_IO_SEGMENT_ITEM_HEADER;
- const
- (* values for dwflags field of DMUS_IO_SEGMENT_ITEM_HEADER *)
- DMUS_SEGMENTTRACKF_MOTIF = 1; // interpret DMRF as link to style, and use snam as the name of a motif within the style
- {$EXTERNALSYM DMUS_SEGMENTTRACKF_MOTIF}
- (*
- LIST
- (
- 'segt' // DirectMusic Segment Trigger Track form-type
- [<sgth-ck>] // Segment track header
- <lsgl-list> // List of Segment Lists
- )
- // <sgth-ck>
- 'sgth'
- (
- <DMUS_IO_SEGMENT_TRACK_HEADER>
- )
- // <lsgl-list>
- LIST
- (
- 'lsgl' // Array of segments
- <lseg-list>... // Each segment is encapsulated in a list (that way it can still be riff parsed.)
- )
- // <lseg-list>
- LIST
- (
- 'lseg'
- <sgih-ck>
- <DMRF-list> // Link to a segment or style file.
- [<snam-ck>] // Name field. Used with DMUS_SEGMENTTRACKF_MOTIF flag.
- )
- // <sgih-ck> // segment item header
- (
- <DMUS_IO_SEGMENT_ITEM_HEADER> // Segment item header
- )
- // <snam-ck>
- (
- // Name, stored as NULL terminated string of WCHARs
- )
- *)
- (* Script track. *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_SCRIPTTRACK_LIST = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('r') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('s','c','r','t')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTTRACK_LIST}
- DMUS_FOURCC_SCRIPTTRACKEVENTS_LIST = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('r') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('s','c','r','l')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTTRACKEVENTS_LIST}
- DMUS_FOURCC_SCRIPTTRACKEVENT_LIST = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('r') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('s','c','r','e')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTTRACKEVENT_LIST}
- DMUS_FOURCC_SCRIPTTRACKEVENTHEADER_CHUNK = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('r') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('s','c','r','h')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTTRACKEVENTHEADER_CHUNK}
- DMUS_FOURCC_SCRIPTTRACKEVENTNAME_CHUNK = DWORD(Byte('s') or (Byte('c') shl 8) or (Byte('r') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('s','c','r','n')
- {$EXTERNALSYM DMUS_FOURCC_SCRIPTTRACKEVENTNAME_CHUNK}
- (* Flags for DMUS_IO_SCRIPTTRACK_TIMING
- *)
- DMUS_IO_SCRIPTTRACKF_PREPARE = (1 shl 0); (* Fire event in advance of time stamp, at Prepare time. This is the default because it leaves the script time to change the music happening at the target time. *)
- {$EXTERNALSYM DMUS_IO_SCRIPTTRACKF_PREPARE}
- DMUS_IO_SCRIPTTRACKF_QUEUE = (1 shl 1); (* Fire event just before time stamp, at Queue time. *)
- {$EXTERNALSYM DMUS_IO_SCRIPTTRACKF_QUEUE}
- DMUS_IO_SCRIPTTRACKF_ATTIME = (1 shl 2); (* Fire event right at the time stamp. *)
- {$EXTERNALSYM DMUS_IO_SCRIPTTRACKF_ATTIME}
- type
- PDMusIoScriptTrackEventHeader = ^TDMusIoScriptTrackEventHeader;
- _DMUS_IO_SCRIPTTRACK_EVENTHEADER = packed record
- dwFlags: DWORD; (* various bits ( see DMUS_IO_SCRIPTTRACKF_* ) *)
- lTimeLogical: TMusicTime; (* Position in track list. Time in the music with which the event is associated. *)
- lTimePhysical: TMusicTime; (* Precise time event will be triggered. Should be close to logical time. *)
- end;
- {$EXTERNALSYM _DMUS_IO_SCRIPTTRACK_EVENTHEADER}
- DMUS_IO_SCRIPTTRACK_EVENTHEADER = _DMUS_IO_SCRIPTTRACK_EVENTHEADER;
- {$EXTERNALSYM DMUS_IO_SCRIPTTRACK_EVENTHEADER}
- TDMusIoScriptTrackEventHeader = _DMUS_IO_SCRIPTTRACK_EVENTHEADER;
- (*
- // Script Track
- // <scrt-list>
- LIST
- (
- <scrl-list> // List of script events
- )
- // <scrl-list>
- LIST
- (
- <scre-list>... // Array of event descriptions
- )
- // <scre-list>
- LIST
- (
- <scrh-ck> // Event header chunk
- <DMRF>
- <scrn-ck> // Routine name
- )
- 'scrh'
- (
- <DMUS_IO_SCRIPTTRACK_EVENTHEADER>
- )
- 'scrn'
- (
- // Name, stored as NULL terminated string of WCHARs
- )
- *)
- (* Lyrics/Notification track. *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_LYRICSTRACK_LIST = DWORD(Byte('l') or (Byte('y') shl 8) or (Byte('r') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('l','y','r','t')
- {$EXTERNALSYM DMUS_FOURCC_LYRICSTRACK_LIST}
- DMUS_FOURCC_LYRICSTRACKEVENTS_LIST = DWORD(Byte('l') or (Byte('y') shl 8) or (Byte('r') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('l','y','r','l')
- {$EXTERNALSYM DMUS_FOURCC_LYRICSTRACKEVENTS_LIST}
- DMUS_FOURCC_LYRICSTRACKEVENT_LIST = DWORD(Byte('l') or (Byte('y') shl 8) or (Byte('r') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('l','y','r','e')
- {$EXTERNALSYM DMUS_FOURCC_LYRICSTRACKEVENT_LIST}
- DMUS_FOURCC_LYRICSTRACKEVENTHEADER_CHUNK = DWORD(Byte('l') or (Byte('y') shl 8) or (Byte('r') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('l','y','r','h')
- {$EXTERNALSYM DMUS_FOURCC_LYRICSTRACKEVENTHEADER_CHUNK}
- DMUS_FOURCC_LYRICSTRACKEVENTTEXT_CHUNK = DWORD(Byte('l') or (Byte('y') shl 8) or (Byte('r') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('l','y','r','n')
- {$EXTERNALSYM DMUS_FOURCC_LYRICSTRACKEVENTTEXT_CHUNK}
- type
- PDMusIoLyricsTrackEventHeader = ^TDMusIoLyricStrackEventHeader;
- _DMUS_IO_LYRICSTRACK_EVENTHEADER = packed record
- dwFlags: DWORD; (* Reserved leave as 0. *)
- dwTimingFlags: DWORD; (* Combination DMUS_PMSGF_TOOL_* flags. Determines the precise timing of when the notification happens. Invalid with the flag DMUS_PMSGF_REFTIME, DMUS_PMSGF_MUSICTIME, DMUS_PMSGF_TOOL_FLUSH, or DMUS_PMSGF_LOCKTOREFTIME. *)
- lTimeLogical: TMusicTime; (* Position in track list. Time in the music with which the event is associated. *)
- lTimePhysical: TMusicTime; (* Precise time event will be triggered. Should be close to logical time. *)
- end;
- {$EXTERNALSYM _DMUS_IO_LYRICSTRACK_EVENTHEADER}
- DMUS_IO_LYRICSTRACK_EVENTHEADER = _DMUS_IO_LYRICSTRACK_EVENTHEADER;
- {$EXTERNALSYM DMUS_IO_LYRICSTRACK_EVENTHEADER}
- TDMusIoLyricsTrackEventHeader = _DMUS_IO_LYRICSTRACK_EVENTHEADER;
- (*
- // Lyrics/Notification Track
- // <lyrt-list>
- LIST
- (
- <lyrl-list> // List of notification events
- )
- // <lyrl-list>
- LIST
- (
- <lyre-list>... // Array of event descriptions
- )
- // <lyre-list>
- LIST
- (
- <lyrh-ck> // Event header chunk
- <lyrn-ck> // Notification text
- )
- 'lyrh'
- (
- <DMUS_IO_LYRICSTRACK_EVENTHEADER>
- )
- 'lyrn'
- (
- // Name, stored as NULL terminated string of WCHARs
- )
- *)
- (* Parameter control track *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_PARAMCONTROLTRACK_TRACK_LIST = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('m') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('p','r','m','t')
- {$EXTERNALSYM DMUS_FOURCC_PARAMCONTROLTRACK_TRACK_LIST}
- DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_LIST = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('o') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('p','r','o','l')
- {$EXTERNALSYM DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_LIST}
- DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_CHUNK = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('o') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','r','o','h')
- {$EXTERNALSYM DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_CHUNK}
- DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_LIST = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('p') shl 16) or (Byte('l') shl 24)); // mmioFOURCC('p','r','p','l')
- {$EXTERNALSYM DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_LIST}
- DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_CHUNK = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('p') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','r','p','h')
- {$EXTERNALSYM DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_CHUNK}
- DMUS_FOURCC_PARAMCONTROLTRACK_CURVES_CHUNK = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('c') shl 16) or (Byte('c') shl 24)); // mmioFOURCC('p','r','c','c')
- {$EXTERNALSYM DMUS_FOURCC_PARAMCONTROLTRACK_CURVES_CHUNK}
- type
- PDMusIoParamControlTrackObjectHeader = ^TDMusIoParamControlTrackObjectHeader;
- _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER = packed record
- dwFlags: DWORD; (* Reserved. Must be zero. *)
- guidTimeFormat: TGUID; (* Time format to set the object to. Must be GUID_TIME_REFERNCE or GUID_TIME_MUSIC from medparam.h. *)
- (* Path for finding the object. These fields correspond to the first five parameters of IDirectMusicSegmentState::GetObjectInPath. *)
- dwPChannel: DWORD;
- dwStage: DWORD;
- dwBuffer: DWORD;
- guidObject: TGUID;
- dwIndex: DWORD;
- end;
- {$EXTERNALSYM _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER}
- DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER = _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER;
- {$EXTERNALSYM DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER}
- TDMusIoParamControlTrackObjectHeader = _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER;
- PDMusIoParamControlTrackParamHeader = ^TDMusIoParamControlTrackParamHeader;
- _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER = packed record
- dwFlags: DWORD; (* Reserved. Must be zero. *)
- dwIndex: DWORD; (* Index number of the parameter on the object *)
- end;
- {$EXTERNALSYM _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER}
- DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER = _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER;
- {$EXTERNALSYM DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER}
- TDMusIoParamControlTrackParamHeader = _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER;
- PDMusIoParamControlTrackCurveInfo = ^TDMusIoParamControlTrackCurveInfo;
- _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO = packed record
- mtStartTime: TMusicTime;
- mtEndTime: TMusicTime;
- fltStartValue: Single;
- fltEndValue: Single;
- dwCurveType: DWORD; (* One of the items from the MP_CURVE_TYPE enum in medparam.h *)
- dwFlags: DWORD; (* A combination of the MPF_ENVLP_* constants in medparam.h *)
- end;
- {$EXTERNALSYM _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO}
- DMUS_IO_PARAMCONTROLTRACK_CURVEINFO = _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO;
- {$EXTERNALSYM DMUS_IO_PARAMCONTROLTRACK_CURVEINFO}
- TDMusIoParamControlTrackCurveInfo = _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO;
- (*
- // <prmt-list>
- LIST
- (
- <prol-list>... // one for each object
- )
- // <prol-list>
- LIST
- (
- <proh-ck> // object header chunk
- <prpl-list>... // one for each parameter
- )
- // <proh-ck>
- proh
- (
- <DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER>
- )
- // <prpl-list>
- LIST
- (
- <prph-ck> // parameter header chunk
- <prcc-ck> // chunk containing an array of curves
- )
- // <prph-ck>
- prph
- (
- <DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER>
- )
- // <prcc-ck>
- prcc
- (
- // sizeof DMUS_IO_PARAMCONTROLTRACK_CURVEINFO:DWORD
- <DMUS_IO_PARAMCONTROLTRACK_CURVEINFO>... // curves, sorted in order of mtTime
- )
- *)
- (* DirectSoundBufferConfig FX Map *)
- const
- (* RIFF ids: *)
- DMUS_FOURCC_DSBC_FORM = DWORD(Byte('D') or (Byte('S') shl 8) or (Byte('B') shl 16) or (Byte('C') shl 24)); // mmioFOURCC('D','S','B','C')
- {$EXTERNALSYM DMUS_FOURCC_DSBC_FORM}
- DMUS_FOURCC_DSBD_CHUNK = DWORD(Byte('d') or (Byte('s') shl 8) or (Byte('b') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('d','s','b','d')
- {$EXTERNALSYM DMUS_FOURCC_DSBD_CHUNK}
- DMUS_FOURCC_BSID_CHUNK = DWORD(Byte('b') or (Byte('s') shl 8) or (Byte('i') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('b','s','i','d')
- {$EXTERNALSYM DMUS_FOURCC_BSID_CHUNK}
- DMUS_FOURCC_DS3D_CHUNK = DWORD(Byte('d') or (Byte('s') shl 8) or (Byte('3') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('d','s','3','d')
- {$EXTERNALSYM DMUS_FOURCC_DS3D_CHUNK}
- DMUS_FOURCC_DSBC_LIST = DWORD(Byte('f') or (Byte('x') shl 8) or (Byte('l') shl 16) or (Byte('s') shl 24)); // mmioFOURCC('f','x','l','s')
- {$EXTERNALSYM DMUS_FOURCC_DSBC_LIST}
- DMUS_FOURCC_DSFX_FORM = DWORD(Byte('D') or (Byte('S') shl 8) or (Byte('F') shl 16) or (Byte('X') shl 24)); // mmioFOURCC('D','S','F','X')
- {$EXTERNALSYM DMUS_FOURCC_DSFX_FORM}
- DMUS_FOURCC_DSFX_CHUNK = DWORD(Byte('f') or (Byte('x') shl 8) or (Byte('h') shl 16) or (Byte('r') shl 24)); // mmioFOURCC('f','x','h','r')
- {$EXTERNALSYM DMUS_FOURCC_DSFX_CHUNK}
- DMUS_FOURCC_DSFX_DATA = DWORD(Byte('d') or (Byte('a') shl 8) or (Byte('t') shl 16) or (Byte('a') shl 24)); // mmioFOURCC('d','a','t','a')
- {$EXTERNALSYM DMUS_FOURCC_DSFX_DATA}
- (* io structures *)
- type
- PDSoundIoDSBufferDesc = ^TDSoundIoDSBufferDesc;
- _DSOUND_IO_DSBUFFERDESC = packed record
- dwFlags: DWORD; (* DirectSound buffer creation flags *)
- nChannels: Word; (* No. of channels (rest of buffer format is determined by owning sink) *)
- lVolume: Longint; (* Initial pan; only used if CTRLVOLUME is specified *)
- lPan: Longint; (* Initial pan; only used if CTRLPAN is specified *)
- dwReserved: DWORD; (* Reserved - must be 0 *)
- end;
- {$EXTERNALSYM _DSOUND_IO_DSBUFFERDESC}
- DSOUND_IO_DSBUFFERDESC = _DSOUND_IO_DSBUFFERDESC;
- {$EXTERNALSYM DSOUND_IO_DSBUFFERDESC}
- TDSoundIoDSBufferDesc = _DSOUND_IO_DSBUFFERDESC;
- PDSoundIoDSBusID = ^TDSoundIoDSBusID;
- _DSOUND_IO_DSBUSID = packed record
- busid: array[0..0] of DWORD; (* Array size determined from chunk size *)
- end;
- {$EXTERNALSYM _DSOUND_IO_DSBUSID}
- DSOUND_IO_DSBUSID = _DSOUND_IO_DSBUSID;
- {$EXTERNALSYM DSOUND_IO_DSBUSID}
- TDSoundIoDSBusID = _DSOUND_IO_DSBUSID;
- PDSoundIo3D = ^TDSoundIo3D;
- _DSOUND_IO_3D = packed record
- guid3DAlgorithm: TGUID; (* GUID identifying the 3D algorithm to use (defined in dsound.h) *)
- ds3d: DS3DBUFFER; (* Initial 3D parameters *)
- end;
- {$EXTERNALSYM _DSOUND_IO_3D}
- DSOUND_IO_3D = _DSOUND_IO_3D;
- {$EXTERNALSYM DSOUND_IO_3D}
- TDSoundIo3D = _DSOUND_IO_3D;
- PDSoundIoDXDMOHeader = ^TDSoundIoDXDMOHeader;
- _DSOUND_IO_DXDMO_HEADER = packed record
- dwEffectFlags: DWORD; (* Effect creation flags - equivalent to DSEFFECTDESC::dwFlags *)
- guidDSFXClass: TGUID; (* GUID identifying the effect to use - corresponds to a COM CLSID *)
- guidReserved: TGUID; (* Reserved - must be the null GUID *)
- guidSendBuffer: TGUID; (* GUID identifying the buffer to send to if this is a send effect *)
- dwReserved: DWORD; (* Reserved - must be 0 *)
- end;
- {$EXTERNALSYM _DSOUND_IO_DXDMO_HEADER}
- DSOUND_IO_DXDMO_HEADER = _DSOUND_IO_DXDMO_HEADER;
- {$EXTERNALSYM DSOUND_IO_DXDMO_HEADER}
- TDSoundIoDXDMOHeader = _DSOUND_IO_DXDMO_HEADER;
- PDSoundIoDXDMOData = ^TDSoundIoDXDMOData;
- _DSOUND_IO_DXDMO_DATA= packed record
- data: array[0..0] of DWORD; (* Array size determined by the DMO involved *)
- end;
- {$EXTERNALSYM _DSOUND_IO_DXDMO_DATA}
- DSOUND_IO_DXDMO_DATA = _DSOUND_IO_DXDMO_DATA;
- {$EXTERNALSYM DSOUND_IO_DXDMO_DATA}
- TDSoundIoDXDMOData = _DSOUND_IO_DXDMO_DATA;
- (*
- RIFF
- (
- 'DSBC' // DirectSoundBufferConfig chunk
- [<guid-ck>] // GUID identifier for this DirectSoundBufferConfig
- [<vers-ck>] // Optional version info
- [<UNFO-list>] // Name, author, copyright info., comments
- <dsbd-ck> // DirectSound Buffer descriptor chunk
- [<bsid-ck>] // Optional bus id array
- [<ds3d-ck>] // Optional 3d Parameters
- [<fxls-list>] // Optional list of FX descriptors
- )
- // <guid-ck>
- 'guid'
- (
- <GUID>
- )
- // <vers-ck>
- 'vers'
- (
- <DMUS_IO_VERSION>
- )
- // <dsbd-ck>
- 'dsbd'
- (
- <DSOUND_IO_DSBUFFERDESC> // Creation parameters and initial settings for the buffer
- )
- // <bsid-ck>
- 'bsid'
- (
- <DSOUND_IO_DSBUSID> // The size of DSOUND_IO_DSBUSID is determined by the chunk size
- )
- // <ds3d-ck>
- 'ds3d'
- (
- <DSOUND_IO_3D> // Initial 3D buffer parameters: position, etc.
- )
- // <fx-list>
- LIST
- (
- 'fxls' // Array of DMO creation parameter blocks
- <DSFX-form>... // Each DMO is encapsulated in a RIFF chunk
- )
- // <DSFX-form> // DMOs can be embedded in a buffer configuration or stored as separate files
- RIFF
- (
- 'DSFX'
- <fxhr-ck> // FX header chunk
- [<data-ck>] // FX initial settings chunk
- )
- // <fxhr-ck>
- 'fxhr'
- (
- <DSOUND_IO_DXDMO_HEADER>
- )
- // <data-ck>
- 'data'
- (
- <DSOUND_IO_DXDMO_DATA> // Opaque data block used by the DMO to load itself.
- // For our standard included DMOs, this is simply the structure accepted by
- // the DMO's SetAllParameters() method - e.g. struct DSFXChorus for Chorus.
- )
- *)
- (***************************************************************************
- * *
- * DMusBuff.h -- This module defines the buffer format for DirectMusic *
- * Shared file between user mode and kernel mode components *
- * *
- * Copyright (c) 1998, Microsoft Corp. All rights reserved. *
- * *
- ***************************************************************************)
- (* Format of DirectMusic events in a buffer
- *
- * A buffer contains 1 or more events, each with the following header.
- * Immediately following the header is the event data. The header+data
- * size is rounded to the nearest quadword (8 bytes).
- *)
- type
- PDMusEventHeader = ^TDMusEventHeader;
- _DMUS_EVENTHEADER = packed record
- cbEvent: DWORD; (* Unrounded bytes in event *)
- dwChannelGroup: DWORD; (* Channel group of event *)
- rtDelta: TReferenceTime; (* Delta from start time of entire buffer *)
- dwFlags: DWORD; (* Flags DMUS_EVENT_xxx *)
- end;
- {$EXTERNALSYM _DMUS_EVENTHEADER}
- DMUS_EVENTHEADER = _DMUS_EVENTHEADER;
- {$EXTERNALSYM DMUS_EVENTHEADER}
- TDMusEventHeader = _DMUS_EVENTHEADER;
- const
- DMUS_EVENT_STRUCTURED = $00000001; (* Unstructured data (SysEx, etc.) *)
- {$EXTERNALSYM DMUS_EVENT_STRUCTURED}
- (* The number of bytes to allocate for an event with 'cb' data bytes.
- *)
- // #define QWORD_ALIGN(x) (((x) + 7) & ~7)
- function QWORD_ALIGN(x: DWORD): DWORD;
- {$EXTERNALSYM QWORD_ALIGN}
- // #define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
- function DMUS_EVENT_SIZE(cb: DWORD): DWORD;
- {$EXTERNALSYM DMUS_EVENT_SIZE}
- (************************************************************************
- * *
- * dmplugin.h -- This module contains the API for plugins for the *
- * DirectMusic performance layer *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************)
- // Translator: only part of this header located below, other definitions
- // can be found above
- const
- // Registry location for tools
- DMUS_REGSTR_PATH_TOOLS = 'SoftwareMicrosoftDirectMusicTools';
- {$EXTERNALSYM DMUS_REGSTR_PATH_TOOLS}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicTool8 *)
- type
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicTool8);'}
- {$EXTERNALSYM IDirectMusicTool8}
- IDirectMusicTool8 = interface(IDirectMusicTool)
- (* IDirectMusicTool8 *)
- ['{0e674303-3b05-11d3-9bd1-f9e7f0a01536}']
- function Clone(out ppTool: IDirectMusicTool): HResult; stdcall;
- end;
- (* The following flags are sent in the IDirectMusicTrack.Play() method *)
- (* inside the dwFlags parameter *)
- type
- enumDMUS_TRACKF_FLAGS = DWORD;
- DMUS_TRACKF_FLAGS = enumDMUS_TRACKF_FLAGS;
- {$EXTERNALSYM DMUS_TRACKF_FLAGS}
- TDMusTrackfFlags = DMUS_TRACKF_FLAGS;
- PDMusTrackfFlags = ^TDMusTrackfFlags;
- const
- DMUS_TRACKF_SEEK = 1; (* set on a seek *)
- {$EXTERNALSYM DMUS_TRACKF_SEEK}
- DMUS_TRACKF_LOOP = 2; (* set on a loop (repeat) *)
- {$EXTERNALSYM DMUS_TRACKF_LOOP}
- DMUS_TRACKF_START = 4; (* set on first call to Play *)
- {$EXTERNALSYM DMUS_TRACKF_START}
- DMUS_TRACKF_FLUSH = 8; (* set when this call is in response to a flush on the perfomance *)
- {$EXTERNALSYM DMUS_TRACKF_FLUSH}
- DMUS_TRACKF_DIRTY = $10; (* set when the track should consider any cached values from a previous call to GetParam to be invalidated *)
- {$EXTERNALSYM DMUS_TRACKF_DIRTY}
- // The following flags are DX8 only.
- DMUS_TRACKF_NOTIFY_OFF = $20; (* tells track not to send notifications. *)
- {$EXTERNALSYM DMUS_TRACKF_NOTIFY_OFF}
- DMUS_TRACKF_PLAY_OFF = $40; (* tells track not to play anything (but can still send notifications.) *)
- {$EXTERNALSYM DMUS_TRACKF_PLAY_OFF}
- DMUS_TRACKF_LOOPEND = $80; (* set when the end of range is also a loop end. *)
- {$EXTERNALSYM DMUS_TRACKF_LOOPEND}
- DMUS_TRACKF_STOP = $100; (* set when the end of range is also end of playing this segment. *)
- {$EXTERNALSYM DMUS_TRACKF_STOP}
- DMUS_TRACKF_RECOMPOSE = $200; (* set to indicate the track should compose. *)
- {$EXTERNALSYM DMUS_TRACKF_RECOMPOSE}
- DMUS_TRACKF_CLOCK = $400; (* set when time parameters are in reference (clock) time. Only valid for PlayEx(). *)
- {$EXTERNALSYM DMUS_TRACKF_CLOCK}
- (* The following flags are sent in the IDirectMusicTrack8::GetParamEx() and SetParamEx() methods *)
- (* inside the dwFlags parameter *)
- DMUS_TRACK_PARAMF_CLOCK = $01; (* set when the time is measured is in reference (clock) time *)
- {$EXTERNALSYM DMUS_TRACK_PARAMF_CLOCK}
- (*)///////////////////////////////////////////////////////////////////
- // IDirectMusicTrack8 *)
- type
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicTrack8);'}
- {$EXTERNALSYM IDirectMusicTrack8}
- IDirectMusicTrack8 = interface(IDirectMusicTrack)
- (* IDirectMusicTrack8 *)
- ['{0e674304-3b05-11d3-9bd1-f9e7f0a01536}']
- function PlayEx(pStateData: Pointer; rtStart, rtEnd, rtOffset: TReferenceTime;
- dwFlags: DWORD; pPerf: IDirectMusicPerformance;
- pSegSt: IDirectMusicSegmentState; dwVirtualID: DWORD): HResult; stdcall;
- function GetParamEx(const rguidType: TGUID; rtTime: TReferenceTime;
- out prtNext: TReferenceTime; pParam, pStateData: pointer; dwFlags: DWORD): HResult; stdcall;
- function SetParamEx(const rguidType: TGUID; rtTime: TReferenceTime;
- pParam, pStateData: pointer; dwFlags: DWORD): HResult; stdcall;
- function Compose(pContext: IUnknown; dwTrackGroup: DWORD;
- out ppResultTrack: IDirectMusicTrack): HResult; stdcall;
- function Join(pNewTrack: IDirectMusicTrack; mtJoin: TMusicTime;
- pContext: IUnknown; dwTrackGroup: DWORD;
- out ppResultTrack: IDirectMusicTrack): HResult; stdcall;
- end;
- const
- (* CLSID's *)
- CLSID_DirectMusicTempoTrack : TGUID = '{d2ac2885-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicTempoTrack}
- CLSID_DirectMusicSeqTrack : TGUID = '{d2ac2886-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicSeqTrack}
- CLSID_DirectMusicSysExTrack : TGUID = '{d2ac2887-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicSysExTrack}
- CLSID_DirectMusicTimeSigTrack : TGUID = '{d2ac2888-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicTimeSigTrack}
- CLSID_DirectMusicChordTrack : TGUID = '{d2ac288b-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicChordTrack}
- CLSID_DirectMusicCommandTrack : TGUID = '{d2ac288c-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicCommandTrack}
- CLSID_DirectMusicStyleTrack : TGUID = '{d2ac288d-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicStyleTrack}
- CLSID_DirectMusicMotifTrack : TGUID = '{d2ac288e-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicMotifTrack}
- CLSID_DirectMusicSignPostTrack : TGUID = '{f17e8672-c3b4-11d1-870b-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicSignPostTrack}
- CLSID_DirectMusicBandTrack : TGUID = '{d2ac2894-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicBandTrack}
- CLSID_DirectMusicChordMapTrack : TGUID = '{d2ac2896-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicChordMapTrack}
- CLSID_DirectMusicMuteTrack : TGUID = '{d2ac2898-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicMuteTrack}
- (* New CLSID's for DX8 *)
- CLSID_DirectMusicScriptTrack: TGUID = '{4108fa85-3586-11d3-8bd7-00600893b1b6}'; (* {4108FA85-3586-11d3-8BD7-00600893B1B6} *)
- {$EXTERNALSYM CLSID_DirectMusicScriptTrack}
- CLSID_DirectMusicMarkerTrack: TGUID = '{55a8fd00-4288-11d3-9bd1-8a0d61c88835}';
- {$EXTERNALSYM CLSID_DirectMusicMarkerTrack}
- CLSID_DirectMusicSegmentTriggerTrack: TGUID = '{bae4d665-4ea1-11d3-8bda-00600893b1b6}'; (* {BAE4D665-4EA1-11d3-8BDA-00600893B1B6} *)
- {$EXTERNALSYM CLSID_DirectMusicSegmentTriggerTrack}
- CLSID_DirectMusicLyricsTrack: TGUID = '{995c1cf5-54ff-11d3-8bda-00600893b1b6}'; (* {995C1CF5-54FF-11d3-8BDA-00600893B1B6} *)
- {$EXTERNALSYM CLSID_DirectMusicLyricsTrack}
- CLSID_DirectMusicParamControlTrack: TGUID = '{4be0537b-5c19-11d3-8bdc-00600893b1b6}'; (* {4BE0537B-5C19-11d3-8BDC-00600893B1B6} *)
- {$EXTERNALSYM CLSID_DirectMusicParamControlTrack}
- CLSID_DirectMusicWaveTrack: TGUID = '{eed36461-9ea5-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM CLSID_DirectMusicWaveTrack}
- type
- (* IID's *)
- IID_IDirectMusicTrack = IDirectMusicTrack;
- {$EXTERNALSYM IID_IDirectMusicTrack}
- IID_IDirectMusicTool = IDirectMusicTool;
- {$EXTERNALSYM IID_IDirectMusicTool}
- // Interface IDs for DX8
- // changed interfaces (GUID only)
- IID_IDirectMusicTool8 = IDirectMusicTool8;
- {$EXTERNALSYM IID_IDirectMusicTool8}
- IID_IDirectMusicTrack8 = IDirectMusicTrack8;
- {$EXTERNALSYM IID_IDirectMusicTrack8}
- // Translator: Types below are declared to compatibility with previous -
- // non borland compliant - conversions of DirectMusic.
- type
- PDMus_Downloadinfo = PDMusDownloadInfo;
- TDMus_Downloadinfo = TDMusDownloadInfo;
- PDMus_Offsettable = PDMusOffsetTable;
- TDMus_Offsettable = TDMusOffsetTable;
- PDMus_Instrument = PDMusInstrument;
- TDMus_Instrument = TDMusInstrument;
- PDMus_Region = PDMusRegion;
- TDMus_Region = TDMusRegion;
- PDMus_Lfoparams = PDMusLFOParams;
- TDMus_Lfoparams = TDMusLFOParams;
- PDMus_Vegparams = PDMusVEGParams;
- TDMus_Vegparams = TDMusVEGParams;
- PDMus_Pegparams = PDMusPEGParams;
- TDMus_Pegparams = TDMusPEGParams;
- PDMus_Mscparams = PDMusMSCParams;
- TDMus_Mscparams = TDMusMSCParams;
- PDMus_Articparams = PDMusArticParams;
- TDMus_Articparams = TDMusArticParams;
- PDMus_Articulation = PDMusArticulation;
- TDMus_Articulation = TDMusArticulation;
- PDMus_Articulation2 = PDMusArticulation2;
- TDMus_Articulation2 = TDMusArticulation2;
- PDMus_Extensionchunk = PDMusExtensionChunk;
- TDMus_Extensionchunk = TDMusExtensionChunk;
- PDMus_Copyright = PDMusCopyright;
- TDMus_Copyright = TDMusCopyright;
- PDMus_Wavedata = PDMusWaveData;
- TDMus_Wavedata = TDMusWaveData;
- PDMus_Wave = PDMusWave;
- TDMus_Wave = TDMusWave;
- PDMus_Noterange = PDMusNoteRange;
- TDMus_Noterange = TDMusNoteRange;
- PDMus_Waveartdl = PDMusWaveArtDL;
- TDMus_Waveartdl = TDMusWaveArtDL;
- PDMus_Wavedl = PDMusWaveDL;
- TDMus_Wavedl = TDMusWaveDL;
- PDMus_Bufferdesc = PDMusBufferDesc;
- TDMus_Bufferdesc = TDMusBufferDesc;
- PDMus_Portcaps = PDMusPortCaps;
- TDMus_Portcaps = TDMusPortCaps;
- PDMus_Portparams = PDMusPortParams;
- TDMus_Portparams = TDMusPortParams;
- PDMus_Portparams8 = PDMusPortParams8;
- TDMus_Portparams8 = TDMusPortParams8;
- PDMus_Synthstats = PDMusSynthStats;
- TDMus_Synthstats = TDMusSynthStats;
- PDMus_Synthstats8 = PDMusSynthStats8;
- TDMus_Synthstats8 = TDMusSynthStats8;
- PDMus_Waves_Reverb_Params = PDMusWavesReverbParams;
- TDMus_Waves_Reverb_Params = TDMusWavesReverbParams;
- PDMus_Clockinfo7 = PDMusClockInfo7;
- TDMus_Clockinfo7 = TDMusClockInfo7;
- PDMus_Clockinfo8 = PDMusClockInfo8;
- TDMus_Clockinfo8 = TDMusClockInfo8;
- PDMus_Audioparams = PDMusAudioParams;
- TDMus_Audioparams = TDMusAudioParams;
- PDMus_Subchord = PDMusSubChord;
- TDMus_Subchord = TDMusSubChord;
- PDMus_Chord_Key = PDMusChordKey;
- TDMus_Chord_Key = TDMusChordKey;
- PDMus_Version = PDMusVersion;
- TDMus_Version = TDMusVersion;
- PDMus_Timesignature = PDMusTimeSignature;
- TDMus_Timesignature = TDMusTimeSignature;
- PDMus_Valid_Start_Param = PDMusValidStartParam;
- TDMus_Valid_Start_Param = TDMusValidStartParam;
- PDMus_Play_Marker_Param = PDMusPlayMarkerParam;
- TDMus_Play_Marker_Param = TDMusPlayMarkerParam;
- PDMus_Objectdesc = PDMusObjectDesc;
- TDMus_Objectdesc = TDMusObjectDesc;
- PDMus_Script_Errorinfo = PDMusScriptErrorInfo;
- TDMus_Script_Errorinfo = TDMusScriptErrorInfo;
- PDMus_Command_Param = PDMusCommandParam;
- TDMus_Command_Param = TDMusCommandParam;
- PDMus_Command_Param_2 = PDMusCommandParam2;
- TDMus_Command_Param_2 = TDMusCommandParam2;
- PDMus_Pmsg = PDMusPMsg;
- TDMus_Pmsg = TDMusPMsg;
- PDMus_Note_Pmsg = PDMusNotePMsg;
- TDMus_Note_Pmsg = TDMusNotePMsg;
- PDMus_Midi_Pmsg = PDMusMidiPMsg;
- TDMus_Midi_Pmsg = TDMusMidiPMsg;
- PDMus_Patch_Pmsg = PDMusPatchPMsg;
- TDMus_Patch_Pmsg = TDMusPatchPMsg;
- PDMus_Transpose_Pmsg = PDMusTransposePMsg;
- TDMus_Transpose_Pmsg = TDMusTransposePMsg;
- PDMus_Channel_Priority_Pmsg = PDMusChannelPriorityPMsg;
- TDMus_Channel_Priority_Pmsg = TDMusChannelPriorityPMsg;
- PDMus_Tempo_Pmsg = PDMusTempoPMsg;
- TDMus_Tempo_Pmsg = TDMusTempoPMsg;
- PDMus_Sysex_Pmsg = PDMusSysexPMsg;
- TDMus_Sysex_Pmsg = TDMusSysexPMsg;
- PDMus_Curve_Pmsg = PDMusCurvePMsg;
- TDMus_Curve_Pmsg = TDMusCurvePMsg;
- PDMus_Timesig_Pmsg = PDMusTimeSigPMsg;
- TDMus_Timesig_Pmsg = TDMusTimeSigPMsg;
- PDMus_Notification_Pmsg = PDMusNotificationPMsg;
- TDMus_Notification_Pmsg = TDMusNotificationPMsg;
- PDMus_Wave_Pmsg = PDMusWavePMsg;
- TDMus_Wave_Pmsg = TDMusWavePMsg;
- PDMus_Lyric_Pmsg = PDMusLyricPMsg;
- TDMus_Lyric_Pmsg = TDMusLyricPMsg;
- PDMus_Band_Param = PDMusBandParam;
- TDMus_Band_Param = TDMusBandParam;
- PDMus_Variations_Param = PDMusVariationsParam;
- TDMus_Variations_Param = TDMusVariationsParam;
- PDMus_Io_Seq_Item = PDMusIoSeqItem;
- TDMus_Io_Seq_Item = TDMusIoSeqItem;
- PDMus_Io_Curve_Item = PDMusIoCurveItem;
- TDMus_Io_Curve_Item = TDMusIoCurveItem;
- PDMus_Io_Tempo_Item = PDMusIoTempoItem;
- TDMus_Io_Tempo_Item = TDMusIoTempoItem;
- PDMus_Io_Sysex_Item = PDMusIoSysexItem;
- TDMus_Io_Sysex_Item = TDMusIoSysexItem;
- PDMus_Rhythm_Param = PDMusRhythmParam;
- TDMus_Rhythm_Param = TDMusRhythmParam;
- PDMus_Tempo_Param = PDMusTempoParam;
- TDMus_Tempo_Param = TDMusTempoParam;
- PDMus_Mute_Param = PDMusMuteParam;
- TDMus_Mute_Param = TDMusMuteParam;
- PDMus_Io_Timesig = PDMusIoTimesig;
- TDMus_Io_Timesig = TDMusIoTimesig;
- PDMus_Io_Style = PDMusIoStyle;
- TDMus_Io_Style = TDMusIoStyle;
- PDMus_Io_Version = PDMusIoVersion;
- TDMus_Io_Version = TDMusIoVersion;
- PDMus_Io_Pattern = PDMusIoPattern;
- TDMus_Io_Pattern = TDMusIoPattern;
- PDMus_Io_Stylepart = PDMusIoStylepart;
- TDMus_Io_Stylepart = TDMusIoStylepart;
- PDMus_Io_Partref = PDMusIoPartref;
- TDMus_Io_Partref = TDMusIoPartref;
- PDMus_Io_Stylenote = PDMusIoStyleNote;
- TDMus_Io_Stylenote = TDMusIoStyleNote;
- PDMus_Io_Stylecurve = PDMusIoStyleCurve;
- TDMus_Io_Stylecurve = TDMusIoStyleCurve;
- PDMus_Io_Stylemarker = PDMusIoStyleMarker;
- TDMus_Io_Stylemarker = TDMusIoStyleMarker;
- PDMus_Io_Styleresolution = PDMusIoStyleResolution;
- TDMus_Io_Styleresolution = TDMusIoStyleResolution;
- PDMus_Io_Style_Anticipation = PDMusIoStyleAnticipation;
- TDMus_Io_Style_Anticipation = TDMusIoStyleAnticipation;
- PDMus_Io_Motifsettings = PDMusIoMotifSettings;
- TDMus_Io_Motifsettings = TDMusIoMotifSettings;
- PDMus_Io_Chord = PDMusIoChord;
- TDMus_Io_Chord = TDMusIoChord;
- PDMus_Io_Subchord = PDMusIoSubChord;
- TDMus_Io_Subchord = TDMusIoSubChord;
- PDMus_Io_Command = PDMusIoCommand;
- TDMus_Io_Command = TDMusIoCommand;
- PDMus_Io_Tool_Header = PDMusIoToolHeader;
- TDMus_Io_Tool_Header = TDMusIoToolHeader;
- PDMus_Io_Portconfig_Header = PDMusIoPortconfigHeader;
- TDMus_Io_Portconfig_Header = TDMusIoPortconfigHeader;
- PDMus_Io_Pchanneltobuffer_Header = PDMusIoPchanneltobufferHeader;
- TDMus_Io_Pchanneltobuffer_Header = TDMusIoPchanneltobufferHeader;
- PDMus_Io_Buffer_Attributes_Header = PDMusIoBufferAttributesHeader;
- TDMus_Io_Buffer_Attributes_Header = TDMusIoBufferAttributesHeader;
- PDMus_Io_Band_Track_Header = PDMusIoBandTrackHeader;
- TDMus_Io_Band_Track_Header = TDMusIoBandTrackHeader;
- PDMus_Io_Band_Item_Header = PDMusIoBandItemHeader;
- TDMus_Io_Band_Item_Header = TDMusIoBandItemHeader;
- PDMus_Io_Band_Item_Header2 = PDMusIoBandItemHeader2;
- TDMus_Io_Band_Item_Header2 = TDMusIoBandItemHeader2;
- PDMus_Io_Instrument = PDMusIoInstrument;
- TDMus_Io_Instrument = TDMusIoInstrument;
- PDMus_Io_Wave_Header = PDMusIoWaveHeader;
- TDMus_Io_Wave_Header = TDMusIoWaveHeader;
- PDMus_Io_Wave_Track_Header = PDMusIoWaveTrackHeader;
- TDMus_Io_Wave_Track_Header = TDMusIoWaveTrackHeader;
- PDMus_Io_Wave_Part_Header = PDMusIoWavePartHeader;
- TDMus_Io_Wave_Part_Header = TDMusIoWavePartHeader;
- PDMus_Io_Wave_Item_Header = PDMusIoWaveItemHeader;
- TDMus_Io_Wave_Item_Header = TDMusIoWaveItemHeader;
- PDMus_Io_Container_Header = PDMusIoContainerHeader;
- TDMus_Io_Container_Header = TDMusIoContainerHeader;
- PDMus_Io_Contained_Object_Header = PDMusIoContainedObjectHeader;
- TDMus_Io_Contained_Object_Header = TDMusIoContainedObjectHeader;
- PDMus_Io_Segment_Header = PDMusIoSegmentHeader;
- TDMus_Io_Segment_Header = TDMusIoSegmentHeader;
- PDMus_Io_Track_Header = PDMusIoTrackHeader;
- TDMus_Io_Track_Header = TDMusIoTrackHeader;
- PDMus_Io_Track_Extras_Header = PDMusIoTrackExtrasHeader;
- TDMus_Io_Track_Extras_Header = TDMusIoTrackExtrasHeader;
- PDMus_Io_Reference = PDMusIoReference;
- TDMus_Io_Reference = TDMusIoReference;
- PDMus_Io_Chordmap = PDMusIoChordmap;
- TDMus_Io_Chordmap = TDMusIoChordmap;
- PDMus_Io_Chordmap_Subchord = PDMusIoChordmapSubChord;
- TDMus_Io_Chordmap_Subchord = TDMusIoChordmapSubChord;
- PDMus_Io_Chordentry = PDMusIoChordEntry;
- TDMus_Io_Chordentry = TDMusIoChordEntry;
- PDMus_Io_Nextchord = PDMusIoNextChord;
- TDMus_Io_Nextchord = TDMusIoNextChord;
- PDMus_Io_Chordmap_Signpost = PDMusIoChordMapSignPost;
- TDMus_Io_Chordmap_Signpost = TDMusIoChordMapSignPost;
- PDMus_Io_Script_Header = PDMusIoScriptHeader;
- TDMus_Io_Script_Header = TDMusIoScriptHeader;
- PDMus_Io_Signpost = PDMusIoSignPost;
- TDMus_Io_Signpost = TDMusIoSignPost;
- PDMus_Io_Mute = PDMusIoMute;
- TDMus_Io_Mute = TDMusIoMute;
- PDMus_Io_Timesignature_Item = PDMusIoTimesignatureItem;
- TDMus_Io_Timesignature_Item = TDMusIoTimesignatureItem;
- PDMus_Io_Valid_Start = PDMusIoValidStart;
- TDMus_Io_Valid_Start = TDMusIoValidStart;
- PDMus_Io_Play_Marker = PDMusIoPlayMarker;
- TDMus_Io_Play_Marker = TDMusIoPlayMarker;
- PDMus_Io_Segment_Track_Header = PDMusIoSegmentTrackHeader;
- TDMus_Io_Segment_Track_Header = TDMusIoSegmentTrackHeader;
- PDMus_Io_Segment_Item_Header = PDMusIoSegmentItemHeader;
- TDMus_Io_Segment_Item_Header = TDMusIoSegmentItemHeader;
- PDMus_Io_Scripttrack_Eventheader = PDMusIoScriptTrackEventHeader;
- TDMus_Io_Scripttrack_Eventheader = TDMusIoScriptTrackEventHeader;
- PDMus_Io_Lyricstrack_Eventheader = PDMusIoLyricsTrackEventHeader;
- TDMus_Io_Lyricstrack_Eventheader = TDMusIoLyricsTrackEventHeader;
- PDMus_Io_Paramcontroltrack_Objectheader = PDMusIoParamControlTrackObjectHeader;
- TDMus_Io_Paramcontroltrack_Objectheader = TDMusIoParamControlTrackObjectHeader;
- PDMus_Io_Paramcontroltrack_Paramheader = PDMusIoParamControlTrackParamHeader;
- TDMus_Io_Paramcontroltrack_Paramheader = TDMusIoParamControlTrackParamHeader;
- PDMus_Io_Paramcontroltrack_Curveinfo = PDMusIoParamControlTrackCurveInfo;
- TDMus_Io_Paramcontroltrack_Curveinfo = TDMusIoParamControlTrackCurveInfo;
- PDMus_Eventheader = PDMusEventHeader;
- TDMus_Eventheader = TDMusEventHeader;
- PDSound_Io_Dsbufferdesc = PDSoundIoDSBufferDesc;
- TDSound_Io_Dsbufferdesc = TDSoundIoDSBufferDesc;
- PDSound_Io_Dsbusid = PDSoundIoDSBusID;
- TDSound_Io_Dsbusid = TDSoundIoDSBusID;
- PDSound_Io_3d = PDSoundIo3D;
- TDSound_Io_3d = TDSoundIo3D;
- PDSound_Io_Dxdmo_Header = PDSoundIoDXDMOHeader;
- TDSound_Io_Dxdmo_Header = TDSoundIoDXDMOHeader;
- PDSound_Io_Dxdmo_Data = PDSoundIoDXDMOData;
- TDSound_Io_Dxdmo_Data = TDSoundIoDXDMOData;
- implementation
- // #define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
- function MAKE_DMHRESULTSUCCESS(Code: DWord): DWord;
- begin
- Result:= (0 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or (DMUS_ERRBASE + Code);
- end;
- // #define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
- function MAKE_DMHRESULTERROR(Code: DWord): DWord;
- begin
- Result:= DWORD((1 shl 31) or (FACILITY_DIRECTMUSIC shl 16)) or (DMUS_ERRBASE + Code);
- end;
- // #define DSBUSID_IS_SPKR_LOC(id) ( ((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC) )
- function DSBUSID_IS_SPKR_LOC(id: Integer): Boolean;
- begin
- Result := (id >= DSBUSID_FIRST_SPKR_LOC) and (id <= DSBUSID_LAST_SPKR_LOC);
- end;
- function QWORD_ALIGN(x: DWORD): DWORD;
- begin
- Result := (x + 7) and (not 7); // (((x) + 7) & ~7)
- end;
- function DMUS_EVENT_SIZE(cb: DWORD): DWORD;
- begin
- Result := QWORD_ALIGN(SizeOf(TDMusEventHeader) + cb); // QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
- end;
- end.