DirectMusic.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:340k
- *
- * Item 0: Memory size
- * Returns a DWORD containing the total number of bytes of sample RAM
- *)
- GUID_DMUS_PROP_MemorySize: TGUID = '{178f2f28-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_MemorySize}
- (* Property Set GUID_DMUS_PROP_WavesReverb
- *
- * Item 0: DMUS_WAVES_REVERB structure
- * Sets reverb parameters
- *)
- GUID_DMUS_PROP_WavesReverb: TGUID = '{04cb5622-32e5-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM GUID_DMUS_PROP_WavesReverb}
- (* Property Set GUID_DMUS_PROP_Effects
- *
- * Item 0: DWORD with effects flags.
- * Get/Set effects bits, same as dwEffectFlags in DMUS_PORTPARAMS and DMUS_PORTCAPS:
- * DMUS_EFFECT_NONE
- * DMUS_EFFECT_REVERB
- * DMUS_EFFECT_CHORUS
- *)
- GUID_DMUS_PROP_Effects: TGUID = '{cda8d611-684a-11d2-871e-00600893b1bd}';
- {$EXTERNALSYM GUID_DMUS_PROP_Effects}
- (* Property Set GUID_DMUS_PROP_LegacyCaps
- *
- * Item 0: The MIDINCAPS or MIDIOUTCAPS which describes the port's underlying WinMM device. This property is only supported
- * by ports which wrap WinMM devices.
- *)
- GUID_DMUS_PROP_LegacyCaps: TGUID = '{cfa7cdc2-00a1-11d2-aad5-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_LegacyCaps}
- (* Property Set GUID_DMUS_PROP_Volume
- *
- * Item 0: A long which contains an offset, in 1/100 dB, to be added to the final volume
- *
- *)
- GUID_DMUS_PROP_Volume: TGUID = '{fedfae25-e46e-11d1-aace-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_Volume}
- // Min and Max values for setting volume with GUID_DMUS_PROP_Volume
- DMUS_VOLUME_MAX = 2000; (* +20 dB *)
- {$EXTERNALSYM DMUS_VOLUME_MAX}
- DMUS_VOLUME_MIN = -20000; (* -200 dB *)
- {$EXTERNALSYM DMUS_VOLUME_MIN}
- (************************************************************************
- * *
- * dmusici.h -- This module contains the API for the *
- * DirectMusic performance layer *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************)
- type
- TRANSITION_TYPE = Word;
- {$EXTERNALSYM TRANSITION_TYPE}
- PMusicTime = ^TMusicTime;
- MUSIC_TIME = Longint;
- {$EXTERNALSYM MUSIC_TIME}
- TMusicTime = MUSIC_TIME;
- const
- MT_MIN = $80000000; // Minimum music time value.
- {$EXTERNALSYM MT_MIN}
- MT_MAX = $7FFFFFFF; // Maximum music time value.
- {$EXTERNALSYM MT_MAX}
- DMUS_PPQ = 768; // parts per quarter note
- {$EXTERNALSYM DMUS_PPQ}
- type
- PDMusStyletTypes = ^TDMusStyletTypes;
- enumDMUS_STYLET_TYPES = (
- DMUS_STYLET_PATTERN {= 0},
- DMUS_STYLET_MOTIF {= 1}
- );
- {$EXTERNALSYM enumDMUS_STYLET_TYPES}
- DMUS_STYLET_TYPES = enumDMUS_STYLET_TYPES;
- {$EXTERNALSYM DMUS_STYLET_TYPES}
- TDMusStyletTypes = DMUS_STYLET_TYPES;
- enumDMUS_COMMANDT_TYPES = (
- DMUS_COMMANDT_GROOVE {= 0},
- DMUS_COMMANDT_FILL {= 1},
- DMUS_COMMANDT_INTRO {= 2},
- DMUS_COMMANDT_BREAK {= 3},
- DMUS_COMMANDT_END {= 4},
- DMUS_COMMANDT_ENDANDINTRO {= 5}
- );
- {$EXTERNALSYM enumDMUS_COMMANDT_TYPES}
- DMUS_COMMANDT_TYPES = enumDMUS_COMMANDT_TYPES;
- {$EXTERNALSYM DMUS_COMMANDT_TYPES}
- TDMusCommandtTypes = DMUS_COMMANDT_TYPES;
- PDMusCommandtTypes = ^TDMusCommandtTypes;
- PDMusShapetTypes = ^TDMusShapetTypes;
- enumDMUS_SHAPET_TYPES = (
- DMUS_SHAPET_FALLING {= 0},
- DMUS_SHAPET_LEVEL {= 1},
- DMUS_SHAPET_LOOPABLE {= 2},
- DMUS_SHAPET_LOUD {= 3},
- DMUS_SHAPET_QUIET {= 4},
- DMUS_SHAPET_PEAKING {= 5},
- DMUS_SHAPET_RANDOM {= 6},
- DMUS_SHAPET_RISING {= 7},
- DMUS_SHAPET_SONG {= 8}
- );
- {$EXTERNALSYM enumDMUS_SHAPET_TYPES}
- DMUS_SHAPET_TYPES = enumDMUS_SHAPET_TYPES;
- {$EXTERNALSYM DMUS_SHAPET_TYPES}
- TDMusShapetTypes = DMUS_SHAPET_TYPES;
- enumDMUS_COMPOSEF_FLAGS = DWORD;
- {$EXTERNALSYM enumDMUS_COMPOSEF_FLAGS}
- DMUS_COMPOSEF_FLAGS = enumDMUS_COMPOSEF_FLAGS;
- {$EXTERNALSYM DMUS_COMPOSEF_FLAGS}
- TDMusComposefFlags = DMUS_COMPOSEF_FLAGS;
- PDMusComposefFlags = ^TDMusComposefFlags;
- const
- DMUS_COMPOSEF_NONE = 0;
- {$EXTERNALSYM DMUS_COMPOSEF_NONE}
- DMUS_COMPOSEF_ALIGN = $1;
- {$EXTERNALSYM DMUS_COMPOSEF_ALIGN}
- DMUS_COMPOSEF_OVERLAP = $2;
- {$EXTERNALSYM DMUS_COMPOSEF_OVERLAP}
- DMUS_COMPOSEF_IMMEDIATE = $4;
- {$EXTERNALSYM DMUS_COMPOSEF_IMMEDIATE}
- DMUS_COMPOSEF_GRID = $8;
- {$EXTERNALSYM DMUS_COMPOSEF_GRID}
- DMUS_COMPOSEF_BEAT = $10;
- {$EXTERNALSYM DMUS_COMPOSEF_BEAT}
- DMUS_COMPOSEF_MEASURE = $20;
- {$EXTERNALSYM DMUS_COMPOSEF_MEASURE}
- DMUS_COMPOSEF_AFTERPREPARETIME = $40;
- {$EXTERNALSYM DMUS_COMPOSEF_AFTERPREPARETIME}
- DMUS_COMPOSEF_VALID_START_BEAT = $80; (* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any beat. *)
- {$EXTERNALSYM DMUS_COMPOSEF_VALID_START_BEAT}
- DMUS_COMPOSEF_VALID_START_GRID = $100; (* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any grid. *)
- {$EXTERNALSYM DMUS_COMPOSEF_VALID_START_GRID}
- DMUS_COMPOSEF_VALID_START_TICK = $200; (* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur any time. *)
- {$EXTERNALSYM DMUS_COMPOSEF_VALID_START_TICK}
- DMUS_COMPOSEF_SEGMENTEND = $400; (* Play the transition at the end of the current segment. *)
- {$EXTERNALSYM DMUS_COMPOSEF_SEGMENTEND}
- DMUS_COMPOSEF_MARKER = $800; (* Play the transition at the next marker in the current segment. *)
- {$EXTERNALSYM DMUS_COMPOSEF_MARKER}
- DMUS_COMPOSEF_MODULATE = $1000;
- {$EXTERNALSYM DMUS_COMPOSEF_MODULATE}
- DMUS_COMPOSEF_LONG = $2000;
- {$EXTERNALSYM DMUS_COMPOSEF_LONG}
- DMUS_COMPOSEF_ENTIRE_TRANSITION = $4000; (* play the entire transition pattern *)
- {$EXTERNALSYM DMUS_COMPOSEF_ENTIRE_TRANSITION}
- DMUS_COMPOSEF_1BAR_TRANSITION = $8000; (* play one bar of the transition pattern *)
- {$EXTERNALSYM DMUS_COMPOSEF_1BAR_TRANSITION}
- DMUS_COMPOSEF_ENTIRE_ADDITION = $10000; (* play the additional pattern in its entirety *)
- {$EXTERNALSYM DMUS_COMPOSEF_ENTIRE_ADDITION}
- DMUS_COMPOSEF_1BAR_ADDITION = $20000; (* play one bar of the additional pattern *)
- {$EXTERNALSYM DMUS_COMPOSEF_1BAR_ADDITION}
- DMUS_COMPOSEF_VALID_START_MEASURE = $40000; (* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any bar. *)
- {$EXTERNALSYM DMUS_COMPOSEF_VALID_START_MEASURE}
- DMUS_COMPOSEF_DEFAULT = $80000; (* Use segment's default boundary *)
- {$EXTERNALSYM DMUS_COMPOSEF_DEFAULT}
- DMUS_COMPOSEF_NOINVALIDATE = $100000; (* Play without invalidating the currently playing segment(s) *)
- {$EXTERNALSYM DMUS_COMPOSEF_NOINVALIDATE}
- DMUS_COMPOSEF_USE_AUDIOPATH = $200000; (* Uses the audio paths that are embedded in the segments *)
- {$EXTERNALSYM DMUS_COMPOSEF_USE_AUDIOPATH}
- DMUS_COMPOSEF_INVALIDATE_PRI = $400000; (* Invalidate only the current primary seg state *)
- {$EXTERNALSYM DMUS_COMPOSEF_INVALIDATE_PRI}
- const
- DMUS_PCHANNEL_BROADCAST_PERFORMANCE = $FFFFFFFF; // PMsg is sent on all PChannels of the performance.
- {$EXTERNALSYM DMUS_PCHANNEL_BROADCAST_PERFORMANCE}
- DMUS_PCHANNEL_BROADCAST_AUDIOPATH = $FFFFFFFE; // PMsg is sent on all PChannels of the audio path.
- {$EXTERNALSYM DMUS_PCHANNEL_BROADCAST_AUDIOPATH}
- DMUS_PCHANNEL_BROADCAST_SEGMENT = $FFFFFFFD; // PMsg is sent on all PChannels of the segment.
- {$EXTERNALSYM DMUS_PCHANNEL_BROADCAST_SEGMENT}
- DMUS_PCHANNEL_BROADCAST_GROUPS = $FFFFFFFC; // A duplicate PMsg is for each Channels Groups in the performance.
- {$EXTERNALSYM DMUS_PCHANNEL_BROADCAST_GROUPS}
- (* The DMUS_PATH constants are used in conjunction with GetObjectInPath to find a requested
- interface at a particular stage in the audio path.
- *)
- DMUS_PATH_SEGMENT = $1000; // Get the segment itself (from a segment state.)
- {$EXTERNALSYM DMUS_PATH_SEGMENT}
- DMUS_PATH_SEGMENT_TRACK = $1100; // Look in Track List of Segment.
- {$EXTERNALSYM DMUS_PATH_SEGMENT_TRACK}
- DMUS_PATH_SEGMENT_GRAPH = $1200; // Get the segment's tool graph.
- {$EXTERNALSYM DMUS_PATH_SEGMENT_GRAPH}
- DMUS_PATH_SEGMENT_TOOL = $1300; // Look in Tool Graph of Segment.
- {$EXTERNALSYM DMUS_PATH_SEGMENT_TOOL}
- DMUS_PATH_AUDIOPATH = $2000; // Get the audiopath itself (from a segment state.)
- {$EXTERNALSYM DMUS_PATH_AUDIOPATH}
- DMUS_PATH_AUDIOPATH_GRAPH = $2200; // Get the audiopath's tool graph.
- {$EXTERNALSYM DMUS_PATH_AUDIOPATH_GRAPH}
- DMUS_PATH_AUDIOPATH_TOOL = $2300; // Look in Tool Graph of Audio Path.
- {$EXTERNALSYM DMUS_PATH_AUDIOPATH_TOOL}
- DMUS_PATH_PERFORMANCE = $3000; // Access the performance.
- {$EXTERNALSYM DMUS_PATH_PERFORMANCE}
- DMUS_PATH_PERFORMANCE_GRAPH = $3200; // Get the performance's tool graph.
- {$EXTERNALSYM DMUS_PATH_PERFORMANCE_GRAPH}
- DMUS_PATH_PERFORMANCE_TOOL = $3300; // Look in Tool Graph of Performance.
- {$EXTERNALSYM DMUS_PATH_PERFORMANCE_TOOL}
- DMUS_PATH_PORT = $4000; // Access the synth.
- {$EXTERNALSYM DMUS_PATH_PORT}
- DMUS_PATH_BUFFER = $6000; // Look in DirectSoundBuffer.
- {$EXTERNALSYM DMUS_PATH_BUFFER}
- DMUS_PATH_BUFFER_DMO = $6100; // Access a DMO in the buffer.
- {$EXTERNALSYM DMUS_PATH_BUFFER_DMO}
- DMUS_PATH_MIXIN_BUFFER = $7000; // Look in a global mixin buffer.
- {$EXTERNALSYM DMUS_PATH_MIXIN_BUFFER}
- DMUS_PATH_MIXIN_BUFFER_DMO = $7100; // Access a DMO in a global mixin buffer.
- {$EXTERNALSYM DMUS_PATH_MIXIN_BUFFER_DMO}
- DMUS_PATH_PRIMARY_BUFFER = $8000; // Access the primary buffer.
- {$EXTERNALSYM DMUS_PATH_PRIMARY_BUFFER}
- (* To ignore PChannels when calling GetObjectInPath(), use the DMUS_PCHANNEL_ALL constant. *)
- DMUS_PCHANNEL_ALL = $FFFFFFFB;
- {$EXTERNALSYM DMUS_PCHANNEL_ALL}
- (* The DMUS_APATH types are used in conjunction with CreateStandardAudioPath to
- build default path types. _SHARED_ means the same buffer is shared across multiple
- instantiations of the audiopath type. _DYNAMIC_ means a unique buffer is created
- every time.
- *)
- DMUS_APATH_SHARED_STEREOPLUSREVERB = 1; // A standard music set up with stereo outs and reverb.
- {$EXTERNALSYM DMUS_APATH_SHARED_STEREOPLUSREVERB}
- DMUS_APATH_DYNAMIC_3D = 6; // An audio path with one dynamic bus from the synth feeding to a dynamic 3d buffer. Does not send to env reverb.
- {$EXTERNALSYM DMUS_APATH_DYNAMIC_3D}
- DMUS_APATH_DYNAMIC_MONO = 7; // An audio path with one dynamic bus from the synth feeding to a dynamic mono buffer.
- {$EXTERNALSYM DMUS_APATH_DYNAMIC_MONO}
- DMUS_APATH_DYNAMIC_STEREO = 8; // An audio path with two dynamic buses from the synth feeding to a dynamic stereo buffer.
- {$EXTERNALSYM DMUS_APATH_DYNAMIC_STEREO}
- type
- PDMusAudioParams = ^TDMusAudioParams;
- _DMUS_AUDIOPARAMS = packed record
- dwSize: DWORD; // Size of this structure.
- fInitNow: BOOL; // If true, the sink and synth are created immediately and results returned in this structure.
- dwValidData: DWORD; // Flags indicating which fields below are valid.
- dwFeatures: DWORD; // Required DMUS_AUDIOF features.
- dwVoices: DWORD; // Required number of voices.
- dwSampleRate: DWORD; // Sample rate of synths and sink.
- clsidDefaultSynth: TGUID; // Class ID of default synthesizer.
- end;
- {$EXTERNALSYM _DMUS_AUDIOPARAMS}
- DMUS_AUDIOPARAMS = _DMUS_AUDIOPARAMS;
- {$EXTERNALSYM DMUS_AUDIOPARAMS}
- TDMusAudioParams = _DMUS_AUDIOPARAMS;
- const
- (* dwFeatures flags. These indicate which features are required for the audio environment. *)
- DMUS_AUDIOF_3D = $1; // Require 3D buffers.
- {$EXTERNALSYM DMUS_AUDIOF_3D}
- DMUS_AUDIOF_ENVIRON = $2; // Require environmental modeling.
- {$EXTERNALSYM DMUS_AUDIOF_ENVIRON}
- DMUS_AUDIOF_EAX = $4; // Require use of EAX effects.
- {$EXTERNALSYM DMUS_AUDIOF_EAX}
- DMUS_AUDIOF_DMOS = $8; // Require use of additional DMOs.
- {$EXTERNALSYM DMUS_AUDIOF_DMOS}
- DMUS_AUDIOF_STREAMING = $10; // Require support for streaming waves.
- {$EXTERNALSYM DMUS_AUDIOF_STREAMING}
- DMUS_AUDIOF_BUFFERS = $20; // Require support for multiple buffers (all above cases need this.)
- {$EXTERNALSYM DMUS_AUDIOF_BUFFERS}
- DMUS_AUDIOF_ALL = $3F; // Requires everything.
- {$EXTERNALSYM DMUS_AUDIOF_ALL}
- (* dwValidData flags. These indicate which fields in DMUS_AUDIOPARAMS have been filled in. If fInitNow is set, these also return what was allocated. *)
- DMUS_AUDIOPARAMS_FEATURES = $00000001;
- {$EXTERNALSYM DMUS_AUDIOPARAMS_FEATURES}
- DMUS_AUDIOPARAMS_VOICES = $00000002;
- {$EXTERNALSYM DMUS_AUDIOPARAMS_VOICES}
- DMUS_AUDIOPARAMS_SAMPLERATE = $00000004;
- {$EXTERNALSYM DMUS_AUDIOPARAMS_SAMPLERATE}
- DMUS_AUDIOPARAMS_DEFAULTSYNTH = $00000008;
- {$EXTERNALSYM DMUS_AUDIOPARAMS_DEFAULTSYNTH}
- (* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member *)
- type
- enumDMUS_PMSGF_FLAGS = DWORD;
- {$EXTERNALSYM enumDMUS_PMSGF_FLAGS}
- DMUS_PMSGF_FLAGS = enumDMUS_PMSGF_FLAGS;
- {$EXTERNALSYM DMUS_PMSGF_FLAGS}
- TDMusPmsgfFlags = DMUS_PMSGF_FLAGS;
- PDMusPmsgfFlags = ^TDMusPmsgfFlags;
- const
- DMUS_PMSGF_REFTIME = 1; // if rtTime is valid
- {$EXTERNALSYM DMUS_PMSGF_REFTIME}
- DMUS_PMSGF_MUSICTIME = 2; // if mtTime is valid
- {$EXTERNALSYM DMUS_PMSGF_MUSICTIME}
- DMUS_PMSGF_TOOL_IMMEDIATE = 4; // if PMSG should be processed immediately
- {$EXTERNALSYM DMUS_PMSGF_TOOL_IMMEDIATE}
- DMUS_PMSGF_TOOL_QUEUE = 8; // if PMSG should be processed a little early, at Queue time
- {$EXTERNALSYM DMUS_PMSGF_TOOL_QUEUE}
- DMUS_PMSGF_TOOL_ATTIME = $10; // if PMSG should be processed at the time stamp
- {$EXTERNALSYM DMUS_PMSGF_TOOL_ATTIME}
- DMUS_PMSGF_TOOL_FLUSH = $20; // if PMSG is being flushed
- {$EXTERNALSYM DMUS_PMSGF_TOOL_FLUSH}
- DMUS_PMSGF_LOCKTOREFTIME = $40; // if rtTime can not be overriden by a tempo change.
- {$EXTERNALSYM DMUS_PMSGF_LOCKTOREFTIME}
- DMUS_PMSGF_DX8 = $80; // if the message has DX8 or later extensions.
- {$EXTERNALSYM DMUS_PMSGF_DX8}
- // The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the
- // DMUS_PMSG's dwFlags member.
- (* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member *)
- type
- enumDMUS_PMSGT_TYPES = DWORD;
- {$EXTERNALSYM enumDMUS_PMSGT_TYPES}
- DMUS_PMSGT_TYPES = enumDMUS_PMSGT_TYPES;
- {$EXTERNALSYM DMUS_PMSGT_TYPES}
- TDMusPmsgtTypes = DMUS_PMSGT_TYPES;
- PDMusPmsgtTypes = ^TDMusPmsgtTypes;
- const
- DMUS_PMSGT_MIDI = 0; // MIDI short message
- {$EXTERNALSYM DMUS_PMSGT_MIDI}
- DMUS_PMSGT_NOTE = 1; // Interactive Music Note
- {$EXTERNALSYM DMUS_PMSGT_NOTE}
- DMUS_PMSGT_SYSEX = 2; // MIDI long message (system exclusive message)
- {$EXTERNALSYM DMUS_PMSGT_SYSEX}
- DMUS_PMSGT_NOTIFICATION = 3; // Notification message
- {$EXTERNALSYM DMUS_PMSGT_NOTIFICATION}
- DMUS_PMSGT_TEMPO = 4; // Tempo message
- {$EXTERNALSYM DMUS_PMSGT_TEMPO}
- DMUS_PMSGT_CURVE = 5; // Control change / pitch bend, etc. curve
- {$EXTERNALSYM DMUS_PMSGT_CURVE}
- DMUS_PMSGT_TIMESIG = 6; // Time signature
- {$EXTERNALSYM DMUS_PMSGT_TIMESIG}
- DMUS_PMSGT_PATCH = 7; // Patch changes
- {$EXTERNALSYM DMUS_PMSGT_PATCH}
- DMUS_PMSGT_TRANSPOSE = 8; // Transposition messages
- {$EXTERNALSYM DMUS_PMSGT_TRANSPOSE}
- DMUS_PMSGT_CHANNEL_PRIORITY = 9; // Channel priority
- {$EXTERNALSYM DMUS_PMSGT_CHANNEL_PRIORITY}
- DMUS_PMSGT_STOP = 10; // Stop message
- {$EXTERNALSYM DMUS_PMSGT_STOP}
- DMUS_PMSGT_DIRTY = 11; // Tells Tools that cache GetParam() info to refresh
- {$EXTERNALSYM DMUS_PMSGT_DIRTY}
- DMUS_PMSGT_WAVE = 12; // Carries control information for playing a wave.
- {$EXTERNALSYM DMUS_PMSGT_WAVE}
- DMUS_PMSGT_LYRIC = 13; // Lyric message from lyric track.
- {$EXTERNALSYM DMUS_PMSGT_LYRIC}
- DMUS_PMSGT_SCRIPTLYRIC = 14; // Lyric message sent by a script with the Trace function.
- {$EXTERNALSYM DMUS_PMSGT_SCRIPTLYRIC}
- DMUS_PMSGT_USER = 255; // User message
- {$EXTERNALSYM DMUS_PMSGT_USER}
- type
- (* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API *)
- enumDMUS_SEGF_FLAGS = DWORD;
- DMUS_SEGF_FLAGS = enumDMUS_SEGF_FLAGS;
- {$EXTERNALSYM DMUS_SEGF_FLAGS}
- TDMusSegfFlags = DMUS_SEGF_FLAGS;
- PDMusSegfFlags = ^TDMusSegfFlags;
- const
- DMUS_SEGF_REFTIME = 1 shr 6; // 0x40 Time parameter is in reference time
- {$EXTERNALSYM DMUS_SEGF_REFTIME}
- DMUS_SEGF_SECONDARY = 1 shr 7; // 0x80 Secondary segment
- {$EXTERNALSYM DMUS_SEGF_SECONDARY}
- DMUS_SEGF_QUEUE = 1 shr 8; // 0x100 Queue at the end of the primary segment queue (primary only)
- {$EXTERNALSYM DMUS_SEGF_QUEUE}
- DMUS_SEGF_CONTROL = 1 shr 9; // 0x200 Play as a control track (secondary segments only)
- {$EXTERNALSYM DMUS_SEGF_CONTROL}
- DMUS_SEGF_AFTERPREPARETIME = 1 shr 10; // 0x400 Play after the prepare time (See IDirectMusicPerformance::GetPrepareTime)
- {$EXTERNALSYM DMUS_SEGF_AFTERPREPARETIME}
- DMUS_SEGF_GRID = 1 shr 11; // 0x800 Play on grid boundary
- {$EXTERNALSYM DMUS_SEGF_GRID}
- DMUS_SEGF_BEAT = 1 shr 12; // 0x1000 Play on beat boundary
- {$EXTERNALSYM DMUS_SEGF_BEAT}
- DMUS_SEGF_MEASURE = 1 shr 13; // 0x2000 Play on measure boundary
- {$EXTERNALSYM DMUS_SEGF_MEASURE}
- DMUS_SEGF_DEFAULT = 1 shr 14; // 0x4000 Use segment's default boundary
- {$EXTERNALSYM DMUS_SEGF_DEFAULT}
- DMUS_SEGF_NOINVALIDATE = 1 shr 15; // 0x8000 Play without invalidating the currently playing segment(s)
- {$EXTERNALSYM DMUS_SEGF_NOINVALIDATE}
- DMUS_SEGF_ALIGN = 1 shr 16; // 0x10000 Align segment with requested boundary, but switch at first valid point
- {$EXTERNALSYM DMUS_SEGF_ALIGN}
- DMUS_SEGF_VALID_START_BEAT = 1 shr 17; // 0x20000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any beat.
- {$EXTERNALSYM DMUS_SEGF_VALID_START_BEAT}
- DMUS_SEGF_VALID_START_GRID = 1 shr 18; // 0x40000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any grid.
- {$EXTERNALSYM DMUS_SEGF_VALID_START_GRID}
- DMUS_SEGF_VALID_START_TICK = 1 shr 19; // 0x80000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur any time.
- {$EXTERNALSYM DMUS_SEGF_VALID_START_TICK}
- DMUS_SEGF_AUTOTRANSITION = 1 shr 20; // 0x100000 Compose and play a transition segment, using the transition template.
- {$EXTERNALSYM DMUS_SEGF_AUTOTRANSITION}
- DMUS_SEGF_AFTERQUEUETIME = 1 shr 21; // 0x200000 Make sure to play after the queue time. This is default for primary segments
- {$EXTERNALSYM DMUS_SEGF_AFTERQUEUETIME}
- DMUS_SEGF_AFTERLATENCYTIME = 1 shr 22; // 0x400000 Make sure to play after the latency time. This is true for all segments, so this is a nop
- {$EXTERNALSYM DMUS_SEGF_AFTERLATENCYTIME}
- DMUS_SEGF_SEGMENTEND = 1 shr 23; // 0x800000 Play at the next end of segment.
- {$EXTERNALSYM DMUS_SEGF_SEGMENTEND}
- DMUS_SEGF_MARKER = 1 shr 24; // 0x1000000 Play at next marker in the primary segment. If there are no markers, default to any other resolution requests.
- {$EXTERNALSYM DMUS_SEGF_MARKER}
- DMUS_SEGF_TIMESIG_ALWAYS = 1 shr 25; // 0x2000000 Even if there is no primary segment, align start time with current time signature.
- {$EXTERNALSYM DMUS_SEGF_TIMESIG_ALWAYS}
- DMUS_SEGF_USE_AUDIOPATH = 1 shr 26; // 0x4000000 Uses the audio path that is embedded in the segment.
- {$EXTERNALSYM DMUS_SEGF_USE_AUDIOPATH}
- DMUS_SEGF_VALID_START_MEASURE = 1 shr 27; // 0x8000000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any bar.
- {$EXTERNALSYM DMUS_SEGF_VALID_START_MEASURE}
- DMUS_SEGF_INVALIDATE_PRI = 1 shr 28; // 0x10000000 invalidate only the current primary seg state
- {$EXTERNALSYM DMUS_SEGF_INVALIDATE_PRI}
- DMUS_SEG_REPEAT_INFINITE = $FFFFFFFF; // For IDirectMusicSegment::SetRepeat
- {$EXTERNALSYM DMUS_SEG_REPEAT_INFINITE}
- DMUS_SEG_ALLTRACKS = $80000000; // For IDirectMusicSegment::SetParam() and SetTrackConfig() - selects all tracks instead on nth index.
- {$EXTERNALSYM DMUS_SEG_ALLTRACKS}
- DMUS_SEG_ANYTRACK = $80000000; // For IDirectMusicSegment::GetParam() - checks each track until it finds one that returns data (not DMUS_E_NOT_FOUND.)
- {$EXTERNALSYM DMUS_SEG_ANYTRACK}
- // DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can
- // also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values
- // are intentionally the same
- type
- enumDMUS_TIME_RESOLVE_FLAGS = DWORD;
- {$EXTERNALSYM enumDMUS_TIME_RESOLVE_FLAGS}
- DMUS_TIME_RESOLVE_FLAGS = enumDMUS_TIME_RESOLVE_FLAGS;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_FLAGS}
- TDMusTimeResolveFlags = DMUS_TIME_RESOLVE_FLAGS;
- PDMusTimeResolveFlags = ^TDMusTimeResolveFlags;
- const
- DMUS_TIME_RESOLVE_AFTERPREPARETIME = DMUS_SEGF_AFTERPREPARETIME;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_AFTERPREPARETIME}
- DMUS_TIME_RESOLVE_AFTERQUEUETIME = DMUS_SEGF_AFTERQUEUETIME;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_AFTERQUEUETIME}
- DMUS_TIME_RESOLVE_AFTERLATENCYTIME = DMUS_SEGF_AFTERLATENCYTIME;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_AFTERLATENCYTIME}
- DMUS_TIME_RESOLVE_GRID = DMUS_SEGF_GRID;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_GRID}
- DMUS_TIME_RESOLVE_BEAT = DMUS_SEGF_BEAT;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_BEAT}
- DMUS_TIME_RESOLVE_MEASURE = DMUS_SEGF_MEASURE;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_MEASURE}
- DMUS_TIME_RESOLVE_MARKER = DMUS_SEGF_MARKER;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_MARKER}
- DMUS_TIME_RESOLVE_SEGMENTEND = DMUS_SEGF_SEGMENTEND;
- {$EXTERNALSYM DMUS_TIME_RESOLVE_SEGMENTEND}
- type
- (* The following flags are sent inside the DMUS_CHORD_KEY.dwFlags parameter *)
- enumDMUS_CHORDKEYF_FLAGS = DWORD;
- {$EXTERNALSYM enumDMUS_CHORDKEYF_FLAGS}
- DMUS_CHORDKEYF_FLAGS = enumDMUS_CHORDKEYF_FLAGS;
- {$EXTERNALSYM DMUS_CHORDKEYF_FLAGS}
- TDMusChordkeyfFlags = DMUS_CHORDKEYF_FLAGS;
- PDMusChordkeyfFlags = ^TDMusChordkeyfFlags;
- const
- DMUS_CHORDKEYF_SILENT = 1; // is the chord silent?
- {$EXTERNALSYM DMUS_CHORDKEYF_SILENT}
- DMUS_MAXSUBCHORD = 8;
- {$EXTERNALSYM DMUS_MAXSUBCHORD}
- type
- PDMusSubChord = ^TDMusSubChord;
- _DMUS_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_SUBCHORD}
- DMUS_SUBCHORD = _DMUS_SUBCHORD;
- {$EXTERNALSYM DMUS_SUBCHORD}
- TDMusSubChord = _DMUS_SUBCHORD;
- PDMusChordKey = ^TDMusChordKey;
- _DMUS_CHORD_KEY = packed record
- wszName: array [0..15] of WideChar; // Name of the chord
- wMeasure: Word; // Measure this falls on
- bBeat: Byte; // Beat this falls on
- bSubChordCount: Byte; // Number of chords in the list of subchords
- SubChordList: array[0..DMUS_MAXSUBCHORD-1] of TDMUSSUBCHORD; // List of sub chords
- dwScale: DWORD; // Scale underlying the entire chord
- bKey: Byte; // Key underlying the entire chord
- bFlags: Byte; // Miscelaneous flags
- end;
- {$EXTERNALSYM _DMUS_CHORD_KEY}
- DMUS_CHORD_KEY = _DMUS_CHORD_KEY;
- {$EXTERNALSYM DMUS_CHORD_KEY}
- TDMusChordKey = _DMUS_CHORD_KEY;
- enumDMUS_NOTEF_FLAGS = DWORD;
- {$EXTERNALSYM enumDMUS_NOTEF_FLAGS}
- DMUS_NOTEF_FLAGS = enumDMUS_NOTEF_FLAGS;
- {$EXTERNALSYM DMUS_NOTEF_FLAGS}
- TDMusNotefFlags = DMUS_NOTEF_FLAGS;
- PDMusNotefFlags = ^TDMusNotefFlags;
- const
- DMUS_NOTEF_NOTEON = 1; // Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off
- {$EXTERNALSYM DMUS_NOTEF_NOTEON}
- // DX8 flags:
- DMUS_NOTEF_NOINVALIDATE = 2; // Don't invalidate this note off.
- {$EXTERNALSYM DMUS_NOTEF_NOINVALIDATE}
- DMUS_NOTEF_NOINVALIDATE_INSCALE = 4;// Don't invalidate if still within the scale.
- {$EXTERNALSYM DMUS_NOTEF_NOINVALIDATE_INSCALE}
- DMUS_NOTEF_NOINVALIDATE_INCHORD = 8;// Don't invalidate if still within the chord.
- {$EXTERNALSYM DMUS_NOTEF_NOINVALIDATE_INCHORD}
- DMUS_NOTEF_REGENERATE = #10; // Regenerate the note on an invalidate.
- {$EXTERNALSYM DMUS_NOTEF_REGENERATE}
- type
- (* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
- into the appropriate bMidiValue.
- *)
- enumDMUS_PLAYMODE_FLAGS = Byte;
- DMUS_PLAYMODE_FLAGS = enumDMUS_PLAYMODE_FLAGS;
- const
- DMUS_PLAYMODE_KEY_ROOT = 1; // Transpose on top of the key root.
- {$EXTERNALSYM DMUS_PLAYMODE_KEY_ROOT}
- DMUS_PLAYMODE_CHORD_ROOT = 2; // Transpose on top of the chord root.
- {$EXTERNALSYM DMUS_PLAYMODE_CHORD_ROOT}
- DMUS_PLAYMODE_SCALE_INTERVALS = 4; // Use scale intervals from scale pattern.
- {$EXTERNALSYM DMUS_PLAYMODE_SCALE_INTERVALS}
- DMUS_PLAYMODE_CHORD_INTERVALS = 8; // Use chord intervals from chord pattern.
- {$EXTERNALSYM DMUS_PLAYMODE_CHORD_INTERVALS}
- DMUS_PLAYMODE_NONE = 16; // No mode. Indicates the parent part's mode should be used.
- {$EXTERNALSYM DMUS_PLAYMODE_NONE}
- (* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
- in various ways:
- *)
- (* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
- notes that should not be transposed by the chord or scale.
- *)
- DMUS_PLAYMODE_FIXED = 0;
- {$EXTERNALSYM DMUS_PLAYMODE_FIXED}
- (* In fixed to key, the musicvalue is again a fixed MIDI value, but it
- is transposed on top of the key root.
- *)
- DMUS_PLAYMODE_FIXEDTOKEY = DMUS_PLAYMODE_KEY_ROOT;
- {$EXTERNALSYM DMUS_PLAYMODE_FIXEDTOKEY}
- (* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
- is transposed on top of the chord root.
- *)
- DMUS_PLAYMODE_FIXEDTOCHORD = DMUS_PLAYMODE_CHORD_ROOT;
- {$EXTERNALSYM DMUS_PLAYMODE_FIXEDTOCHORD}
- (* In Pedalpoint, the key root is used and the notes only track the intervals in
- the scale. The chord root and intervals are completely ignored. This is useful
- for melodic lines that play relative to the key root.
- *)
- DMUS_PLAYMODE_PEDALPOINT = (DMUS_PLAYMODE_KEY_ROOT or DMUS_PLAYMODE_SCALE_INTERVALS);
- {$EXTERNALSYM DMUS_PLAYMODE_PEDALPOINT}
- (* In the Melodic mode, the chord root is used but the notes only track the intervals in
- the scale. The key root and chord intervals are completely ignored. This is useful
- for melodic lines that play relative to the chord root.
- *)
- DMUS_PLAYMODE_MELODIC = (DMUS_PLAYMODE_CHORD_ROOT or DMUS_PLAYMODE_SCALE_INTERVALS);
- {$EXTERNALSYM DMUS_PLAYMODE_MELODIC}
- (* Normal chord mode is the prevalent playback mode.
- The notes track the intervals in the chord, which is based on the chord root.
- If there is a scale component to the MusicValue, the additional intervals
- are pulled from the scale and added.
- If the chord does not have an interval to match the chord component of
- the MusicValue, the note is silent.
- *)
- DMUS_PLAYMODE_NORMALCHORD = (DMUS_PLAYMODE_CHORD_ROOT or DMUS_PLAYMODE_CHORD_INTERVALS);
- {$EXTERNALSYM DMUS_PLAYMODE_NORMALCHORD}
- (* If it is desirable to play a note that is above the top of the chord, the
- always play mode (known as "purpleized" in a former life) finds a position
- for the note by using intervals from the scale. Essentially, this mode is
- a combination of the Normal and Melodic playback modes, where a failure
- in Normal causes a second try in Melodic mode.
- *)
- DMUS_PLAYMODE_ALWAYSPLAY = (DMUS_PLAYMODE_MELODIC or DMUS_PLAYMODE_NORMALCHORD);
- {$EXTERNALSYM DMUS_PLAYMODE_ALWAYSPLAY}
- (* These playmodes are new for dx8. *)
- (* In PedalpointChord, the key root is used and the notes only track the intervals in
- the chord. The chord root and scale intervals are completely ignored. This is useful
- for chordal lines that play relative to the key root.
- *)
- DMUS_PLAYMODE_PEDALPOINTCHORD = (DMUS_PLAYMODE_KEY_ROOT or DMUS_PLAYMODE_CHORD_INTERVALS);
- {$EXTERNALSYM DMUS_PLAYMODE_PEDALPOINTCHORD}
- (* For completeness, here's a mode that tries for pedalpointchord, but if it fails
- uses scale intervals
- *)
- DMUS_PLAYMODE_PEDALPOINTALWAYS = (DMUS_PLAYMODE_PEDALPOINT or DMUS_PLAYMODE_PEDALPOINTCHORD);
- {$EXTERNALSYM DMUS_PLAYMODE_PEDALPOINTALWAYS}
- (* Legacy names for modes... *)
- DMUS_PLAYMODE_PURPLEIZED = DMUS_PLAYMODE_ALWAYSPLAY;
- {$EXTERNALSYM DMUS_PLAYMODE_PURPLEIZED}
- DMUS_PLAYMODE_SCALE_ROOT = DMUS_PLAYMODE_KEY_ROOT;
- {$EXTERNALSYM DMUS_PLAYMODE_SCALE_ROOT}
- DMUS_PLAYMODE_FIXEDTOSCALE = DMUS_PLAYMODE_FIXEDTOKEY;
- {$EXTERNALSYM DMUS_PLAYMODE_FIXEDTOSCALE}
- const
- DMUS_TEMPO_MAX = 1000;
- {$EXTERNALSYM DMUS_TEMPO_MAX}
- DMUS_TEMPO_MIN = 1;
- {$EXTERNALSYM DMUS_TEMPO_MIN}
- DMUS_MASTERTEMPO_MAX = 100.0;
- {$EXTERNALSYM DMUS_MASTERTEMPO_MAX}
- DMUS_MASTERTEMPO_MIN = 0.01;
- {$EXTERNALSYM DMUS_MASTERTEMPO_MIN}
- const
- DMUS_CURVE_RESET = 1; (* When set, the nResetValue must be sent when the
- time is reached or an invalidate occurs because
- of a transition. If not set, the curve stays
- permanently stuck at the new value. *)
- {$EXTERNALSYM DMUS_CURVE_RESET}
- DMUS_CURVE_START_FROM_CURRENT = 2; (* Ignore Start, start the curve at the current value.
- This only works for volume, expression, and pitchbend. *)
- {$EXTERNALSYM DMUS_CURVE_START_FROM_CURRENT}
- (* Curve shapes *)
- DMUS_CURVES_LINEAR = 0;
- {$EXTERNALSYM DMUS_CURVES_LINEAR}
- DMUS_CURVES_INSTANT = 1;
- {$EXTERNALSYM DMUS_CURVES_INSTANT}
- DMUS_CURVES_EXP = 2;
- {$EXTERNALSYM DMUS_CURVES_EXP}
- DMUS_CURVES_LOG = 3;
- {$EXTERNALSYM DMUS_CURVES_LOG}
- DMUS_CURVES_SINE = 4;
- {$EXTERNALSYM DMUS_CURVES_SINE}
- (* curve types *)
- DMUS_CURVET_PBCURVE = $03; // Pitch bend curve.
- {$EXTERNALSYM DMUS_CURVET_PBCURVE}
- DMUS_CURVET_CCCURVE = $04; // Control change curve.
- {$EXTERNALSYM DMUS_CURVET_CCCURVE}
- DMUS_CURVET_MATCURVE = $05; // Mono aftertouch curve.
- {$EXTERNALSYM DMUS_CURVET_MATCURVE}
- DMUS_CURVET_PATCURVE = $06; // Poly aftertouch curve.
- {$EXTERNALSYM DMUS_CURVET_PATCURVE}
- DMUS_CURVET_RPNCURVE = $07; // RPN curve with curve type in wParamType.
- {$EXTERNALSYM DMUS_CURVET_RPNCURVE}
- DMUS_CURVET_NRPNCURVE = $08; // NRPN curve with curve type in wParamType.
- {$EXTERNALSYM DMUS_CURVET_NRPNCURVE}
- const
- (* notification type values *)
- (* The following correspond to GUID_NOTIFICATION_SEGMENT *)
- DMUS_NOTIFICATION_SEGSTART = 0;
- {$EXTERNALSYM DMUS_NOTIFICATION_SEGSTART}
- DMUS_NOTIFICATION_SEGEND = 1;
- {$EXTERNALSYM DMUS_NOTIFICATION_SEGEND}
- DMUS_NOTIFICATION_SEGALMOSTEND = 2;
- {$EXTERNALSYM DMUS_NOTIFICATION_SEGALMOSTEND}
- DMUS_NOTIFICATION_SEGLOOP = 3;
- {$EXTERNALSYM DMUS_NOTIFICATION_SEGLOOP}
- DMUS_NOTIFICATION_SEGABORT = 4;
- {$EXTERNALSYM DMUS_NOTIFICATION_SEGABORT}
- (* The following correspond to GUID_NOTIFICATION_PERFORMANCE *)
- DMUS_NOTIFICATION_MUSICSTARTED = 0;
- {$EXTERNALSYM DMUS_NOTIFICATION_MUSICSTARTED}
- DMUS_NOTIFICATION_MUSICSTOPPED = 1;
- {$EXTERNALSYM DMUS_NOTIFICATION_MUSICSTOPPED}
- DMUS_NOTIFICATION_MUSICALMOSTEND = 2;
- {$EXTERNALSYM DMUS_NOTIFICATION_MUSICALMOSTEND}
- (* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT *)
- DMUS_NOTIFICATION_MEASUREBEAT = 0;
- {$EXTERNALSYM DMUS_NOTIFICATION_MEASUREBEAT}
- (* The following corresponds to GUID_NOTIFICATION_CHORD *)
- DMUS_NOTIFICATION_CHORD = 0;
- {$EXTERNALSYM DMUS_NOTIFICATION_CHORD}
- (* The following correspond to GUID_NOTIFICATION_COMMAND *)
- DMUS_NOTIFICATION_GROOVE = 0;
- {$EXTERNALSYM DMUS_NOTIFICATION_GROOVE}
- DMUS_NOTIFICATION_EMBELLISHMENT = 1;
- {$EXTERNALSYM DMUS_NOTIFICATION_EMBELLISHMENT}
- (* The following corresponds to GUID_NOTIFICATION_RECOMPOSE *)
- DMUS_NOTIFICATION_RECOMPOSE = 0;
- {$EXTERNALSYM DMUS_NOTIFICATION_RECOMPOSE}
- const
- DMUS_WAVEF_OFF = 1; // If wave is playing and this is the off message.
- {$EXTERNALSYM DMUS_WAVEF_OFF}
- DMUS_WAVEF_STREAMING = 2; // If wave is streaming.
- {$EXTERNALSYM DMUS_WAVEF_STREAMING}
- DMUS_WAVEF_NOINVALIDATE = 4; // Don't invalidate this wave.
- {$EXTERNALSYM DMUS_WAVEF_NOINVALIDATE}
- DMUS_WAVEF_NOPREROLL = 8; // Don't preroll any wave data.
- {$EXTERNALSYM DMUS_WAVEF_NOPREROLL}
- DMUS_WAVEF_IGNORELOOPS = $20; // Ignore segment looping.
- {$EXTERNALSYM DMUS_WAVEF_IGNORELOOPS}
- const
- DMUS_MAX_NAME = 64; (* Maximum object name length. *)
- {$EXTERNALSYM DMUS_MAX_NAME}
- DMUS_MAX_CATEGORY = 64; (* Maximum object category name length. *)
- {$EXTERNALSYM DMUS_MAX_CATEGORY}
- DMUS_MAX_FILENAME = MAX_PATH;
- {$EXTERNALSYM DMUS_MAX_FILENAME}
- type
- PDMusVersion = ^TDMusVersion;
- _DMUS_VERSION = packed record
- dwVersionMS: DWORD;
- dwVersionLS: DWORD;
- end;
- {$EXTERNALSYM _DMUS_VERSION}
- DMUS_VERSION = _DMUS_VERSION;
- {$EXTERNALSYM DMUS_VERSION}
- TDMusVersion = _DMUS_VERSION;
- // Time Signature structure, used by IDirectMusicStyle
- // Also used as a parameter for GetParam() and SetParam
- PDMusTimeSignature = ^TDMusTimeSignature;
- _DMUS_TIMESIGNATURE = packed record
- mtTime: 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_TIMESIGNATURE}
- DMUS_TIMESIGNATURE = _DMUS_TIMESIGNATURE;
- {$EXTERNALSYM DMUS_TIMESIGNATURE}
- TDMusTimeSignature = _DMUS_TIMESIGNATURE;
- PDMusValidStartParam = ^TDMusValidStartParam;
- _DMUS_VALID_START_PARAM = packed record
- mtTime: TMUSICTIME; (* Time of the first legal start
- point after (or including) the requested time.
- This is a returned value.
- Time format is the relative offset from requested time. *)
- end;
- {$EXTERNALSYM _DMUS_VALID_START_PARAM}
- DMUS_VALID_START_PARAM = _DMUS_VALID_START_PARAM;
- {$EXTERNALSYM DMUS_VALID_START_PARAM}
- TDMusValidStartParam = _DMUS_VALID_START_PARAM;
- PDMusPlayMarkerParam = ^TDMusPlayMarkerParam;
- _DMUS_PLAY_MARKER_PARAM = packed record
- mtTime: TMusicTime; (* Time of the first legal segment play
- marker before (or including) the requested time.
- This is a returned value.
- Time format is the relative offset from requested time. *)
- end;
- {$EXTERNALSYM _DMUS_PLAY_MARKER_PARAM}
- DMUS_PLAY_MARKER_PARAM = _DMUS_PLAY_MARKER_PARAM;
- {$EXTERNALSYM DMUS_PLAY_MARKER_PARAM}
- TDMusPlayMarkerParam = _DMUS_PLAY_MARKER_PARAM;
- // The DMUSOBJECTDESC structure is used to communicate everything you could
- // possibly use to describe a DirectMusic object.
- PDMusObjectDesc = ^TDMusObjectDesc;
- _DMUS_OBJECTDESC = packed record
- dwSize: DWORD; (* Size of this structure. *)
- dwValidData: DWORD; (* Flags indicating which fields below are valid. *)
- guidObject: TGUID; (* Unique ID for this object. *)
- guidClass: TGUID; (* GUID for the class of object. *)
- ftDate: TFileTime; (* Last edited date of object. *)
- vVersion: TDMusVersion; (* Version. *)
- wszName: array[0..DMUS_MAX_NAME-1] of WideChar; (* Name of object. *)
- wszCategory: array[0..DMUS_MAX_CATEGORY-1] of WideChar; (* Category for object (optional). *)
- wszFileName: array[0..DMUS_MAX_FILENAME-1] of WideChar; (* File path. *)
- llMemLength: LONGLONG; (* Size of Memory data. *)
- pbMemData: PByte; (* Memory pointer for data. *)
- pStream: IStream; (* Stream with data. *)
- end;
- {$EXTERNALSYM _DMUS_OBJECTDESC}
- DMUS_OBJECTDESC = _DMUS_OBJECTDESC;
- {$EXTERNALSYM DMUS_OBJECTDESC}
- TDMusObjectDesc = _DMUS_OBJECTDESC;
- // Flags for dwValidData. When set, a flag indicates that the
- // corresponding field in DMUSOBJECTDESC holds valid data.
- const
- DMUS_OBJ_OBJECT = (1 shl 0); (* Object GUID is valid. *)
- {$EXTERNALSYM DMUS_OBJ_OBJECT}
- DMUS_OBJ_CLASS = (1 shl 1); (* Class GUID is valid. *)
- {$EXTERNALSYM DMUS_OBJ_CLASS}
- DMUS_OBJ_NAME = (1 shl 2); (* Name is valid. *)
- {$EXTERNALSYM DMUS_OBJ_NAME}
- DMUS_OBJ_CATEGORY = (1 shl 3); (* Category is valid. *)
- {$EXTERNALSYM DMUS_OBJ_CATEGORY}
- DMUS_OBJ_FILENAME = (1 shl 4); (* File path is valid. *)
- {$EXTERNALSYM DMUS_OBJ_FILENAME}
- DMUS_OBJ_FULLPATH = (1 shl 5); (* Path is full path. *)
- {$EXTERNALSYM DMUS_OBJ_FULLPATH}
- DMUS_OBJ_URL = (1 shl 6); (* Path is URL. *)
- {$EXTERNALSYM DMUS_OBJ_URL}
- DMUS_OBJ_VERSION = (1 shl 7); (* Version is valid. *)
- {$EXTERNALSYM DMUS_OBJ_VERSION}
- DMUS_OBJ_DATE = (1 shl 8); (* Date is valid. *)
- {$EXTERNALSYM DMUS_OBJ_DATE}
- DMUS_OBJ_LOADED = (1 shl 9); (* Object is currently loaded in memory. *)
- {$EXTERNALSYM DMUS_OBJ_LOADED}
- DMUS_OBJ_MEMORY = (1 shl 10); (* Object is pointed to by pbMemData. *)
- {$EXTERNALSYM DMUS_OBJ_MEMORY}
- DMUS_OBJ_STREAM = (1 shl 11); (* Object is stored in pStream. *)
- {$EXTERNALSYM DMUS_OBJ_STREAM}
- type
- (* The DMUS_SCRIPT_ERRORINFO structure describes an error that occurred in a script.
- It is returned by methods in IDirectMusicScript. *)
- PDMusScriptErrorInfo = ^TDMusScriptErrorInfo;
- _DMUS_SCRIPT_ERRORINFO = packed record
- dwSize: DWORD; (* Size of this structure. *)
- hr: HRESULT;
- ulLineNumber: Cardinal;
- ichCharPosition: Longint;
- wszSourceFile: array[0..DMUS_MAX_FILENAME-1] of WideChar;
- wszSourceComponent: array[0..DMUS_MAX_FILENAME-1] of WideChar;
- wszDescription: array[0..DMUS_MAX_FILENAME-1] of WideChar;
- wszSourceLineText: array[0..DMUS_MAX_FILENAME-1] of WideChar;
- end;
- {$EXTERNALSYM _DMUS_SCRIPT_ERRORINFO}
- DMUS_SCRIPT_ERRORINFO = _DMUS_SCRIPT_ERRORINFO;
- {$EXTERNALSYM DMUS_SCRIPT_ERRORINFO}
- TDMusScriptErrorInfo = _DMUS_SCRIPT_ERRORINFO;
- (* Track configuration flags, used with IDirectMusicSegment8::SetTrackConfig() *)
- const
- DMUS_TRACKCONFIG_OVERRIDE_ALL = 1; (* This track should get parameters from this segment before controlling and primary tracks. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_OVERRIDE_ALL}
- DMUS_TRACKCONFIG_OVERRIDE_PRIMARY = 2; (* This track should get parameters from this segment before the primary segment tracks. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_OVERRIDE_PRIMARY}
- DMUS_TRACKCONFIG_FALLBACK = 4; (* This track should get parameters from this segment if the primary and controlling segments don't succeed. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_FALLBACK}
- DMUS_TRACKCONFIG_CONTROL_ENABLED = 8; (* GetParam() enabled for this track. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_CONTROL_ENABLED}
- DMUS_TRACKCONFIG_PLAY_ENABLED = $10; (* Play() enabled for this track. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_PLAY_ENABLED}
- DMUS_TRACKCONFIG_NOTIFICATION_ENABLED = $20; (* Notifications enabled for this track. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_NOTIFICATION_ENABLED}
- DMUS_TRACKCONFIG_PLAY_CLOCKTIME = $40; (* This track plays in clock time, not music time. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_PLAY_CLOCKTIME}
- DMUS_TRACKCONFIG_PLAY_COMPOSE = $80; (* This track should regenerate data each time it starts playing. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_PLAY_COMPOSE}
- DMUS_TRACKCONFIG_LOOP_COMPOSE = $100; (* This track should regenerate data each time it repeats. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_LOOP_COMPOSE}
- DMUS_TRACKCONFIG_COMPOSING = $200; (* This track is used to compose other tracks. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_COMPOSING}
- DMUS_TRACKCONFIG_CONTROL_PLAY = $10000; (* This track, when played in a controlling segment, overrides playback of primary segment tracks. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_CONTROL_PLAY}
- DMUS_TRACKCONFIG_CONTROL_NOTIFICATION = $20000; (* This track, when played in a controlling segment, overrides notification of primary segment tracks. *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_CONTROL_NOTIFICATION}
- (* Additional track config flags for composing transitions *)
- DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART = $400; (* Get track info from start of From segment *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART}
- DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT = $800; (* Get track info from current place in From segment *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT}
- DMUS_TRACKCONFIG_TRANS1_TOSEGSTART = $1000; (* Get track info from start of To segment *)
- {$EXTERNALSYM DMUS_TRACKCONFIG_TRANS1_TOSEGSTART}
- DMUS_TRACKCONFIG_DEFAULT = (DMUS_TRACKCONFIG_CONTROL_ENABLED or DMUS_TRACKCONFIG_PLAY_ENABLED or DMUS_TRACKCONFIG_NOTIFICATION_ENABLED);
- {$EXTERNALSYM DMUS_TRACKCONFIG_DEFAULT}
- type
- // Get/SetParam structs for commands
- // PARAM structures, used by GetParam() and SetParam()
- PDMusCommandParam = ^TDMusCommandParam;
- _DMUS_COMMAND_PARAM = packed record
- bCommand: Byte;
- bGrooveLevel: Byte;
- bGrooveRange: Byte;
- bRepeatMode: Byte;
- end;
- {$EXTERNALSYM _DMUS_COMMAND_PARAM}
- DMUS_COMMAND_PARAM = _DMUS_COMMAND_PARAM;
- {$EXTERNALSYM DMUS_COMMAND_PARAM}
- TDMusCommandParam = _DMUS_COMMAND_PARAM;
- PDMusCommandParam2 = ^TDMusCommandParam2;
- _DMUS_COMMAND_PARAM_2 = packed record
- mtTime: TMusicTime;
- bCommand: Byte;
- bGrooveLevel: Byte;
- bGrooveRange: Byte;
- bRepeatMode: Byte;
- end;
- {$EXTERNALSYM _DMUS_COMMAND_PARAM_2}
- DMUS_COMMAND_PARAM_2 = _DMUS_COMMAND_PARAM_2;
- {$EXTERNALSYM DMUS_COMMAND_PARAM_2}
- TDMusCommandParam2 = _DMUS_COMMAND_PARAM_2;
- const
- DMUSB_LOADED = (1 shl 0); (* Set when band has been loaded *)
- {$EXTERNALSYM DMUSB_LOADED}
- DMUSB_DEFAULT = (1 shl 1); (* Set when band is default band for a style *)
- {$EXTERNALSYM DMUSB_DEFAULT}
-
- type
- IDirectMusicTrack = interface;
- IDirectMusicSegment = interface;
- IDirectMusicSegmentState = interface;
- IDirectMusicGraph = interface;
- IDirectMusicPerformance = interface;
- IDirectMusicTool = interface;
- IDirectMusicChordMap = interface;
- PIDirectMusicSegmentState = ^IDirectMusicSegmentState;
- // Translator: Structure declarations below (until interface declaration) were
- // moved here from above of header due to refereces to IDirectMusicTool and
- // IDirectMusicGraph interfaces
- {
- //Translator: this '#define' will be used later is several places
- //#define DMUS_PMSG_PART
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- }
- (* every DMUS_PMSG is based off of this structure. The Performance needs
- to access these members consistently in every PMSG that goes through it. *)
- PDMusPMsg = ^TDMusPMsg;
- _DMUS_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- end;
- {$EXTERNALSYM _DMUS_PMSG}
- DMUS_PMSG = _DMUS_PMSG;
- {$EXTERNALSYM DMUS_PMSG}
- TDMusPMsg = _DMUS_PMSG;
- (* DMUS_NOTE_PMSG *)
- PDMusNotePMsg = ^TDMusNotePMsg;
- _DMUS_NOTE_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; // real time (in 100 nanosecond increments)
- mtTime: TMusicTime; // music time
- dwFlags: DWORD; // various bits (see DMUS_PMSGF_FLAGS enumeration)
- dwPChannel: DWORD; // Performance Channel. The Performance can
- // use this to determine the port/channel.
- dwVirtualTrackID: DWORD; // virtual track ID
- pTool: IDirectMusicTool; // tool interface pointer
- pGraph: IDirectMusicGraph; // tool graph interface pointer
- dwType: DWORD; // PMSG type (see DMUS_PMSGT_TYPES defines)
- dwVoiceID: DWORD; // unique voice id which allows synthesizers to
- // identify a specific event. For DirectX 6.0,
- // this field should always be 0.
- dwGroupID: DWORD; // Track group id
- punkUser: IUnknown; // user com pointer, auto released upon PMSG free
- (* end DMUS_PMSG_PART *)
- mtDuration: TMusicTime; // duration
- wMusicValue: Word; // Description of note in chord and key.
- wMeasure: Word; // Measure in which this note occurs
- nOffset: Smallint; // Offset from grid at which this note occurs
- bBeat: Byte; // Beat (in measure) at which this note occurs
- bGrid: Byte; // Grid offset from beat at which this note occurs
- bVelocity: Byte; // Note velocity
- bFlags: Byte; // see DMUS_NOTEF_FLAGS
- bTimeRange: Byte; // Range to randomize time.
- bDurRange: Byte; // Range to randomize duration.
- bVelRange: Byte; // Range to randomize velocity.
- bPlayModeFlags: Byte; // Play mode
- bSubChordLevel: Byte; // Which subchord level this note uses.
- bMidiValue: Byte; // The MIDI note value, converted from wMusicValue
- cTranspose: Char; // Transposition to add to midi note value after converted from wMusicValue.
- end;
- {$EXTERNALSYM _DMUS_NOTE_PMSG}
- DMUS_NOTE_PMSG = _DMUS_NOTE_PMSG;
- {$EXTERNALSYM DMUS_NOTE_PMSG}
- TDMusNotePMsg = _DMUS_NOTE_PMSG;
- (* DMUS_MIDI_PMSG *)
- PDMusMidiPMsg = ^TDMusMidiPMsg;
- _DMUS_MIDI_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- bStatus: Byte;
- bByte1: Byte;
- bByte2: Byte;
- bPad: array[0..0] of Byte;
- end;
- {$EXTERNALSYM _DMUS_MIDI_PMSG}
- DMUS_MIDI_PMSG = _DMUS_MIDI_PMSG;
- {$EXTERNALSYM DMUS_MIDI_PMSG}
- TDMusMidiPMsg = _DMUS_MIDI_PMSG;
- (* DMUS_PATCH_PMSG *)
- PDMusPatchPMsg = ^TDMusPatchPMsg;
- _DMUS_PATCH_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- byInstrument: Byte;
- byMSB: Byte;
- byLSB: Byte;
- byPad: array[0..0] of Byte;
- end;
- {$EXTERNALSYM _DMUS_PATCH_PMSG}
- DMUS_PATCH_PMSG = _DMUS_PATCH_PMSG;
- {$EXTERNALSYM DMUS_PATCH_PMSG}
- TDMusPatchPMsg = _DMUS_PATCH_PMSG;
- (* DMUS_TRANSPOSE_PMSG *)
- PDMusTransposePMsg = ^TDMusTransposePMsg;
- _DMUS_TRANSPOSE_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- nTranspose: Smallint;
- (* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) *)
- wMergeIndex: Word; (* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*)
- end;
- {$EXTERNALSYM _DMUS_TRANSPOSE_PMSG}
- DMUS_TRANSPOSE_PMSG = _DMUS_TRANSPOSE_PMSG;
- {$EXTERNALSYM DMUS_TRANSPOSE_PMSG}
- TDMusTransposePMsg = _DMUS_TRANSPOSE_PMSG;
- (* DMUS_CHANNEL_PRIORITY_PMSG *)
- PDMusChannelPriorityPMsg = ^TDMusChannelPriorityPMsg;
- _DMUS_CHANNEL_PRIORITY_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- dwChannelPriority: DWORD;
- end;
- {$EXTERNALSYM _DMUS_CHANNEL_PRIORITY_PMSG}
- DMUS_CHANNEL_PRIORITY_PMSG = _DMUS_CHANNEL_PRIORITY_PMSG;
- {$EXTERNALSYM DMUS_CHANNEL_PRIORITY_PMSG}
- TDMusChannelPriorityPMsg = _DMUS_CHANNEL_PRIORITY_PMSG;
- (* DMUS_TEMPO_PMSG *)
- PDMusTempoPMsg = ^TDMusTempoPMsg;
- _DMUS_TEMPO_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- dblTempo: Double; (* the tempo *)
- end;
- {$EXTERNALSYM _DMUS_TEMPO_PMSG}
- DMUS_TEMPO_PMSG = _DMUS_TEMPO_PMSG;
- {$EXTERNALSYM DMUS_TEMPO_PMSG}
- TDMusTempoPMsg = _DMUS_TEMPO_PMSG;
- (* DMUS_SYSEX_PMSG *)
- PDMusSysexPMsg = ^TDMusSysexPMsg;
- _DMUS_SYSEX_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- dwLen: DWORD; // length of the data
- abData: array[0..0] of Byte; // array of data, length equal to dwLen
- end;
- {$EXTERNALSYM _DMUS_SYSEX_PMSG}
- DMUS_SYSEX_PMSG = _DMUS_SYSEX_PMSG;
- {$EXTERNALSYM DMUS_SYSEX_PMSG}
- TDMusSysexPMsg = _DMUS_SYSEX_PMSG;
- (* DMUS_CURVE_PMSG *)
- PDMusCurvePMsg = ^TDMusCurvePMsg;
- _DMUS_CURVE_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- mtDuration: TMusicTime; // how long this curve lasts
- mtOriginalStart: TMusicTime; // must be set to either zero when this PMSG is created or to the original mtTime of the curve
- mtResetDuration: TMusicTime; (* how long after the curve is finished to allow a flush or
- invalidation to reset to the reset value, nResetValue *)
- nStartValue: Smallint; // curve's start value
- nEndValue: Smallint; // curve's end value
- nResetValue: Smallint; (* curve's reset value, set when a flush or invalidation
- occurs within mtDuration + mtResetDuration *)
- wMeasure: Word; // Measure in which this curve occurs
- nOffset: Smallint; // Offset from grid at which this curve occurs
- bBeat: Byte; // Beat (in measure) at which this curve occurs
- bGrid: Byte; // Grid offset from beat at which this curve occurs
- bType: Byte; // type of curve
- bCurveShape: Byte; // shape of curve
- bCCData: Byte; // CC# if this is a control change type
- bFlags: Byte; // Curve reset and start from current value flags.
- // Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8)
- wParamType: Word; // RPN or NRPN parameter number.
- wMergeIndex: Word; // Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
- end;
- {$EXTERNALSYM _DMUS_CURVE_PMSG}
- DMUS_CURVE_PMSG = _DMUS_CURVE_PMSG;
- {$EXTERNALSYM DMUS_CURVE_PMSG}
- TDMusCurvePMsg = _DMUS_CURVE_PMSG;
- enumDMUS_CURVE_FLAGS = DWORD;
- DMUS_CURVE_FLAGS = enumDMUS_CURVE_FLAGS;
- {$EXTERNALSYM DMUS_CURVE_FLAGS}
- TDMusCurveFlags = DMUS_CURVE_FLAGS;
- PDMusCurveFlags = ^TDMusCurveFlags;
- (* DMUS_TIMESIG_PMSG *)
- PDMusTimeSigPMsg = ^TDMusTimesigPMsg;
- _DMUS_TIMESIG_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- // Time signatures define how many beats per measure, which note receives
- // the beat, and the grid resolution.
- 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_TIMESIG_PMSG}
- DMUS_TIMESIG_PMSG = _DMUS_TIMESIG_PMSG;
- {$EXTERNALSYM DMUS_TIMESIG_PMSG}
- TDMusTimeSigPMsg = _DMUS_TIMESIG_PMSG;
- (* DMUS_NOTIFICATION_PMSG *)
- PDMusNotificationPMsg = ^TDMusNotificationPMsg;
- _DMUS_NOTIFICATION_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- guidNotificationType: TGUID;
- dwNotificationOption: DWORD;
- dwField1: DWORD;
- dwField2: DWORD;
- end;
- {$EXTERNALSYM _DMUS_NOTIFICATION_PMSG}
- DMUS_NOTIFICATION_PMSG = _DMUS_NOTIFICATION_PMSG;
- {$EXTERNALSYM DMUS_NOTIFICATION_PMSG}
- TDMusNotificationPMsg = _DMUS_NOTIFICATION_PMSG;
- (* DMUS_WAVE_PMSG *)
- PDMusWavePMsg = ^TDMusWavePMsg;
- _DMUS_WAVE_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- rtStartOffset: TReferenceTime; (* How far into the wave to start, in reference time units only. *)
- rtDuration: TReferenceTime; (* Duration of the wave, in either reference time or music time. *)
- lOffset: Longint; (* Offset from actual time to logical time, in music or ref time. *)
- lVolume: Longint; (* Initial volume, in 100ths of a dB. *)
- lPitch: Longint; (* Initial pitch, in 100ths of a semitone. *)
- bFlags: Byte; (* Flags, including DMUS_WAVEF_OFF... *)
- end;
- {$EXTERNALSYM _DMUS_WAVE_PMSG}
- DMUS_WAVE_PMSG = _DMUS_WAVE_PMSG;
- {$EXTERNALSYM DMUS_WAVE_PMSG}
- TDMusWavePMsg = _DMUS_WAVE_PMSG;
- (* DMUS_LYRIC_PMSG *)
- PDMusLyricPMsg = ^TDMusLyricPMsg;
- _DMUS_LYRIC_PMSG = packed record
- (* begin DMUS_PMSG_PART *)
- dwSize: DWORD;
- rtTime: TReferenceTime; (* real time (in 100 nanosecond increments) *)
- mtTime: TMusicTime; (* music time *)
- dwFlags: DWORD; (* various bits (see DMUS_PMSGF_FLAGS enumeration) *)
- dwPChannel: DWORD; (* Performance Channel. The Performance can *)
- (* use this to determine the port/channel. *)
- dwVirtualTrackID: DWORD; (* virtual track ID *)
- pTool: IDirectMusicTool; (* tool interface pointer *)
- pGraph: IDirectMusicGraph; (* tool graph interface pointer *)
- dwType: DWORD; (* PMSG type (see DMUS_PMSGT_TYPES defines) *)
- dwVoiceID: DWORD; (* unique voice id which allows synthesizers to *)
- (* identify a specific event. For DirectX 6.0, *)
- (* this field should always be 0. *)
- dwGroupID: DWORD; (* Track group id *)
- punkUser: IUnknown; (* user com pointer, auto released upon PMSG free *)
- (* end DMUS_PMSG_PART *)
- wszString: array[0..0] of WideChar; (* null-terminated Unicode lyric string (structure is actually larger than size 1) *)
- end;
- {$EXTERNALSYM _DMUS_LYRIC_PMSG}
- DMUS_LYRIC_PMSG = _DMUS_LYRIC_PMSG;
- {$EXTERNALSYM DMUS_LYRIC_PMSG}
- TDMusLyricPMsg = _DMUS_LYRIC_PMSG;
- (*)///////////////////////////////////////////////////////////////////
- // IDirectMusicBand *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicBand);'}
- {$EXTERNALSYM IDirectMusicBand}
- IDirectMusicBand = interface(IUnknown)
- ['{d2ac28c0-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicBand *)
- function CreateSegment(out ppSegment: IDirectMusicSegment): HResult; stdcall;
- function Download(pPerformance: IDirectMusicPerformance): HResult; stdcall;
- function Unload(pPerformance: IDirectMusicPerformance): HResult; stdcall;
- end;
- IDirectMusicBand8 = IDirectMusicBand;
- {$NODEFINE IDirectMusicBand8}
- {$HPPEMIT 'typedef _di_IDirectMusicBand _di_IDirectMusicBand8;'}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicObject *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicObject);'}
- {$EXTERNALSYM IDirectMusicObject}
- IDirectMusicObject = interface(IUnknown)
- ['{d2ac28b5-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicObject *)
- function GetDescriptor(out pDesc: TDMusObjectDesc): HResult; stdcall;
- function SetDescriptor(const pDesc: TDMusObjectDesc): HResult; stdcall;
- function ParseDescriptor(var pStream; out pDesc: TDMusObjectDesc): HResult; stdcall;
- end;
- IDirectMusicObject8 = IDirectMusicObject;
- {$NODEFINE IDirectMusicObject8}
- {$HPPEMIT 'typedef _di_IDirectMusicObject _di_IDirectMusicObject8;'}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicLoader *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicLoader);'}
- {$EXTERNALSYM IDirectMusicLoader}
- IDirectMusicLoader = interface(IUnknown)
- ['{2ffaaca2-5dca-11d2-afa6-00aa0024d8b6}']
- (* IDirectMusicLoader *)
- function GetObject(const pDesc: TDMusObjectDesc; const riid : TGUID;
- out ppv): HResult; stdcall;
- function SetObject(const pDesc: TDMusObjectDesc): HResult; stdcall;
- function SetSearchDirectory(const rguidClass: TGUID; pwzPath: PWideChar;
- fClear: BOOL): HResult; stdcall;
- function ScanDirectory(const rguidClass: TGUID; pwzFileExtension,
- pwzScanFileName: PWideChar): HResult; stdcall;
- function CacheObject(pObject: IDirectMusicObject): HResult; stdcall;
- function ReleaseObject(pObject: IDirectMusicObject): HResult; stdcall;
- function ClearCache(const rguidClass: TGUID): HResult; stdcall;
- function EnableCache(const rguidClass: TGUID; fEnable: BOOL): HResult; stdcall;
- function EnumObject(const rguidClass: TGUID; dwIndex: DWORD;
- const pDesc: TDMusObjectDesc): HResult; stdcall;
- end;
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicLoader8 *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicLoader8);'}
- {$EXTERNALSYM IDirectMusicLoader8}
- IDirectMusicLoader8 = interface(IDirectMusicLoader)
- ['{19e7c08c-0a44-4e6a-a116-595a7cd5de8c}']
- (* IDirectMusicLoader8 *)
- function CollectGarbage: HResult; stdcall;
- function ReleaseObjectByUnknown(pObject: IUnknown): HResult; stdcall;
- function LoadObjectFromFile(const rguidClassID: TGUID; const iidInterfaceID: TGUID;
- pwzFilePath: PWideChar; out ppObject): HResult; stdcall;
- end;
- (* Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicGetLoader);'}
- {$EXTERNALSYM IDirectMusicGetLoader}
- IDirectMusicGetLoader = interface(IUnknown)
- ['{68a04844-d13d-11d1-afa6-00aa0024d8b6}']
- (* IDirectMusicGetLoader *)
- function GetLoader(out ppLoader: IDirectMusicLoader): HResult; stdcall;
- end;
- IDirectMusicGetLoader8 = IDirectMusicGetLoader;
- {$NODEFINE IDirectMusicGetLoader8}
- {$HPPEMIT 'typedef _di_IDirectMusicGetLoader _di_IDirectMusicGetLoader8;'}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicSegment *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicSegment);'}
- {$EXTERNALSYM IDirectMusicSegment}
- IDirectMusicSegment = interface(IUnknown)
- ['{f96029a2-4282-11d2-8717-00600893b1bd}']
- (* IDirectMusicSegment *)
- function GetLength(out pmtLength: TMusicTime): HResult; stdcall;
- function SetLength(mtLength: TMusicTime): HResult; stdcall;
- function GetRepeats(out pdwRepeats: DWORD): HResult; stdcall;
- function SetRepeats(dwRepeats: DWORD): HResult; stdcall;
- function GetDefaultResolution(out pdwResolution: DWORD): HResult; stdcall;
- function SetDefaultResolution(dwResolution: DWORD): HResult; stdcall;
- function GetTrack(const rguidType: TGUID; dwGroupBits, dwIndex: DWORD;
- out ppTrack: IDirectMusicTrack): HResult; stdcall;
- function GetTrackGroup(pTrack: IDirectMusicTrack; out pdwGroupBits: DWORD): HResult; stdcall;
- function InsertTrack(pTrack: IDirectMusicTrack; dwGroupBits: DWORD): HResult; stdcall;
- function RemoveTrack(pTrack: IDirectMusicTrack): HResult; stdcall;
- function InitPlay(out ppSegState: IDirectMusicSegmentState;
- pPerformance: IDirectMusicPerformance; dwFlags: DWORD): HResult; stdcall;
- function GetGraph(out ppGraph: IDirectMusicGraph): HResult; stdcall;
- function SetGraph(pGraph: IDirectMusicGraph): HResult; stdcall;
- function AddNotificationType(const rguidNotificationType: TGUID): HResult; stdcall;
- function RemoveNotificationType(const rguidNotificationType: TGUID): HResult; stdcall;
- function GetParam(const rguidType: TGUID; dwGroupBits, dwIndex: DWORD;
- mtTime: TMusicTime; out pmtNext: TMusicTime; pParam: Pointer): HResult; stdcall;
- function SetParam(const rguidType: TGUID; dwGroupBits, dwIndex: DWORD;
- mtTime: TMusicTime; pParam: Pointer): HResult; stdcall;
- function Clone(mtStart: TMusicTime; mtEnd: TMusicTime;
- out ppSegment: IDirectMusicSegment): HResult; stdcall;
- function SetStartPoint(mtStart: TMusicTime): HResult; stdcall;
- function GetStartPoint(out pmtStart: TMusicTime): HResult; stdcall;
- function SetLoopPoints(mtStart: TMusicTime; mtEnd: TMusicTime): HResult; stdcall;
- function GetLoopPoints(out pmtStart, pmtEnd: TMusicTime): HResult; stdcall;
- function SetPChannelsUsed(dwNumPChannels: DWORD; var paPChannels: DWORD): HResult; stdcall;
- end;
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicSegment8 *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicSegment8);'}
- {$EXTERNALSYM IDirectMusicSegment8}
- IDirectMusicSegment8 = interface(IDirectMusicSegment)
- ['{c6784488-41a3-418f-aa15-b35093ba42d4}']
- (* IDirectMusicSegment8 *)
- function SetTrackConfig(const rguidTrackClassID: TGUID;
- dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff: DWORD): HResult; stdcall;
- function GetAudioPathConfig(out ppAudioPathConfig: IUnknown): HResult; stdcall;
- function Compose(mtTime: TMusicTime; pFromSegment, pToSegment: IDirectMusicSegment;
- out ppComposedSegment: IDirectMusicSegment): HResult; stdcall;
- function Download(pAudioPath: IUnknown): HResult; stdcall;
- function Unload(pAudioPath: IUnknown): HResult; stdcall;
- end;
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicSegmentState *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicSegmentState);'}
- {$EXTERNALSYM IDirectMusicSegmentState}
- IDirectMusicSegmentState = interface(IUnknown)
- ['{a3afdcc7-d3ee-11d1-bc8d-00a0c922e6eb}']
- (* IDirectMusicSegmentState *)
- function GetRepeats(out pdwRepeats: DWORD): HResult; stdcall;
- function GetSegment(out ppSegment: IDirectMusicSegment): HResult; stdcall;
- function GetStartTime(out pmtStart: TMusicTime): HResult; stdcall;
- function GetSeek(out pmtSeek: TMusicTime): HResult; stdcall;
- function GetStartPoint(out pmtStart: TMusicTime): HResult; stdcall;
- end;
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicSegmentState8 *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicSegmentState8);'}
- {$EXTERNALSYM IDirectMusicSegmentState8}
- IDirectMusicSegmentState8 = interface(IDirectMusicSegmentState)
- ['{a50e4730-0ae4-48a7-9839-bc04bfe07772}']
- (* IDirectMusicSegmentState8 *)
- function SetTrackConfig(
- const rguidTrackClassID: TGUID; // Class ID of the type of track on which to set the configuration flags.
- dwGroupBits, // Group bits.
- dwIndex, // Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id.
- dwFlagsOn, // DMUS_TRACKCONFIG_ flags to enable.
- dwFlagsOff: DWORD): HResult; stdcall; // DMUS_TRACKCONFIG_ flags to disable.
- function GetObjectInPath(
- dwPChannel, // PChannel to search.
- dwStage, // Which stage in the path.
- dwBuffer: DWORD; // Which buffer to address, if more than one.
- const guidObject: TGUID; // ClassID of object.
- dwIndex: DWORD; // Which object of that class.
- const iidInterface: TGUID; // Requested COM interface.
- out ppObject): HResult; stdcall; // Pointer to interface.
- end;
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicAudioPath *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicAudioPath);'}
- {$EXTERNALSYM IDirectMusicAudioPath}
- IDirectMusicAudioPath = interface(IUnknown)
- ['{c87631f5-23be-4986-8836-05832fcc48f9}']
- (* IDirectMusicAudioPath *)
- function GetObjectInPath(
- dwPChannel, // PChannel to search.
- dwStage, // Which stage in the path.
- dwBuffer: DWORD; // Which buffer to address, if more than one.
- const guidObject: TGUID; // ClassID of object.
- dwIndex: DWORD; // Which object of that class.
- const iidInterface: TGUID; // Requested COM interface.
- out ppObject): HResult; stdcall; // Pointer to interface.
- function Activate(fActivate: BOOL): HResult; stdcall; // True to activate, False to deactivate.
- function SetVolume(lVolume: Longint; // Gain, in 100ths of a dB. This must be negative (0 represents full volume.)
- dwDuration: DWORD): HResult; stdcall; // Duration of volume ramp in milliseconds. Note that 0 is more efficient.
- function ConvertPChannel (dwPChannelIn: DWORD; // Pchannel of source.
- var pdwPChannelOut: DWORD): HResult; stdcall; // Equivalent pchannel on performance.
- end;
- IDirectMusicAudioPath8 = IDirectMusicAudioPath;
- {$NODEFINE IDirectMusicAudioPath8}
- {$HPPEMIT 'typedef _di_IDirectMusicAudioPath _di_IDirectMusicAudioPath8;'}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicPerformance *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicPerformance);'}
- {$EXTERNALSYM IDirectMusicPerformance}
- IDirectMusicPerformance = interface(IUnknown)
- ['{07d43d03-6523-11d2-871d-00600893b1bd}']
- (* IDirectMusicPerformance *)
- function Init(var ppDirectMusic: IDirectMusic;
- pDirectSound: IDirectSound; hWnd: HWND): HResult; stdcall;
- function PlaySegment(pSegment: IDirectMusicSegment; dwFlags: DWORD;
- i64StartTime: LongLong; ppSegmentState: PIDirectMusicSegmentState): HResult; stdcall;
- function Stop(pSegment: IDirectMusicSegment; pSegmentState: IDirectMusicSegmentState;
- mtTime: TMusicTime; dwFlags: DWORD): HResult; stdcall;
- function GetSegmentState(out ppSegmentState: IDirectMusicSegmentState;
- mtTime: TMusicTime): HResult; stdcall;
- function SetPrepareTime(dwMilliSeconds: DWORD): HResult; stdcall;
- function GetPrepareTime(out pdwMilliSeconds: DWORD): HResult; stdcall;
- function SetBumperLength(dwMilliSeconds: DWORD): HResult; stdcall;
- function GetBumperLength(out pdwMilliSeconds: DWORD): HResult; stdcall;
- function SendPMsg(pPMSG: PDMusPMsg): HResult; stdcall;
- function MusicToReferenceTime(mtTime: TMusicTime; out prtTime: TReferenceTime): HResult; stdcall;
- function ReferenceToMusicTime(rtTime: TReferenceTime; out pmtTime: TMusicTime): HResult; stdcall;
- function IsPlaying(pSegment: IDirectMusicSegment; pSegState: IDirectMusicSegmentState): HResult; stdcall;
- function GetTime(prtNow: PReference_Time; pmtNow: PMusicTime): HResult; stdcall;
- function AllocPMsg(cb: ULONG; out ppPMSG: PDMusPMsg): HResult; stdcall;
- function FreePMsg(pPMSG: PDMusPMsg): HResult; stdcall;
- function GetGraph(out ppGraph: IDirectMusicGraph): HResult; stdcall;
- function SetGraph(pGraph: IDirectMusicGraph): HResult; stdcall;
- function SetNotificationHandle(hNotification: THANDLE; rtMinimum: TReferenceTime): HResult; stdcall;
- function GetNotificationPMsg(out ppNotificationPMsg: PDMusNotificationPMsg): HResult; stdcall;
- function AddNotificationType(const rguidNotificationType: TGUID): HResult; stdcall;
- function RemoveNotificationType(const rguidNotificationType: TGUID): HResult; stdcall;
- function AddPort(pPort: IDirectMusicPort): HResult; stdcall;
- function RemovePort(pPort: IDirectMusicPort): HResult; stdcall;
- function AssignPChannelBlock(dwBlockNum: DWORD; pPort: IDirectMusicPort;
- dwGroup: DWORD): HResult; stdcall;
- function AssignPChannel(dwPChannel: DWORD; pPort: IDirectMusicPort;
- dwGroup, dwMChannel: DWORD): HResult; stdcall;
- function PChannelInfo(dwPChannel: DWORD; out ppPort: IDirectMusicPort;
- out pdwGroup, pdwMChannel: DWORD ): HResult; stdcall;
- function DownloadInstrument(pInst: IDirectMusicInstrument; dwPChannel: DWORD;
- out ppDownInst: IDirectMusicDownloadedInstrument; var pNoteRanges: TDMusNoteRange;
- dwNumNoteRanges: DWORD; out ppPort: IDirectMusicPort;
- out pdwGroup, pdwMChannel: DWORD): HResult; stdcall;
- function Invalidate(mtTime: TMusicTime; dwFlags: DWORD): HResult; stdcall;
- function GetParam(const rguidType: TGUID; dwGroupBits, dwIndex: DWORD;
- mtTime: TMusicTime; out pmtNext: TMusicTime; pParam: Pointer): HResult; stdcall;
- function SetParam(const rguidType: TGUID; dwGroupBits, dwIndex: DWORD;
- mtTime: TMusicTime; pParam: Pointer): HResult; stdcall;
- function GetGlobalParam(const rguidType: TGUID; pParam: Pointer;
- dwSize: DWORD): HResult; stdcall;
- function SetGlobalParam(const rguidType: TGUID; pParam: Pointer;
- dwSize: DWORD): HResult; stdcall;
- function GetLatencyTime(out prtTime: TReferenceTime): HResult; stdcall;
- function GetQueueTime(out prtTime: TReferenceTime): HResult; stdcall;
- function AdjustTime(rtAmount: TReferenceTime): HResult; stdcall;
- function CloseDown : HResult; stdcall;
- function GetResolvedTime(rtTime: TReferenceTime; out prtResolved: TReferenceTime;
- dwTimeResolveFlags: DWORD): HResult; stdcall;
- function MIDIToMusic(bMIDIValue: Byte; const pChord: TDMusChordKey;
- bPlayMode, bChordLevel: Byte; out pwMusicValue: Word): HResult; stdcall;
- function MusicToMIDI(wMusicValue: Word; const pChord: TDMusChordKey;
- bPlayMode, bChordLevel: Byte; out pbMIDIValue: Byte): HResult; stdcall;
- function TimeToRhythm(mtTime: TMusicTime; const pTimeSig: TDMusTimeSignature;
- out pwMeasure: Word; out pbBeat, pbGrid: Byte;
- out pnOffset: SmallInt): HResult; stdcall;
- function RhythmToTime(wMeasure: Word; bBeat, bGrid: Byte; nOffset: Smallint;
- const pTimeSig: TDMusTimeSignature; out pmtTime: TMusicTime): HResult; stdcall;
- end;
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicPerformance8 *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicPerformance8);'}
- {$EXTERNALSYM IDirectMusicPerformance8}
- IDirectMusicPerformance8 = interface(IDirectMusicPerformance)
- ['{679c4137-c62e-4147-b2b4-9d569acb254c}']
- (* IDirectMusicPerformance8 *)
- function InitAudio(
- ppDirectMusic: PIDirectMusic; // Optional DMusic pointer.
- ppDirectSound: PIDirectSound; // Optional DSound pointer.
- hWnd: hWnd; // HWND for DSound.
- dwDefaultPathType, // Requested default audio path type, also optional.
- dwPChannelCount, // Number of PChannels, if default audio path to be created.
- dwFlags: DWORD; // DMUS_AUDIOF flags, if no pParams structure.
- pParams: PDMUSAudioParams): HResult; stdcall; // Optional initialization structure, defining required voices, buffers, etc.
- function PlaySegmentEx(
- pSource: IUnknown; // Segment to play.
- pwzSegmentName: PWideChar; // Not supported in DX8.
- pTransition: IUnknown; // Optional template segment to compose transition with.
- dwFlags: DWORD; // DMUS_SEGF_ flags.
- i64StartTime: Int64; // Time to start playback.
- out ppSegmentState: IDirectMusicSegmentState; // Returned Segment State.
- pFrom, // Optional segmentstate or audiopath to replace.
- pAudioPath: IUnknown): HResult; stdcall; // Optional audioPath to play on.
- function StopEx(pObjectToStop: IUnknown; // Segstate, AudioPath, or Segment.
- i64StopTime: int64; dwFlags: DWORD): HResult; stdcall;
- function ClonePMsg(pSourcePMSG: TDMusPMsg;
- var ppCopyPMSG: TDMusPMsg): HResult; stdcall;
- function CreateAudioPath(
- pSourceConfig: IUnknown; // Source configuration, from AudioPathConfig file.
- fActivate: BOOL; // TRUE to activate on creation.
- out ppNewPath: IDirectMusicAudioPath): HResult; stdcall; // Returns created audiopath.
- function CreateStandardAudioPath(
- dwType, // Type of path to create.
- dwPChannelCount: DWORD; // How many PChannels to allocate for it.
- fActivate: BOOL; // TRUE to activate on creation.
- out ppNewPath: IDirectMusicAudioPath): HResult; stdcall; // Returns created audiopath.
- function SetDefaultAudioPath(pAudioPath: IDirectMusicAudioPath): HResult; stdcall;
- function GetDefaultAudioPath(out ppAudioPath: IDirectMusicAudioPath): HResult; stdcall;
- function GetParamEx(
- const rguidType: TGUID; // GetParam command ID.
- dwTrackID, // Virtual track ID of caller.
- dwGroupBits, // Group bits of caller.
- dwIndex: DWORD; // Index to Nth parameter.
- mtTime, // Time of requested parameter.
- pmtNext: TMusicTime; // Returned delta to next parameter.
- pParam: Pointer): HResult; stdcall; // Data structure to fill with parameter.
- end;
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicGraph *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicGraph);'}
- {$EXTERNALSYM IDirectMusicGraph}
- IDirectMusicGraph = interface(IUnknown)
- ['{2befc277-5497-11d2-bccb-00a0c922e6eb}']
- (* IDirectMusicGraph *)
- function StampPMsg(var pPMSG: TDMusPMsg): HResult; stdcall;
- function InsertTool(pTool: IDirectMusicTool; var pdwPChannels: DWORD;
- cPChannels: DWORD; lIndex: LongInt): HResult; stdcall;
- function GetTool(dwIndex: DWORD; out ppTool: IDirectMusicTool): HResult; stdcall;
- function RemoveTool(pTool: IDirectMusicTool): HResult; stdcall;
- end;
- IDirectMusicGraph8 = IDirectMusicGraph;
- {$NODEFINE IDirectMusicGraph8}
- {$HPPEMIT 'typedef _di_IDirectMusicGraph _di_IDirectMusicGraph8;'}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicTool *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicTool);'}
- {$EXTERNALSYM IDirectMusicTool}
- IDirectMusicTool = interface(IUnknown)
- ['{d2ac28ba-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicTool *)
- function Init(pGraph: IDirectMusicGraph): HResult; stdcall;
- function GetMsgDeliveryType(out pdwDeliveryType: DWORD): HResult; stdcall;
- function GetMediaTypeArraySize(out pdwNumElements: DWORD): HResult; stdcall;
- function GetMediaTypes(out padwMediaTypes: PDWORD; dwNumElements: DWORD): HResult; stdcall;
- function ProcessPMsg(pPerf: IDirectMusicPerformance; pPMSG: PDMusPMsg): HResult; stdcall;
- function Flush(pPerf: IDirectMusicPerformance; const pPMSG: TDMusPMsg;
- rtTime: TReferenceTime): HResult; stdcall;
- end;
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicStyle *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicStyle);'}
- {$EXTERNALSYM IDirectMusicStyle}
- IDirectMusicStyle = interface(IUnknown)
- ['{d2ac28bd-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicStyle *)
- function GetBand(pwszName: PWideChar; out ppBand: IDirectMusicBand): HResult; stdcall;
- function EnumBand(dwIndex: DWORD; pwszName: PWideChar): HResult; stdcall;
- function GetDefaultBand(out ppBand: IDirectMusicBand): HResult; stdcall;
- function EnumMotif(dwIndex: DWORD; pwszName: PWideChar): HResult; stdcall;
- function GetMotif(pwszName: PWideChar; out ppSegment: IDirectMusicSegment): HResult; stdcall;
- function GetDefaultChordMap(out ppChordMap: IDirectMusicChordMap): HResult; stdcall;
- function EnumChordMap(dwIndex: DWORD; pwszName: PWideChar): HResult; stdcall;
- function GetChordMap(pwszName: PWideChar; out ppChordMap: IDirectMusicChordMap): HResult; stdcall;
- function GetTimeSignature(out pTimeSig: TDMusTimeSignature): HResult; stdcall;
- function GetEmbellishmentLength(dwType, dwLevel: DWORD; out pdwMin, pdwMax: DWORD): HResult; stdcall;
- function GetTempo(out pTempo: Double): HResult; stdcall;
- end;
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicStyle8 *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicStyle8);'}
- {$EXTERNALSYM IDirectMusicStyle8}
- IDirectMusicStyle8 = interface(IDirectMusicStyle)
- ['{fd24ad8a-a260-453d-bf50-6f9384f70985}']
- (* IDirectMusicStyle8 *)
- function EnumPattern(dwIndex, dwPatternType: DWORD; pwszName: PWideChar): HResult; stdcall;
- end;
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicChordMap *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicChordMap);'}
- {$EXTERNALSYM IDirectMusicChordMap}
- IDirectMusicChordMap = interface(IUnknown)
- ['{d2ac28be-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicChordMap *)
- function GetScale(out pdwScale: DWORD): HResult; stdcall;
- end;
- IDirectMusicChordMap8 = IDirectMusicChordMap;
- {$NODEFINE IDirectMusicChordMap8}
- {$HPPEMIT 'typedef _di_IDirectMusicChordMap _di_IDirectMusicChordMap8;'}
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicComposer *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicComposer);'}
- {$EXTERNALSYM IDirectMusicComposer}
- IDirectMusicComposer = interface(IUnknown)
- ['{d2ac28bf-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicComposer *)
- function ComposeSegmentFromTemplate(pStyle: IDirectMusicStyle;
- pTempSeg: IDirectMusicSegment; wActivity: Word;
- pChordMap: IDirectMusicChordMap; out ppSectionSeg: IDirectMusicSegment): HResult; stdcall;
- function ComposeSegmentFromShape(pStyle: IDirectMusicStyle; wNumMeasures,
- wShape, wActivity: Word; fIntro: BOOL; fEnd: BOOL;
- pChordMap: IDirectMusicChordMap; out ppSectionSeg: IDirectMusicSegment): HResult; stdcall;
- function ComposeTransition(pFromSeg: IDirectMusicSegment; pToSeg: IDirectMusicSegment;
- mtTime: TMusicTime; wCommand: Word; dwFlags: DWORD; pChordMap: IDirectMusicChordMap;
- out ppSectionSeg: IDirectMusicSegment): HResult; stdcall;
- function AutoTransition(pPerformance: IDirectMusicPerformance;
- pToSeg: IDirectMusicSegment; wCommand: Word; dwFlags: DWORD;
- pChordMap: IDirectMusicChordMap; out ppTransSeg: IDirectMusicSegment;
- out ppToSegState: IDirectMusicSegmentState; out ppTransSegState: IDirectMusicSegmentState): HResult; stdcall;
- function ComposeTemplateFromShape(wNumMeasures: Word; wShape: Word; fIntro: BOOL;
- fEnd: BOOL; wEndLength: Word; out ppTempSeg:IDirectMusicSegment): HResult; stdcall;
- function ChangeChordMap(pSectionSeg: IDirectMusicSegment;
- fTrackScale: BOOL; pChordMap: IDirectMusicChordMap): HResult; stdcall;
- end;
- IDirectMusicComposer8 = IDirectMusicComposer;
- {$NODEFINE IDirectMusicComposer8}
- {$HPPEMIT 'typedef _di_IDirectMusicComposer _di_IDirectMusicComposer8;'}
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicPatternTrack *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicPatternTrack);'}
- {$EXTERNALSYM IDirectMusicPatternTrack}
- IDirectMusicPatternTrack = interface(IUnknown)
- ['{51c22e10-b49f-46fc-bec2-e6288fb9ede6}']
- (* IDirectMusicPatternTrack *)
- function CreateSegment(pStyle: IDirectMusicStyle;
- out ppSegment: IDirectMusicSegment): HResult; stdcall;
- function SetVariation(pSegState: IDirectMusicSegmentState;
- dwVariationFlags, dwPart: DWORD): HResult; stdcall;
- function SetPatternByName(pSegState: IDirectMusicSegmentState;
- wszName: PWideChar; pStyle: IDirectMusicStyle; dwPatternType: DWORD;
- var pdwLength: DWORD): HResult; stdcall;
- end;
- IDirectMusicPatternTrack8 = IDirectMusicPatternTrack;
- {$NODEFINE IDirectMusicPatternTrack8}
- {$HPPEMIT 'typedef _di_IDirectMusicPatternTrack _di_IDirectMusicPatternTrack8;'}
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicScript *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicScript);'}
- {$EXTERNALSYM IDirectMusicScript}
- IDirectMusicScript = interface(IUnknown)
- ['{2252373a-5814-489b-8209-31fedebaf137}']
- (* IDirectMusicScript *)
- function Init(pPerformance: IDirectMusicPerformance;
- pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function CallRoutine(pwszRoutineName: PWideChar;
- pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function SetVariableVariant(pwszVariableName: PWideChar; varValue: Variant;
- fSetRef: BOOL; pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function GetVariableVariant(pwszVariableName: PWideChar; var pvarValue: Variant;
- pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function SetVariableNumber(pwszVariableName: PWideChar; lValue: Longint;
- pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function GetVariableNumber(pwszVariableName: PWideChar; var plValue: Longint;
- pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function SetVariableObject(pwszVariableName: PWideChar; punkValue: IUnknown;
- pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function GetVariableObject(pwszVariableName: PWideChar; const riid: TGUID;
- out ppv; pErrorInfo: PDMusScriptErrorInfo): HResult; stdcall;
- function EnumRoutine(dwIndex: DWORD; pwszName: PWideChar): HResult; stdcall;
- function EnumVariable(dwIndex: DWORD; pwszName: PWideChar): HResult; stdcall;
- end;
- IDirectMusicScript8 = IDirectMusicScript;
- {$NODEFINE IDirectMusicScript8}
- {$HPPEMIT 'typedef _di_IDirectMusicScript _di_IDirectMusicScript8;'}
- (*/////////////////////////////////////////////////////////////////////
- // IDirectMusicContainer *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicContainer);'}
- {$EXTERNALSYM IDirectMusicContainer}
- IDirectMusicContainer = interface(IUnknown)
- ['{9301e386-1f22-11d3-8226-d2fa76255d47}']
- (* IDirectMusicContainer *)
- function EnumObject(const rguidClass: TGUID; dwIndex: DWORD;
- pDesc: PDMusObjectDesc; pwszAlias: PWideChar): HResult; stdcall;
- end;
- IDirectMusicContainer8 = IDirectMusicContainer;
- {$NODEFINE IDirectMusicContainer8}
- {$HPPEMIT 'typedef _di_IDirectMusicContainer _di_IDirectMusicContainer8;'}
- (*////////////////////////////////////////////////////////////////////
- // IDirectMusicTrack *)
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicTrack);'}
- {$EXTERNALSYM IDirectMusicTrack}
- IDirectMusicTrack = interface(IUnknown)
- ['{f96029a1-4282-11d2-8717-00600893b1bd}']
- (* IDirectMusicTrack *)
- function Init(pSegment: IDirectMusicSegment): HResult; stdcall;
- function InitPlay(pSegmentState: IDirectMusicSegmentState;
- pPerformance: IDirectMusicPerformance; out ppStateData: Pointer;
- dwVirtualTrackID, dwFlags: DWORD): HResult; stdcall;
- function EndPlay(pStateData: Pointer): HResult; stdcall;
- function Play(pStateData: Pointer; mtStart, mtEnd, mtOffset: TMusicTime;
- dwFlags: DWORD; pPerf: IDirectMusicPerformance;
- pSegSt: IDirectMusicSegmentState; dwVirtualID: DWORD): HResult; stdcall;
- function GetParam (const rguidType: TGUID; mtTime: TMusicTime; out pmtNext: TMusicTime;
- pParam: Pointer): HResult; stdcall;
- function SetParam(const rguidType: TGUID; mtTime: TMusicTime; pParam: Pointer): HResult; stdcall;
- function IsParamSupported(const rguidType: TGUID): HResult; stdcall;
- function AddNotificationType(const rguidNotificationType: TGUID): HResult; stdcall;
- function RemoveNotificationType(const rguidNotificationType: TGUID): HResult; stdcall;
- function Clone(mtStart: TMusicTime; mtEnd: TMusicTime; out ppTrack: IDirectMusicTrack): HResult; stdcall;
- end;
- const
- (* CLSID's *)
- CLSID_DirectMusicPerformance: TGUID = '{d2ac2881-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicPerformance}
- CLSID_DirectMusicSegment: TGUID = '{d2ac2882-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicSegment}
- CLSID_DirectMusicSegmentState: TGUID = '{d2ac2883-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicSegmentState}
- CLSID_DirectMusicGraph: TGUID = '{d2ac2884-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicGraph}
- CLSID_DirectMusicStyle: TGUID = '{d2ac288a-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicStyle}
- CLSID_DirectMusicChordMap: TGUID = '{d2ac288f-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicChordMap}
- CLSID_DirectMusicComposer: TGUID = '{d2ac2890-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicComposer}
- CLSID_DirectMusicLoader: TGUID = '{d2ac2892-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicLoader}
- CLSID_DirectMusicBand: TGUID = '{79ba9e00-b6ee-11d1-86be-00c04fbf8fef}';
- {$EXTERNALSYM CLSID_DirectMusicBand}
- (* New CLSID's for DX8 *)
- CLSID_DirectMusicPatternTrack: TGUID = '{d2ac2897-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM CLSID_DirectMusicPatternTrack}
- CLSID_DirectMusicScript: TGUID = '{810b5013-e88d-11d2-8bc1-00600893b1b6}'; (* {810B5013-E88D-11d2-8BC1-00600893B1B6} *)
- {$EXTERNALSYM CLSID_DirectMusicScript}
- CLSID_DirectMusicContainer: TGUID = '{9301e380-1f22-11d3-8226-d2fa76255d47}';
- {$EXTERNALSYM CLSID_DirectMusicContainer}
- CLSID_DirectSoundWave: TGUID = '{8a667154-f9cb-11d2-ad8a-0060b0575abc}';
- {$EXTERNALSYM CLSID_DirectSoundWave}
- CLSID_DirectMusicAudioPathConfig: TGUID = '{ee0b9ca0-a81e-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM CLSID_DirectMusicAudioPathConfig}
- (* Special GUID for all object types. This is used by the loader. *)
- GUID_DirectMusicAllTypes: TGUID = '{d2ac2893-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_DirectMusicAllTypes}
- (* Notification guids *)
- GUID_NOTIFICATION_SEGMENT: TGUID = '{d2ac2899-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_NOTIFICATION_SEGMENT}
- GUID_NOTIFICATION_PERFORMANCE: TGUID = '{81f75bc5-4e5d-11d2-bcc7-00a0c922e6eb}';
- {$EXTERNALSYM GUID_NOTIFICATION_PERFORMANCE}
- GUID_NOTIFICATION_MEASUREANDBEAT: TGUID = '{d2ac289a-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_NOTIFICATION_MEASUREANDBEAT}
- GUID_NOTIFICATION_CHORD: TGUID = '{d2ac289b-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_NOTIFICATION_CHORD}
- GUID_NOTIFICATION_COMMAND: TGUID = '{d2ac289c-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_NOTIFICATION_COMMAND}
- GUID_NOTIFICATION_RECOMPOSE: TGUID = '{d348372b-945b-45ae-a522-450f125b84a5}';
- {$EXTERNALSYM GUID_NOTIFICATION_RECOMPOSE}
- (* Track param type guids *)
- (* Use to get/set a DMUS_COMMAND_PARAM param in the Command track *)
- GUID_CommandParam: TGUID = '{d2ac289d-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_CommandParam}
- (* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track *)
- GUID_CommandParam2: TGUID = '{28f97ef7-9538-11d2-97a9-00c04fa36e58}';
- {$EXTERNALSYM GUID_CommandParam2}
- (* Use to get/set a DMUS_COMMAND_PARAM_2 param to be used as the command following all commands in
- the Command track (this information can't be saved) *)
- GUID_CommandParamNext: TGUID = '{472afe7a-281b-11d3-817d-00c04fa36e58}';
- {$EXTERNALSYM GUID_CommandParamNext}
- (* Use to get/set a DMUS_CHORD_PARAM param in the Chord track *)
- GUID_ChordParam: TGUID = '{d2ac289e-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_ChordParam}
- (* Use to get a DMUS_RHYTHM_PARAM param in the Chord track *)
- GUID_RhythmParam: TGUID = '{d2ac289f-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_RhythmParam}
- (* Use to get/set an IDirectMusicStyle param in the Style track *)
- GUID_IDirectMusicStyle: TGUID = '{d2ac28a1-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_IDirectMusicStyle}
- (* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks *)
- GUID_TimeSignature: TGUID = '{d2ac28a4-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_TimeSignature}
- (* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track *)
- GUID_TempoParam: TGUID = '{d2ac28a5-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_TempoParam}
- (* Use to get the next valid point in a segment at which it may start *)
- GUID_Valid_Start_Time: TGUID = '{7f6b1760-1fdb-11d3-8226-444553540000}';
- {$EXTERNALSYM GUID_Valid_Start_Time}
- (* Use to get the next point in the currently playing primary segment at which a new segment may start *)
- GUID_Play_Marker: TGUID = '{d8761a41-801a-11d3-9bd1-daf7e1c3d834}';
- {$EXTERNALSYM GUID_Play_Marker}
- (* Use to get (GetParam) or add (SetParam) bands in the Band track *)
- GUID_BandParam: TGUID = '{02bb1938-cb8b-11d2-8bb9-00600893b1b6}';
- {$EXTERNALSYM GUID_BandParam}
- type
- _DMUS_BAND_PARAM = packed record
- mtTimePhysical: MUSIC_TIME; // Note: If this is a clock-time track, then this field is interpreted in the track's internal time format, which is the number of milliseconds after the beginning of playback.
- pBand: IDirectMusicBand;
- end;
- {$EXTERNALSYM _DMUS_BAND_PARAM}
- DMUS_BAND_PARAM = _DMUS_BAND_PARAM;
- {$EXTERNALSYM DMUS_BAND_PARAM}
- TDMusBandParam = _DMUS_BAND_PARAM;
- PDMusBandParam = ^TDMusBandParam;
- const
- (* Obsolete -- doesn't distinguish physical and logical time. Use GUID_BandParam instead. *)
- GUID_IDirectMusicBand: TGUID = '{d2ac28ac-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_IDirectMusicBand}
- (* Use to get/set an IDirectMusicChordMap param in the ChordMap track *)
- GUID_IDirectMusicChordMap: TGUID = '{d2ac28ad-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_IDirectMusicChordMap}
- (* Use to get/set a DMUS_MUTE_PARAM param in the Mute track *)
- GUID_MuteParam: TGUID = '{d2ac28af-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_MuteParam}
- (* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
- Some of these guids (where noted) also apply to wave tracks.
- *)
- (* Download bands/waves for the IDirectMusicSegment *)
- GUID_Download: TGUID = '{d2ac28a7-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_Download}
- (* Unload bands/waves for the IDirectMusicSegment *)
- GUID_Unload: TGUID = '{d2ac28a8-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_Unload}
- (* Connect segment's bands to an IDirectMusicCollection *)
- GUID_ConnectToDLSCollection: TGUID = '{1db1ae6b-e92e-11d1-a8c5-00c04fa3726e}';
- {$EXTERNALSYM GUID_ConnectToDLSCollection}
- (* Enable/disable autodownloading of bands/waves *)
- GUID_Enable_Auto_Download: TGUID = '{d2ac28a9-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_Enable_Auto_Download}
- GUID_Disable_Auto_Download: TGUID = '{d2ac28aa-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_Disable_Auto_Download}
- (* Clear all bands *)
- GUID_Clear_All_Bands: TGUID = '{d2ac28ab-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_Clear_All_Bands}
- (* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file *)
- GUID_StandardMIDIFile: TGUID = '{06621075-e92e-11d1-a8c5-00c04fa3726e}';
- {$EXTERNALSYM GUID_StandardMIDIFile}
- (* For compatibility with beta releases... *)
- GUID_IgnoreBankSelectForGM: TGUID = '{06621075-e92e-11d1-a8c5-00c04fa3726e}'; // = GUID_StandardMIDIFile;
- {$EXTERNALSYM GUID_IgnoreBankSelectForGM}
- (* Disable/enable param guids. Use these in SetParam calls to disable or enable sending
- * specific PMsg types.
- *)
- GUID_DisableTimeSig: TGUID = '{45fc707b-1db4-11d2-bcac-00a0c922e6eb}';
- {$EXTERNALSYM GUID_DisableTimeSig}
- GUID_EnableTimeSig: TGUID = '{45fc707c-1db4-11d2-bcac-00a0c922e6eb}';
- {$EXTERNALSYM GUID_EnableTimeSig}
- GUID_DisableTempo: TGUID = '{45fc707d-1db4-11d2-bcac-00a0c922e6eb}';
- {$EXTERNALSYM GUID_DisableTempo}
- GUID_EnableTempo: TGUID = '{45fc707e-1db4-11d2-bcac-00a0c922e6eb}';
- {$EXTERNALSYM GUID_EnableTempo}
- (* Used in SetParam calls for pattern-based tracks. A nonzero value seeds the random number
- generator for variation selection; a value of zero reverts to the default behavior of
- getting the seed from the system clock.
- *)
- GUID_SeedVariations: TGUID = '{65b76fa5-ff37-11d2-814e-00c04fa36e58}';
- {$EXTERNALSYM GUID_SeedVariations}
- (* Used to get the variations currently in effect across PChannels *)
- GUID_Variations: TGUID = '{11f72cce-26e6-4ecd-af2e-d668e66707d8}';
- {$EXTERNALSYM GUID_Variations}
- type
- PDMusVariationsParam = ^TDMusVariationsParam;
- _DMUS_VARIATIONS_PARAM = packed record
- dwPChannelsUsed: DWORD; // number of PChannels in use
- padwPChannels: PDWORD; // array of PChannels in use
- padwVariations: PDWORD; // array of variations in effect for each PChannel
- end;
- {$EXTERNALSYM _DMUS_VARIATIONS_PARAM}
- DMUS_VARIATIONS_PARAM = _DMUS_VARIATIONS_PARAM;
- {$EXTERNALSYM DMUS_VARIATIONS_PARAM}
- TDMusVariationsParam = _DMUS_VARIATIONS_PARAM;
- const
- (* Download bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance *)
- GUID_DownloadToAudioPath: TGUID = '{9f2c0341-c5c4-11d3-9bd1-444553540000}';
- {$EXTERNALSYM GUID_DownloadToAudioPath}
- (* Unload bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance *)
- GUID_UnloadFromAudioPath: TGUID = '{9f2c0342-c5c4-11d3-9bd1-444553540000}';
- {$EXTERNALSYM GUID_UnloadFromAudioPath}
- (* Global data guids *)
- GUID_PerfMasterTempo: TGUID = '{d2ac28b0-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_PerfMasterTempo}
- GUID_PerfMasterVolume: TGUID = '{d2ac28b1-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_PerfMasterVolume}
- GUID_PerfMasterGrooveLevel: TGUID = '{d2ac28b2-b39b-11d1-8704-00600893b1bd}';
- {$EXTERNALSYM GUID_PerfMasterGrooveLevel}
- GUID_PerfAutoDownload: TGUID = '{fb09565b-3631-11d2-bcb8-00a0c922e6eb}';
- {$EXTERNALSYM GUID_PerfAutoDownload}
- (* GUID for default GM/GS dls collection. *)
- GUID_DefaultGMCollection: TGUID = '{f17e8673-c3b4-11d1-870b-00600893b1bd}';
- {$EXTERNALSYM GUID_DefaultGMCollection}
- (* GUID to define default synth, placed in AudioPath configuration file. *)
- GUID_Synth_Default: TGUID = '{26bb9432-45fe-48d3-a375-2472c5e3e786}';
- {$EXTERNALSYM GUID_Synth_Default}
- (* GUIDs to define default buffer configurations to place in AudioPath configuration file. *)
- GUID_Buffer_Reverb: TGUID = '{186cc541-db29-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM GUID_Buffer_Reverb}
- GUID_Buffer_EnvReverb: TGUID = '{186cc542-db29-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM GUID_Buffer_EnvReverb}
- GUID_Buffer_Stereo: TGUID = '{186cc545-db29-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM GUID_Buffer_Stereo}
- GUID_Buffer_3D_Dry: TGUID = '{186cc546-db29-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM GUID_Buffer_3D_Dry}
- GUID_Buffer_Mono: TGUID = '{186cc547-db29-11d3-9bd1-0080c7150a74}';
- {$EXTERNALSYM GUID_Buffer_Mono}
- type
- (* IID's *)
- IID_IDirectMusicLoader = IDirectMusicLoader;
- {$EXTERNALSYM IID_IDirectMusicLoader}
- IID_IDirectMusicGetLoader = IDirectMusicGetLoader;
- {$EXTERNALSYM IID_IDirectMusicGetLoader}
- IID_IDirectMusicObject = IDirectMusicObject;
- {$EXTERNALSYM IID_IDirectMusicObject}
- IID_IDirectMusicSegment = IDirectMusicSegment;
- {$EXTERNALSYM IID_IDirectMusicSegment}
- IID_IDirectMusicSegmentState = IDirectMusicSegmentState;
- {$EXTERNALSYM IID_IDirectMusicSegmentState}
- IID_IDirectMusicPerformance = IDirectMusicPerformance;
- {$EXTERNALSYM IID_IDirectMusicPerformance}
- IID_IDirectMusicGraph = IDirectMusicGraph;
- {$EXTERNALSYM IID_IDirectMusicGraph}
- IID_IDirectMusicStyle = IDirectMusicStyle;
- {$EXTERNALSYM IID_IDirectMusicStyle}
- IID_IDirectMusicChordMap = IDirectMusicChordMap;
- {$EXTERNALSYM IID_IDirectMusicChordMap}
- IID_IDirectMusicComposer = IDirectMusicComposer;
- {$EXTERNALSYM IID_IDirectMusicComposer}
- IID_IDirectMusicBand = IDirectMusicBand;
- {$EXTERNALSYM IID_IDirectMusicBand}
- const
- (* Alternate interface IDs, available in DX7 release and after. *)
- IID_IDirectMusicPerformance2: TGUID = '{6fc2cae0-bc78-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM IID_IDirectMusicPerformance2}
- IID_IDirectMusicSegment2: TGUID = '{d38894d1-c052-11d2-872f-00600893b1bd}';
- {$EXTERNALSYM IID_IDirectMusicSegment2}
- type
- (* Interface IDs for DX8 *)
- (* changed interfaces (GUID only) *)
- IID_IDirectMusicLoader8 = IDirectMusicLoader8;
- {$EXTERNALSYM IID_IDirectMusicLoader8}
- IID_IDirectMusicPerformance8 = IDirectMusicPerformance8;
- {$EXTERNALSYM IID_IDirectMusicPerformance8}
- IID_IDirectMusicSegment8 = IDirectMusicSegment8;
- {$EXTERNALSYM IID_IDirectMusicSegment8}
- IID_IDirectMusicSegmentState8 = IDirectMusicSegmentState8;
- {$EXTERNALSYM IID_IDirectMusicSegmentState8}
- IID_IDirectMusicStyle8 = IDirectMusicStyle8;
- {$EXTERNALSYM IID_IDirectMusicStyle8}
- (* new interfaces (GUID + alias) *)
- IID_IDirectMusicPatternTrack = IDirectMusicPatternTrack;
- {$EXTERNALSYM IID_IDirectMusicPatternTrack}
- IID_IDirectMusicScript = IDirectMusicScript; (* {2252373A-5814-489b-8209-31FEDEBAF137} *)
- {$EXTERNALSYM IID_IDirectMusicScript}
- IID_IDirectMusicContainer = IDirectMusicContainer;
- {$EXTERNALSYM IID_IDirectMusicContainer}
- IID_IDirectMusicAudioPath = IDirectMusicAudioPath;
- {$EXTERNALSYM IID_IDirectMusicAudioPath}
- IID_IDirectMusicPatternTrack8 = IID_IDirectMusicPatternTrack;
- {$EXTERNALSYM IID_IDirectMusicPatternTrack8}
- IID_IDirectMusicScript8 = IID_IDirectMusicScript;
- {$EXTERNALSYM IID_IDirectMusicScript8}
- IID_IDirectMusicContainer8 = IID_IDirectMusicContainer;
- {$EXTERNALSYM IID_IDirectMusicContainer8}
- IID_IDirectMusicAudioPath8 = IID_IDirectMusicAudioPath;
- {$EXTERNALSYM IID_IDirectMusicAudioPath8}
- (* unchanged interfaces (alias only) *)
- IID_IDirectMusicGetLoader8 = IID_IDirectMusicGetLoader;
- {$EXTERNALSYM IID_IDirectMusicGetLoader8}
- IID_IDirectMusicChordMap8 = IID_IDirectMusicChordMap;
- {$EXTERNALSYM IID_IDirectMusicChordMap8}
- IID_IDirectMusicGraph8 = IID_IDirectMusicGraph;
- {$EXTERNALSYM IID_IDirectMusicGraph8}
- IID_IDirectMusicBand8 = IID_IDirectMusicBand;
- {$EXTERNALSYM IID_IDirectMusicBand8}
- IID_IDirectMusicObject8 = IID_IDirectMusicObject;
- {$EXTERNALSYM IID_IDirectMusicObject8}
- IID_IDirectMusicComposer8 = IID_IDirectMusicComposer;
- {$EXTERNALSYM IID_IDirectMusicComposer8}
- (************************************************************************
- * *
- * dmusicf.h -- This module defines the DirectMusic file formats *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************)
- const
- // Common chunks
- DMUS_FOURCC_GUID_CHUNK = DWORD(Byte('g') or (Byte('u') shl 8) or (Byte('i') shl 16) or (Byte('d') shl 24)); // mmioFOURCC('g','u','i','d')
- {$EXTERNALSYM DMUS_FOURCC_GUID_CHUNK}
- DMUS_FOURCC_INFO_LIST = DWORD(Byte('I') or (Byte('N') shl 8) or (Byte('F') shl 16) or (Byte('O') shl 24)); // mmioFOURCC('I','N','F','O')
- {$EXTERNALSYM DMUS_FOURCC_INFO_LIST}
- DMUS_FOURCC_UNFO_LIST = DWORD(Byte('U') or (Byte('N') shl 8) or (Byte('F') shl 16) or (Byte('O') shl 24)); // mmioFOURCC('U','N','F','O')
- {$EXTERNALSYM DMUS_FOURCC_UNFO_LIST}
- DMUS_FOURCC_UNAM_CHUNK = DWORD(Byte('U') or (Byte('N') shl 8) or (Byte('A') shl 16) or (Byte('M') shl 24)); // mmioFOURCC('U','N','A','M')
- {$EXTERNALSYM DMUS_FOURCC_UNAM_CHUNK}
- DMUS_FOURCC_UART_CHUNK = DWORD(Byte('U') or (Byte('A') shl 8) or (Byte('R') shl 16) or (Byte('T') shl 24)); // mmioFOURCC('U','A','R','T')
- {$EXTERNALSYM DMUS_FOURCC_UART_CHUNK}
- DMUS_FOURCC_UCOP_CHUNK = DWORD(Byte('U') or (Byte('C') shl 8) or (Byte('O') shl 16) or (Byte('P') shl 24)); // mmioFOURCC('U','C','O','P')
- {$EXTERNALSYM DMUS_FOURCC_UCOP_CHUNK}
- DMUS_FOURCC_USBJ_CHUNK = DWORD(Byte('U') or (Byte('S') shl 8) or (Byte('B') shl 16) or (Byte('J') shl 24)); // mmioFOURCC('U','S','B','J')
- {$EXTERNALSYM DMUS_FOURCC_USBJ_CHUNK}
- DMUS_FOURCC_UCMT_CHUNK = DWORD(Byte('U') or (Byte('C') shl 8) or (Byte('M') shl 16) or (Byte('T') shl 24)); // mmioFOURCC('U','C','M','T')
- {$EXTERNALSYM DMUS_FOURCC_UCMT_CHUNK}
- DMUS_FOURCC_CATEGORY_CHUNK = DWORD(Byte('c') or (Byte('a') shl 8) or (Byte('t') shl 16) or (Byte('g') shl 24)); // mmioFOURCC('c','a','t','g')
- {$EXTERNALSYM DMUS_FOURCC_CATEGORY_CHUNK}
- DMUS_FOURCC_VERSION_CHUNK = DWORD(Byte('v') or (Byte('e') shl 8) or (Byte('r') shl 16) or (Byte('s') shl 24)); // mmioFOURCC('v','e','r','s')
- {$EXTERNALSYM DMUS_FOURCC_VERSION_CHUNK}
- type
- // The following structures are used by the Tracks, and are the packed structures
- // that are passed to the Tracks inside the IStream.
- PDMusIoSeqItem = ^TDMusIoSeqItem;
- _DMUS_IO_SEQ_ITEM = packed record
- mtTime: TMusicTime;
- mtDuration: TMusicTime;
- dwPChannel: DWORD;
- nOffset: Smallint;
- bStatus: Byte;
- bByte1: Byte;
- bByte2: Byte;
- end;
- {$EXTERNALSYM _DMUS_IO_SEQ_ITEM}
- DMUS_IO_SEQ_ITEM = _DMUS_IO_SEQ_ITEM;
- {$EXTERNALSYM DMUS_IO_SEQ_ITEM}
- TDMusIoSeqItem = _DMUS_IO_SEQ_ITEM;
- PDMusIoCurveItem = ^TDMusIoCurveItem;
- _DMUS_IO_CURVE_ITEM = packed record
- mtStart: TMusicTime;
- mtDuration: TMusicTime;
- mtResetDuration: TMusicTime;
- dwPChannel: DWORD;
- nOffset: Smallint;
- nStartValue: Smallint;
- nEndValue: Smallint;
- nResetValue: Smallint;
- bType: Byte;
- bCurveShape: Byte;
- bCCData: Byte;
- bFlags: Byte;
- // Following was added for DX8.
- wParamType: Word; // RPN or NRPN parameter number.
- wMergeIndex: Word; // Allows multiple parameters to be merged (pitchbend, volume, and expression.)
- end;
- {$EXTERNALSYM _DMUS_IO_CURVE_ITEM}
- DMUS_IO_CURVE_ITEM = _DMUS_IO_CURVE_ITEM;
- {$EXTERNALSYM DMUS_IO_CURVE_ITEM}
- TDMusIoCurveItem = _DMUS_IO_CURVE_ITEM;
- PDMusIoTempoItem = ^TDMusIoTempoItem;
- _DMUS_IO_TEMPO_ITEM = packed record
- lTime: TMusicTime;
- dblTempo: Double;
- end;
- {$EXTERNALSYM _DMUS_IO_TEMPO_ITEM}
- DMUS_IO_TEMPO_ITEM = _DMUS_IO_TEMPO_ITEM;
- {$EXTERNALSYM DMUS_IO_TEMPO_ITEM}
- TDMusIoTempoItem = _DMUS_IO_TEMPO_ITEM;
- PDMusIoSysExItem = ^TDMusIoSysExItem;
- _DMUS_IO_SYSEX_ITEM = packed record
- mtTime: TMusicTime;
- dwPChannel: DWORD;
- dwSysExLength: DWORD;
- end;
- {$EXTERNALSYM _DMUS_IO_SYSEX_ITEM}
- DMUS_IO_SYSEX_ITEM = _DMUS_IO_SYSEX_ITEM;
- {$EXTERNALSYM DMUS_IO_SYSEX_ITEM}
- TDMusIoSysExItem = _DMUS_IO_SYSEX_ITEM;
- DMUS_CHORD_PARAM = DMUS_CHORD_KEY; (* DMUS_CHORD_KEY defined in dmusici.h *)
- {$EXTERNALSYM DMUS_CHORD_PARAM}
- TDMusChordParam = DMUS_CHORD_PARAM;
- PDMusChordParam = ^TDMusChordParam;
- _DMUS_RHYTHM_PARAM = packed record
- TimeSig: TDMusTimeSignature;
- dwRhythmPattern: DWORD;
- end;
- {$EXTERNALSYM _DMUS_RHYTHM_PARAM}
- DMUS_RHYTHM_PARAM = _DMUS_RHYTHM_PARAM;
- {$EXTERNALSYM DMUS_RHYTHM_PARAM}
- TDMusRhythmParam = _DMUS_RHYTHM_PARAM;
- PDMusRhythmParam = ^TDMusRhythmParam;
- PDMusTempoParam = ^TDMusTempoParam;
- _DMUS_TEMPO_PARAM = packed record
- mtTime: TMusicTime;
- dblTempo: Double;
- end;
- {$EXTERNALSYM _DMUS_TEMPO_PARAM}
- DMUS_TEMPO_PARAM = _DMUS_TEMPO_PARAM;
- {$EXTERNALSYM DMUS_TEMPO_PARAM}
- TDMusTempoParam = _DMUS_TEMPO_PARAM;
- PDMusMuteParam = ^TDMusMuteParam;
- _DMUS_MUTE_PARAM = packed record
- dwPChannel: DWORD;
- dwPChannelMap: DWORD;
- fMute: BOOL;
- end;
- {$EXTERNALSYM _DMUS_MUTE_PARAM}
- DMUS_MUTE_PARAM = _DMUS_MUTE_PARAM;
- {$EXTERNALSYM DMUS_MUTE_PARAM}
- TDMusMuteParam = _DMUS_MUTE_PARAM;
- const
- (* Style chunks *)
- DMUS_FOURCC_STYLE_FORM = DWORD(Byte('D') or (Byte('M') shl 8) or (Byte('S') shl 16) or (Byte('T') shl 24)); // mmioFOURCC('D','M','S','T')
- {$EXTERNALSYM DMUS_FOURCC_STYLE_FORM}
- DMUS_FOURCC_STYLE_CHUNK = DWORD(Byte('s') or (Byte('t') shl 8) or (Byte('y') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('s','t','y','h')
- {$EXTERNALSYM DMUS_FOURCC_STYLE_CHUNK}
- DMUS_FOURCC_PART_LIST = DWORD(Byte('p') or (Byte('a') shl 8) or (Byte('r') shl 16) or (Byte('t') shl 24)); // mmioFOURCC('p','a','r','t')
- {$EXTERNALSYM DMUS_FOURCC_PART_LIST}
- DMUS_FOURCC_PART_CHUNK = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('t') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','r','t','h')
- {$EXTERNALSYM DMUS_FOURCC_PART_CHUNK}
- DMUS_FOURCC_NOTE_CHUNK = DWORD(Byte('n') or (Byte('o') shl 8) or (Byte('t') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('n','o','t','e')
- {$EXTERNALSYM DMUS_FOURCC_NOTE_CHUNK}
- DMUS_FOURCC_CURVE_CHUNK = DWORD(Byte('c') or (Byte('r') shl 8) or (Byte('v') shl 16) or (Byte('e') shl 24)); // mmioFOURCC('c','r','v','e')
- {$EXTERNALSYM DMUS_FOURCC_CURVE_CHUNK}
- DMUS_FOURCC_MARKER_CHUNK = DWORD(Byte('m') or (Byte('r') shl 8) or (Byte('k') shl 16) or (Byte('r') shl 24)); // mmioFOURCC('m','r','k','r')
- {$EXTERNALSYM DMUS_FOURCC_MARKER_CHUNK}
- DMUS_FOURCC_RESOLUTION_CHUNK = DWORD(Byte('r') or (Byte('s') shl 8) or (Byte('l') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('r','s','l','n')
- {$EXTERNALSYM DMUS_FOURCC_RESOLUTION_CHUNK}
- DMUS_FOURCC_ANTICIPATION_CHUNK = DWORD(Byte('a') or (Byte('n') shl 8) or (Byte('p') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('a','n','p','n')
- {$EXTERNALSYM DMUS_FOURCC_ANTICIPATION_CHUNK}
- DMUS_FOURCC_PATTERN_LIST = DWORD(Byte('p') or (Byte('t') shl 8) or (Byte('t') shl 16) or (Byte('n') shl 24)); // mmioFOURCC('p','t','t','n')
- {$EXTERNALSYM DMUS_FOURCC_PATTERN_LIST}
- DMUS_FOURCC_PATTERN_CHUNK = DWORD(Byte('p') or (Byte('t') shl 8) or (Byte('n') shl 16) or (Byte('h') shl 24)); // mmioFOURCC('p','t','n','h')
- {$EXTERNALSYM DMUS_FOURCC_PATTERN_CHUNK}
- DMUS_FOURCC_RHYTHM_CHUNK = DWORD(Byte('r') or (Byte('h') shl 8) or (Byte('t') shl 16) or (Byte('m') shl 24)); // mmioFOURCC('r','h','t','m')
- {$EXTERNALSYM DMUS_FOURCC_RHYTHM_CHUNK}
- DMUS_FOURCC_PARTREF_LIST = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('e') shl 16) or (Byte('f') shl 24)); // mmioFOURCC('p','r','e','f')
- {$EXTERNALSYM DMUS_FOURCC_PARTREF_LIST}
- DMUS_FOURCC_PARTREF_CHUNK = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('f') shl 16) or (Byte('c') shl 24)); // mmioFOURCC('p','r','f','c')
- {$EXTERNALSYM DMUS_FOURCC_PARTREF_CHUNK}
- DMUS_FOURCC_STYLE_PERS_REF_LIST = DWORD(Byte('p') or (Byte('r') shl 8) or (Byte('r') shl 16) or (Byte('f') shl 24)); // mmioFOURCC('p','r','r','f')
- {$EXTERNALSYM DMUS_FOURCC_STYLE_PERS_REF_LIST}
- DMUS_FOURCC_MOTIFSETTINGS_CHUNK = DWORD(Byte('m') or (Byte('t') shl 8) or (Byte('f') shl 16) or (Byte('s') shl 24)); // mmioFOURCC('m','t','f','s')
- {$EXTERNALSYM DMUS_FOURCC_MOTIFSETTINGS_CHUNK}
- (* Flags used by variations: these make up the DWORDs in dwVariationChoices. *)
- (* These flags determine the types of chords supported by a given variation in DirectMusic *)
- (* mode. The first seven flags (bits 1-7) are set if the variation supports major chords *)
- (* rooted in scale positions, so, e.g., if bits 1, 2, and 4 are set, the variation *)
- (* supports major chords rooted in the tonic, second, and fourth scale positions. The *)
- (* next seven flags serve the same purpose, but for minor chords, and the following seven *)
- (* flags serve the same purpose for chords that are not major or minor (e.g., SUS 4 *)
- (* chords). Bits 22, 23, and 24 are set if the variation supports chords rooted in the *)
- (* scale, chords rooted sharp of scale tones, and chords rooted flat of scale tones, *)
- (* respectively. For example, to support a C# minor chord in the scale of C Major, *)
- (* bits 8 (for tonic minor) and 24 (for sharp) need to be set. Bits 25, 26, an 27 handle *)
- (* chords that are triads, 6th or 7th chords, and chords with extensions, respectively. *)
- (* bits 28 and 29 handle chords that are followed by tonic and dominant chords, *)
- (* respectively. *)
- DMUS_VARIATIONF_MAJOR = $0000007F; (* Seven positions in the scale - major chords. *)
- {$EXTERNALSYM DMUS_VARIATIONF_MAJOR}
- DMUS_VARIATIONF_MINOR = $00003F80; (* Seven positions in the scale - minor chords. *)
- {$EXTERNALSYM DMUS_VARIATIONF_MINOR}
- DMUS_VARIATIONF_OTHER = $001FC000; (* Seven positions in the scale - other chords. *)
- {$EXTERNALSYM DMUS_VARIATIONF_OTHER}
- DMUS_VARIATIONF_ROOT_SCALE = $00200000; (* Handles chord roots in the scale. *)
- {$EXTERNALSYM DMUS_VARIATIONF_ROOT_SCALE}
- DMUS_VARIATIONF_ROOT_FLAT = $00400000; (* Handles flat chord roots (based on scale notes). *)
- {$EXTERNALSYM DMUS_VARIATIONF_ROOT_FLAT}
- DMUS_VARIATIONF_ROOT_SHARP = $00800000; (* Handles sharp chord roots (based on scale notes). *)
- {$EXTERNALSYM DMUS_VARIATIONF_ROOT_SHARP}
- DMUS_VARIATIONF_TYPE_TRIAD = $01000000; (* Handles simple chords - triads. *)
- {$EXTERNALSYM DMUS_VARIATIONF_TYPE_TRIAD}
- DMUS_VARIATIONF_TYPE_6AND7 = $02000000; (* Handles simple chords - 6 and 7. *)
- {$EXTERNALSYM DMUS_VARIATIONF_TYPE_6AND7}
- DMUS_VARIATIONF_TYPE_COMPLEX = $04000000; (* Handles complex chords. *)
- {$EXTERNALSYM DMUS_VARIATIONF_TYPE_COMPLEX}
- DMUS_VARIATIONF_DEST_TO1 = $08000000; (* Handles transitions to 1 chord. *)
- {$EXTERNALSYM DMUS_VARIATIONF_DEST_TO1}
- DMUS_VARIATIONF_DEST_TO5 = $10000000; (* Handles transitions to 5 chord. *)
- {$EXTERNALSYM DMUS_VARIATIONF_DEST_TO5}
- DMUS_VARIATIONF_DEST_OTHER = $40000000; (* Handles transitions to chords other than 1 . *)
- {$EXTERNALSYM DMUS_VARIATIONF_DEST_OTHER}
- (* legacy mask for variation modes *)
- DMUS_VARIATIONF_MODES = $E0000000;
- {$EXTERNALSYM DMUS_VARIATIONF_MODES}
- (* Bits 29 and 31 of the variation flags are the Mode bits. If both are 0, it's IMA. *)
- (* If bit 29 is 1, it's Direct Music. *)
- DMUS_VARIATIONF_MODES_EX = ($20000000 or $80000000);
- {$EXTERNALSYM DMUS_VARIATIONF_MODES_EX}
- DMUS_VARIATIONF_IMA25_MODE = $00000000;
- {$EXTERNALSYM DMUS_VARIATIONF_IMA25_MODE}
- DMUS_VARIATIONF_DMUS_MODE = $20000000;
- {$EXTERNALSYM DMUS_VARIATIONF_DMUS_MODE}
- (* Set this if the part uses marker events *)
- DMUS_PARTF_USE_MARKERS = $1;
- {$EXTERNALSYM DMUS_PARTF_USE_MARKERS}
- (* Set this if the part is allowed to switch only on chord-aligned markers *)
- DMUS_PARTF_ALIGN_CHORDS = $2;
- {$EXTERNALSYM DMUS_PARTF_ALIGN_CHORDS}
- (* These specify if the marker event signals whether to stop a variation or start a
- pattern/variation (or both), and whether new variations must align with a chord *)
- DMUS_MARKERF_START = $1;
- {$EXTERNALSYM DMUS_MARKERF_START}
- DMUS_MARKERF_STOP = $2;
- {$EXTERNALSYM DMUS_MARKERF_STOP}
- DMUS_MARKERF_CHORD_ALIGN = $4;
- {$EXTERNALSYM DMUS_MARKERF_CHORD_ALIGN}
- (* if this flag is set, variation settings in a playing pattern-based track's state data will
- persist in the track after it stops playing *)
- DMUS_PATTERNF_PERSIST_CONTROL = $1;
- {$EXTERNALSYM DMUS_PATTERNF_PERSIST_CONTROL}
- (* These specify possible values for DMUS_IO_PATTERN.wEmbellishment (dx8) *)
- DMUS_EMBELLISHT_NORMAL = 0;
- {$EXTERNALSYM DMUS_EMBELLISHT_NORMAL}
- DMUS_EMBELLISHT_FILL = 1;
- {$EXTERNALSYM DMUS_EMBELLISHT_FILL}
- DMUS_EMBELLISHT_BREAK = 2;
- {$EXTERNALSYM DMUS_EMBELLISHT_BREAK}
- DMUS_EMBELLISHT_INTRO = 4;
- {$EXTERNALSYM DMUS_EMBELLISHT_INTRO}
- DMUS_EMBELLISHT_END = 8;
- {$EXTERNALSYM DMUS_EMBELLISHT_END}
- DMUS_EMBELLISHT_MOTIF = 16;
- {$EXTERNALSYM DMUS_EMBELLISHT_MOTIF}
- DMUS_EMBELLISHT_ALL = $FFFF;
- {$EXTERNALSYM DMUS_EMBELLISHT_ALL}
- type
- (* These specify possible values for DMUS_IO_PATTERN.wEmbellishment (dx8) *)
- enumDMUS_EMBELLISHT_TYPES = Word;
- DMUS_EMBELLISHT_TYPES = enumDMUS_EMBELLISHT_TYPES;
- {$EXTERNALSYM DMUS_EMBELLISHT_TYPES}
- TDMusEmbellishtTypes = DMUS_EMBELLISHT_TYPES;
- {$IFNDEF COMPILER6_UP}
- Byte2 = Word;
- {$ELSE}{$ALIGN 2}
- {$ENDIF}
- (* These specify possible values for DMUS_IO_PARTREF.bRandomVariation
- all but DMUS_VARIATIONT_SEQUENTIAL and DMUS_VARIATIONT_RANDOM are dx8. *)
- {$IFNDEF COMPILER6_UP}{$MINENUMSIZE 2}{$ENDIF}
- enumDMUS_VARIATIONT_TYPES = (
- DMUS_VARIATIONT_SEQUENTIAL {= 0}, (* Play sequential starting with variation 1. *)
- DMUS_VARIATIONT_RANDOM {= 1}, (* Play randomly. *)
- DMUS_VARIATIONT_RANDOM_START {= 2}, (* Play sequential starting with a random variation. *)
- DMUS_VARIATIONT_NO_REPEAT {= 3}, (* Play randomly, but don't play the same variation twice. *)
- DMUS_VARIATIONT_RANDOM_ROW {= 4} (* Play randomly as a row: don't repeat any variation until all have played. *)
- );
- {$EXTERNALSYM enumDMUS_VARIATIONT_TYPES}
- DMUS_VARIATIONT_TYPES = enumDMUS_VARIATIONT_TYPES;
- {$EXTERNALSYM DMUS_VARIATIONT_TYPES}
- TDMusVariationtTypes = DMUS_VARIATIONT_TYPES;
- PDMusVariationtTypes = ^TDMusVariationtTypes;
- {$IFNDEF COMPILER6_UP}{$MINENUMSIZE 1}{$ENDIF}
- PDMusIoTimesig = ^TDMusIoTimesig;
- _DMUS_IO_TIMESIG = record
- (* Time signatures define how many beats per measure, which note receives *)
- (* the beat, and the grid resolution. *)
- bBeatsPerMeasure: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // beats per measure (top of time sig)
- bBeat: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // 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_TIMESIG}
- DMUS_IO_TIMESIG = _DMUS_IO_TIMESIG;
- {$EXTERNALSYM DMUS_IO_TIMESIG}
- TDMusIoTimesig = _DMUS_IO_TIMESIG;
- PDMusIoStyle = ^TDMusIoStyle;
- _DMUS_IO_STYLE = record
- timeSig: TDMusIoTimesig; // Styles have a default Time Signature
- dblTempo: Double;
- end;
- {$EXTERNALSYM _DMUS_IO_STYLE}
- DMUS_IO_STYLE = _DMUS_IO_STYLE;
- {$EXTERNALSYM DMUS_IO_STYLE}
- TDMusIoStyle = _DMUS_IO_STYLE;
- PDMusIoVersion = ^TDMusIoVersion;
- _DMUS_IO_VERSION = record
- dwVersionMS: DWORD; // Version # high-order 32 bits
- dwVersionLS: DWORD; // Version # low-order 32 bits
- end;
- {$EXTERNALSYM _DMUS_IO_VERSION}
- DMUS_IO_VERSION = _DMUS_IO_VERSION;
- {$EXTERNALSYM DMUS_IO_VERSION}
- TDMusIoVersion = _DMUS_IO_VERSION;
- PDMusIoPattern = ^TDMusIoPattern;
- _DMUS_IO_PATTERN = record
- timeSig: TDMusIoTimesig; // Patterns can override the Style's Time sig.
- bGrooveBottom: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // bottom of groove range
- bGrooveTop: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // top of groove range
- wEmbellishment: TDMusEmbellishtTypes; // Fill, Break, Intro, End, Normal, Motif
- wNbrMeasures: Word; // length in measures
- bDestGrooveBottom: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // bottom of groove range for next pattern
- bDestGrooveTop: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // top of groove range for next pattern
- dwFlags: DWORD; // various flags
- end;
- {$EXTERNALSYM _DMUS_IO_PATTERN}
- DMUS_IO_PATTERN = _DMUS_IO_PATTERN;
- {$EXTERNALSYM DMUS_IO_PATTERN}
- TDMusIoPattern = _DMUS_IO_PATTERN;
- PDMusIoStylePart = ^TDMusIoStylePart;
- _DMUS_IO_STYLEPART = record
- timeSig: TDMusIoTimesig; // can override pattern's
- dwVariationChoices: array[0..31] of DWORD; // MOAW choice bitfield
- guidPartID: TGUID; // identifies the part
- wNbrMeasures: Word; // length of the Part
- bPlayModeFlags: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // see PLAYMODE flags
- bInvertUpper: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // inversion upper limit
- bInvertLower: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; // inversion lower limit
- bPad: array[0..2] of Byte; // for DWORD alignment
- dwFlags: DWORD; // various flags
- end;
- {$EXTERNALSYM _DMUS_IO_STYLEPART}
- DMUS_IO_STYLEPART = _DMUS_IO_STYLEPART;
- {$EXTERNALSYM DMUS_IO_STYLEPART}
- TDMusIoStylePart = _DMUS_IO_STYLEPART;
- PDMusIoPartRef = ^TDMusIoPartRef;
- _DMUS_IO_PARTREF = record
- guidPartID: TGUID; (* unique ID for matching up with parts *)
- wLogicalPartID: Word; (* corresponds to port/device/midi channel OBSOLETE *)
- bVariationLockID: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* parts with the same ID lock variations. *)
- (* high bit is used to identify master Part *)
- bSubChordLevel: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* tells which sub chord level this part wants *)
- bPriority: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* 256 priority levels. Parts with lower priority *)
- (* aren't played first when a device runs out of *)
- (* notes *)
- bRandomVariation: TDMusVariationtTypes; (* when set, matching variations play in random order *)
- (* when clear, matching variations play sequentially *)
- wPad: Word; (* not used *)
- dwPChannel: DWORD; (* replaces wLogicalPartID *)
- end;
- {$EXTERNALSYM _DMUS_IO_PARTREF}
- DMUS_IO_PARTREF = _DMUS_IO_PARTREF;
- {$EXTERNALSYM DMUS_IO_PARTREF}
- TDMusIoPartRef = _DMUS_IO_PARTREF;
- PDMusIoStyleNote = ^TDMusIoStyleNote;
- _DMUS_IO_STYLENOTE = record
- mtGridStart: TMusicTime; (* when this note occurs *)
- dwVariation: DWORD; (* variation bits *)
- mtDuration: TMusicTime; (* how long this note lasts *)
- nTimeOffset: Smallint; (* offset from mtGridStart *)
- wMusicValue: Word; (* Position in scale. *)
- bVelocity: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Note velocity. *)
- bTimeRange: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Range to randomize start time. *)
- bDurRange: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Range to randomize duration. *)
- bVelRange: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Range to randomize velocity. *)
- bInversionID: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Identifies inversion group to which this note belongs *)
- bPlayModeFlags: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Can override part *)
- (* Following exists only under DX8 and on *)
- bNoteFlags: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* values from DMUS_NOTEF_FLAGS *)
- end;
- {$EXTERNALSYM _DMUS_IO_STYLENOTE}
- DMUS_IO_STYLENOTE = _DMUS_IO_STYLENOTE;
- {$EXTERNALSYM DMUS_IO_STYLENOTE}
- TDMusIoStyleNote = _DMUS_IO_STYLENOTE;
- PDMusIoStyleCurve = ^TDMusIoStyleCurve;
- _DMUS_IO_STYLECURVE = record
- mtGridStart: TMusicTime; (* when this curve occurs *)
- dwVariation: DWORD; (* variation bits *)
- mtDuration: TMusicTime; (* how long this curve lasts *)
- mtResetDuration: TMusicTime; (* how long after the end of the curve to reset the curve *)
- nTimeOffset: Smallint; (* offset from mtGridStart *)
- nStartValue: Smallint; (* curve's start value *)
- nEndValue: Smallint; (* curve's end value *)
- nResetValue: Smallint; (* the value to which to reset the curve *)
- bEventType: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* type of curve *)
- bCurveShape: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* shape of curve *)
- bCCData: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* CC# *)
- bFlags: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Bit 1=TRUE means to send nResetValue. Otherwise, don't.
- Other bits are reserved. *)
- (* Following was added for DX8. *)
- wParamType: Word; (* RPN or NRPN parameter number. *)
- wMergeIndex: Word; (* Allows multiple parameters to be merged (pitchbend, volume, and expression.) *)
- end;
- {$EXTERNALSYM _DMUS_IO_STYLECURVE}
- DMUS_IO_STYLECURVE = _DMUS_IO_STYLECURVE;
- {$EXTERNALSYM DMUS_IO_STYLECURVE}
- TDMusIoStyleCurve = _DMUS_IO_STYLECURVE;
- PDMusIoStyleMarker = ^TDMusIoStyleMarker;
- _DMUS_IO_STYLEMARKER = record
- mtGridStart: TMusicTime; (* when this marker occurs *)
- dwVariation: DWORD; (* variation bits *)
- wMarkerFlags: Word; (* how the marker is used *)
- end;
- {$EXTERNALSYM _DMUS_IO_STYLEMARKER}
- DMUS_IO_STYLEMARKER = _DMUS_IO_STYLEMARKER;
- {$EXTERNALSYM DMUS_IO_STYLEMARKER}
- TDMusIoStyleMarker = _DMUS_IO_STYLEMARKER;
- PDMusIoStyleResolution = ^TDMusIoStyleResolution;
- _DMUS_IO_STYLERESOLUTION = record
- dwVariation: DWORD; (* variation bits *)
- wMusicValue: Word; (* Position in scale. *)
- bInversionID: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Identifies inversion group to which this note belongs *)
- bPlayModeFlags: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Can override part *)
- end;
- {$EXTERNALSYM _DMUS_IO_STYLERESOLUTION}
- DMUS_IO_STYLERESOLUTION = _DMUS_IO_STYLERESOLUTION;
- {$EXTERNALSYM DMUS_IO_STYLERESOLUTION}
- TDMusIoStyleResolution = _DMUS_IO_STYLERESOLUTION;
- PDMusIoStyleAnticipation = ^TDMusIoStyleAnticipation;
- _DMUS_IO_STYLE_ANTICIPATION = record
- mtGridStart: TMusicTime; (* when this anticipation occurs *)
- dwVariation: DWORD; (* variation bits *)
- nTimeOffset: Smallint; (* offset from mtGridStart *)
- bTimeRange: {$IFNDEF COMPILER6_UP}Byte2{$ELSE}Byte{$ENDIF}; (* Range to randomize start time. *)
- end;
- {$EXTERNALSYM _DMUS_IO_STYLE_ANTICIPATION}
- DMUS_IO_STYLE_ANTICIPATION = _DMUS_IO_STYLE_ANTICIPATION;
- {$EXTERNALSYM DMUS_IO_STYLE_ANTICIPATION}
- TDMusIoStyleAnticipation = _DMUS_IO_STYLE_ANTICIPATION;
- PDMusIoMotifSettings = ^TDMusIoMotifSettings;
- _DMUS_IO_MOTIFSETTINGS = record
- dwRepeats: DWORD; (* Number of repeats. By default, 0. *)
- 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 mtLoopStart. Or, 0, indicating loop full motif. *)
- dwResolution: DWORD; (* Default resolution. *)
- end;
- {$EXTERNALSYM _DMUS_IO_MOTIFSETTINGS}
- DMUS_IO_MOTIFSETTINGS = _DMUS_IO_MOTIFSETTINGS;
- {$EXTERNALSYM DMUS_IO_MOTIFSETTINGS}
- TDMusIoMotifSettings = _DMUS_IO_MOTIFSETTINGS;
- {$ALIGN ON}
- (*
- RIFF
- (
- 'DMST' // Style
- <styh-ck> // Style header chunk
- <guid-ck> // Every Style has a GUID
- [<UNFO-list>] // Name, author, copyright info., comments
- [<vers-ck>] // version chunk
- <part-list>... // Array of parts in the Style, used by patterns
- <pttn-list>... // Array of patterns in the Style
- <DMBD-form>... // Array of bands in the Style