?? directmusic.pas
字號:
CONN_SRC_CC91 = $00db; (* Reverb Send *)
CONN_SRC_CC93 = $00dd; (* Chorus Send *)
(* Generic Destinations *)
CONN_DST_GAIN = $0001; (* Same as CONN_DST_ ATTENUATION *)
CONN_DST_KEYNUMBER = $0005; (* Key Number Generator *)
(* Audio Channel Output Destinations *)
CONN_DST_LEFT = $0010; (* Left Channel Send *)
CONN_DST_RIGHT = $0011; (* Right Channel Send *)
CONN_DST_CENTER = $0012; (* Center Channel Send *)
CONN_DST_LEFTREAR = $0013; (* Left Rear Channel Send *)
CONN_DST_RIGHTREAR = $0014; (* Right Rear Channel Send *)
CONN_DST_LFE_CHANNEL = $0015; (* LFE Channel Send *)
CONN_DST_CHORUS = $0080; (* Chorus Send *)
CONN_DST_REVERB = $0081; (* Reverb Send *)
(* Vibrato LFO Destinations *)
CONN_DST_VIB_FREQUENCY = $0114; (* Vibrato Frequency *)
CONN_DST_VIB_STARTDELAY = $0115; (* Vibrato Start Delay *)
(* EG1 Destinations *)
CONN_DST_EG1_DELAYTIME = $020B; (* EG1 Delay Time *)
CONN_DST_EG1_HOLDTIME = $020C; (* EG1 Hold Time *)
(* EG2 Destinations *)
CONN_DST_EG2_DELAYTIME = $030F; (* EG2 Delay Time *)
CONN_DST_EG2_HOLDTIME = $0310; (* EG2 Hold Time *)
(* Filter Destinations *)
CONN_DST_FILTER_CUTOFF = $0500; (* Filter Cutoff Frequency *)
CONN_DST_FILTER_Q = $0501; (* Filter Resonance *)
(* Transforms *)
CONN_TRN_CONVEX = $0002; (* Convex Transform *)
CONN_TRN_SWITCH = $0003; (* Switch Transform *)
(* Conditional chunk operators *)
DLS_CDL_AND = $0001; (* X = X & Y *)
DLS_CDL_OR = $0002; (* X = X | Y *)
DLS_CDL_XOR = $0003; (* X = X ^ Y *)
DLS_CDL_ADD = $0004; (* X = X + Y *)
DLS_CDL_SUBTRACT = $0005; (* X = X - Y *)
DLS_CDL_MULTIPLY = $0006; (* X = X * Y *)
DLS_CDL_DIVIDE = $0007; (* X = X / Y *)
DLS_CDL_LOGICAL_AND = $0008; (* X = X && Y *)
DLS_CDL_LOGICAL_OR = $0009; (* X = X || Y *)
DLS_CDL_LT = $000A; (* X = (X < Y) *)
DLS_CDL_LE = $000B; (* X = (X <= Y) *)
DLS_CDL_GT = $000C; (* X = (X > Y) *)
DLS_CDL_GE = $000D; (* X = (X >= Y) *)
DLS_CDL_EQ = $000E; (* X = (X == Y) *)
DLS_CDL_NOT = $000F; (* X = !X *)
DLS_CDL_CONST = $0010; (* 32-bit constant *)
DLS_CDL_QUERY = $0011; (* 32-bit value returned from query *)
DLS_CDL_QUERYSUPPORTED = $0012; (* Test to see if DLSID Query is supported *)
(*
Loop and release
*)
WLOOP_TYPE_RELEASE = 2;
(*
DLSID queries for <cdl-ck>
*)
DLSID_GMInHardware : TGUID = '{178f2f24-c364-11d1-a760-0000f875ac12}';
DLSID_GSInHardware : TGUID = '{178f2f25-c364-11d1-a760-0000f875ac12}';
DLSID_XGInHardware : TGUID = '{178f2f26-c364-11d1-a760-0000f875ac12}';
DLSID_SupportsDLS1 : TGUID = '{178f2f27-c364-11d1-a760-0000f875ac12}';
DLSID_SupportsDLS2 : TGUID = '{f14599e5-4689-11d2-afa6-00aa0024d8b6}';
DLSID_SampleMemorySize : TGUID = '{178f2f28-c364-11d1-a760-0000f875ac12}';
DLSID_ManufacturersID : TGUID = '{b03e1181-8095-11d2-a1ef-00600833dbd8}';
DLSID_ProductID : TGUID = '{b03e1182-8095-11d2-a1ef-00600833dbd8}';
DLSID_SamplePlaybackRate : TGUID = '{2a91f713-a4bf-11d2-bbdf-00600833dbd8}';
(************************************************************************
* *
* dmdls.h -- DLS download definitions for DirectMusic API's *
* *
* Copyright (c) 1998, Microsoft Corp. All rights reserved. *
* *
************************************************************************)
type
TPCent = LongInt; (* Pitch cents *)
TGCent = LongInt; (* Gain cents *)
TTCent = LongInt; (* Time cents *)
TPercent = LongInt; (* Per.. cent! *)
PReference_Time = ^TReference_Time;
TReference_Time = LongLong;
TFourCC = DWORD; (* a four character code *)
function MAKEFOURCC (ch0, ch1, ch2, ch3: Char) : TFourCC;
type
TDMus_DownloadInfor = packed record
dwDLType: DWORD; (* Instrument or Wave *)
dwDLId: DWORD; (* Unique identifier to tag this download. *)
dwNumOffsetTableEntries: DWORD; (* Number of index in the offset address table. *)
cbSize: DWORD; (* Total size of this memory chunk. *)
end;
const
DMUS_DOWNLOADINFO_INSTRUMENT = 1;
DMUS_DOWNLOADINFO_WAVE = 2;
DMUS_DOWNLOADINFO_INSTRUMENT2 = 3; (* New version for better DLS2 support. *)
DMUS_DEFAULT_SIZE_OFFSETTABLE = 1;
(* Flags for DMUS_INSTRUMENT's ulFlags member *)
DMUS_INSTRUMENT_GM_INSTRUMENT = 1 shl 0;
type
TDMus_OffsetTable = packed record
ulOffsetTable : array [0..DMUS_DEFAULT_SIZE_OFFSETTABLE-1] of ULONG;
end;
TDMus_Instrument = packed record
ulPatch: ULONG;
ulFirstRegionIdx: ULONG;
ulGlobalArtIdx: ULONG; (* If zero the instrument does not have an articulation *)
ulFirstExtCkIdx: ULONG; (* If zero no 3rd party entenstion chunks associated with the instrument *)
ulCopyrightIdx: ULONG; (* If zero no Copyright information associated with the instrument *)
ulFlags: ULONG;
end;
TDMus_Region = packed record
RangeKey: TRGNRange;
RangeVelocity: TRGNRange;
fusOptions: Word;
usKeyGroup: Word;
ulRegionArtIdx: ULONG; (* If zero the region does not have an articulation *)
ulNextRegionIdx: ULONG; (* If zero no more regions *)
ulFirstExtCkIdx: ULONG; (* If zero no 3rd party entenstion chunks associated with the region *)
WaveLink: TWaveLink;
WSMP: TWSMPL; (* If WSMP.cSampleLoops > 1 then a WLOOP is included *)
WLOOP: array [0..0] of TWLoop;
end;
TDMus_LFOParams = packed record
pcFrequency: TPCent;
tcDelay: TTCent;
gcVolumeScale: TGCent;
pcPitchScale: TPCent;
gcMWToVolume: TGCent;
pcMWToPitch: TPCent;
end;
TDMus_VEGParams = packed record
tcAttack: TTCent;
tcDecay: TTCent;
ptSustain: TPercent;
tcRelease: TTCent;
tcVel2Attack: TTCent;
tcKey2Decay: TTCent;
end;
TDMus_PEGParams = packed record
tcAttack: TTCent;
tcDecay: TTCent;
ptSustain: TPercent;
tcRelease: TTCent;
tcVel2Attack: TTCent;
tcKey2Decay: TTCent;
pcRange: TPCent;
end;
TDMus_MSCParams = packed record
ptDefaultPan: TPercent;
end;
TDMus_ArticParams = packed record
LFO: TDMus_LFOParams;
VolEG: TDMus_VEGParams;
PitchEG: TDMus_PEGParams;
Misc: TDMus_MSCParams;
end;
TDMus_Articulation = packed record
ulArt1Idx: ULONG; (* If zero no DLS Level 1 articulation chunk *)
ulFirstExtCkIdx: ULONG; (* If zero no 3rd party entenstion chunks associated with the articulation *)
end;
const
DMUS_MIN_DATA_SIZE = 4;
(* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK *)
type
DMus_ExtensionChunk = packed record
cbSize: ULONG; (* Size of extension chunk *)
ulNextExtCkIdx: ULONG; (* If zero no more 3rd party entenstion chunks *)
ExtCkID: TFourCC;
byExtCk: array [0..DMUS_MIN_DATA_SIZE-1] of BYTE; (* The actual number that follows is determined by cbSize *)
end;
(* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT *)
TDmus_Copyright = packed record
cbSize: ULONG; (* Size of copyright information *)
byCopyright: array [0..DMUS_MIN_DATA_SIZE-1] of BYTE; (* The actual number that follows is determined by cbSize *)
end;
TDMus_WaveData = packed record
cbSize: ULONG;
byData: array [0..DMUS_MIN_DATA_SIZE-1] of BYTE;
end;
TDMus_Wave = packed record
ulFirstExtCkIdx: ULONG; (* If zero no 3rd party entenstion chunks associated with the wave *)
ulCopyrightIdx: ULONG; (* If zero no Copyright information associated with the wave *)
ulWaveDataIdx: ULONG; (* Location of actual wave data. *)
/// WaveformatEx: TWaveFormatEx;
end;
PDMus_NoteRange = ^TDMus_NoteRange;
TDMus_NoteRange = packed record
dwLowNote: DWORD; (* Sets the low note for the range of MIDI note events to which the instrument responds.*)
dwHighNote: DWORD; (* Sets the high note for the range of MIDI note events to which the instrument responds.*)
end;
(************************************************************************
* *
* dmerror.h -- Error code returned by DirectMusic API's *
* *
* Copyright (c) 1998, Microsoft Corp. All rights reserved. *
* *
************************************************************************)
const
FACILITY_DIRECTMUSIC = $878; (* Shared with DirectSound *)
DMUS_ERRBASE = $1000; (* Make error codes human readable in hex *)
MAKE_DMHRESULTSUCCESS = (0 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or DMUS_ERRBASE;
MAKE_DMHRESULTERROR = (1 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or DMUS_ERRBASE;
(* DMUS_S_PARTIALLOAD
*
* The object could only load partially. This can happen if some components are
* not registered properly, such as embedded tracks and tools.
*)
DMUS_S_PARTIALLOAD = MAKE_DMHRESULTSUCCESS + $091;
(* DMUS_S_PARTIALDOWNLOAD
*
* This code indicates that a band download was only successful in reaching
* some, but not all, of the referenced ports. Some samples may not play
* correctly.
*)
DMUS_S_PARTIALDOWNLOAD = MAKE_DMHRESULTSUCCESS + $092;
(* DMUS_S_REQUEUE
*
* Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
* performance that it should cue the PMsg again automatically.
*)
DMUS_S_REQUEUE = MAKE_DMHRESULTSUCCESS + $200;
(* DMUS_S_FREE
*
* Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
* performance that it should free the PMsg automatically.
*)
DMUS_S_FREE = MAKE_DMHRESULTSUCCESS + $201;
(* DMUS_S_END
*
* Return value from IDirectMusicTrack::Play() which indicates to the
* segment that the track has no more data after mtEnd.
*)
DMUS_S_END = MAKE_DMHRESULTSUCCESS + $202;
(* DMUS_S_STRING_TRUNCATED
*
* Returned string has been truncated to fit the buffer size.
*)
DMUS_S_STRING_TRUNCATED = MAKE_DMHRESULTSUCCESS + $210;
(* DMUS_S_LAST_TOOL
*
* Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
* is already stamped with the last tool in the graph. The returned PMsg's
* tool pointer is now NULL.
*)
DMUS_S_LAST_TOOL = MAKE_DMHRESULTSUCCESS + $211;
(* DMUS_S_OVER_CHORD
*
* Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
* that no note has been calculated because the music value has the note
* at a position higher than the top note of the chord. This applies only
* to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
* that the caller should not do anything with the note. It is not meant
* to be played against this chord.
*)
DMUS_S_OVER_CHORD = MAKE_DMHRESULTSUCCESS + $212;
(* DMUS_S_UP_OCTAVE
*
* Returned from IDirectMusicPerformance::MIDIToMusic(), and
* IDirectMusicPerformance::MusicToMIDI(), this indicates
* that the note conversion generated a note value that is below 0,
* so it has been bumped up one or more octaves to be in the proper
* MIDI range of 0 through 127.
* Note that this is valid for MIDIToMusic() when using play modes
* DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
* which store MIDI values in wMusicValue. With MusicToMIDI(), it is
* valid for all play modes.
* Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
*)
DMUS_S_UP_OCTAVE = MAKE_DMHRESULTSUCCESS + $213;
(* DMUS_S_DOWN_OCTAVE
*
* Returned from IDirectMusicPerformance::MIDIToMusic(), and
* IDirectMusicPerformance::MusicToMIDI(), this indicates
* that the note conversion generated a note value that is above 127,
* so it has been bumped down one or more octaves to be in the proper
* MIDI range of 0 through 127.
* Note that this is valid for MIDIToMusic() when using play modes
* DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
* which store MIDI values in wMusicValue. With MusicToMIDI(), it is
* valid for all play modes.
* Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
*)
DMUS_S_DOWN_OCTAVE = MAKE_DMHRESULTSUCCESS + $214;
(* DMUS_S_NOBUFFERCONTROL
*
* Although the audio output from the port will be routed to the
* same device as the given DirectSound buffer, buffer controls
* such as pan and volume will not affect the output.
*
*)
DMUS_S_NOBUFFERCONTROL = MAKE_DMHRESULTSUCCESS + $215;
(* DMUS_E_DRIVER_FAILED
*
* An unexpected error was returned from a device driver, indicating
* possible failure of the driver or hardware.
*)
DMUS_E_DRIVER_FAILED = MAKE_DMHRESULTERROR + $0101;
(* DMUS_E_PORTS_OPEN
*
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -