⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmdmusic.pas

📁 一套及时通讯的原码
💻 PAS
📖 第 1 页 / 共 5 页
字号:
        (D1:$08f2d8c9;D2:$37c2;D3:$11d2;D4:($b9,$f9,$00,$00,$f8,$75,$ac,$12));

    IID_IDirectMusicPortDownload : TGUID =
        (D1:$d2ac287a;D2:$b39b;D3:$11d1;D4:($87,$04,$00,$60,$8,$93,$b1,$bd));

    IID_IDirectMusicDownload : TGUID =
        (D1:$d2ac287b;D2:$b39b;D3:$11d1;D4:($87,$04,$00,$60,$08,$93,$b1,$bd));

    IID_IDirectMusicCollection : TGUID =
        (D1:$d2ac287c;D2:$b39b;D3:$11d1;D4:($87,$04,$00,$60,$08,$93,$b1,$bd));

    IID_IDirectMusicInstrument : TGUID =
        (D1:$d2ac287d;D2:$b39b;D3:$11d1;D4:($87,$04,$00,$60,$08,$93,$b1,$bd));

    IID_IDirectMusicDownloadedInstrument : TGUID =
        (D1:$d2ac287e;D2:$b39b;D3:$11d1;D4:($87,$04,$00,$60,$08,$93,$b1,$bd));

    IID_IDirectMusicSynth : TGUID =
        (D1:$f69b9165;D2:$bb60;D3:$11d1;D4:($af,$a6,$00,$aa,$00,$24,$d8,$b6));

    IID_IDirectMusicSynthSink : TGUID =
        (D1:$d2ac2880;D2:$b39b;D3:$11d1;D4:($87,$04,$00,$60,$08,$93,$b1,$bd));


(* Property Query GUID_DMUS_PROP_GM_Hardware
 * Property Query GUID_DMUS_PROP_GS_Hardware
 * Property Query GUID_DMUS_PROP_XG_Hardware
 * Property Query GUID_DMUS_PROP_DLS1_Hardware
 * Property Query GUID_DMUS_PROP_SynthSink_DSOUND
 * Property Query GUID_DMUS_PROP_SynthSink_WAVE
 *
 * Item 0: Supported
 * Returns a DWORD which is non-zero if the feature is supported
 *)

    GUID_DMUS_PROP_GM_Hardware : TGUID =
        (D1:$178f2f24;D2:$c364;D3:$11d1;D4:($a7,$60,$00,$00,$f8,$75,$ac,$12));

    GUID_DMUS_PROP_GS_Hardware : TGUID =
        (D1:$178f2f25;D2:$c364;D3:$11d1;D4:($a7,$60,$00,$00,$f8,$75,$ac,$12));

    GUID_DMUS_PROP_XG_Hardware : TGUID =
        (D1:$178f2f26;D2:$c364;D3:$11d1;D4:($a7,$60,$00,$00,$f8,$75,$ac,$12));

    GUID_DMUS_PROP_DLS1 : TGUID =
        (D1:$178f2f27;D2:$c364;D3:$11d1;D4:($a7,$60,$00,$00,$f8,$75,$ac,$12));

    GUID_DMUS_PROP_SynthSink_DSOUND : TGUID =
        (D1:$aa97844;D2:$c877;D3:$11d1;D4:($87,$c,$0,$60,$8,$93,$b1,$bd));

    GUID_DMUS_PROP_SynthSink_WAVE : TGUID =
        (D1:$aa97845;D2:$c877;D3:$11d1;D4:($87,$c,$0,$60,$8,$93,$b1,$bd));

(* Property Get GUID_DMUS_PROP_MemorySize
 *
 * Item 0: Memory size
 * Returns a DWORD containing the total number of bytes of sample RAM
 *)
    GUID_DMUS_PROP_MemorySize : TGUID =
        (D1:$178f2f28;D2:$c364;D3:$11d1;D4:($a7,$60,$00,$00,$f8,$75,$ac,$12));

(* Property Set GUID_DMUS_PROP_SetDSound
 *
 * Item 0: IDirectSound class
 * Sets the IDirectMusicSynthSink to use the specified DSound object.
 *)
    GUID_DMUS_PROP_SetDSound : TGUID =
        (D1:$aa97842;D2:$c877;D3:$11d1;D4:($87,$c,$0,$60,$8,$93,$b1,$bd));

(* Property Set GUID_DMUS_PROP_WriteBufferZone
 *
 * Item 0: Distance in milliseconds from the write pointer to the synth write.
 * Sets the IDirectMusicSynthSink to write this far behind the pointer.
 *)
    GUID_DMUS_PROP_WriteBufferZone : TGUID =
        (D1:$aa97843;D2:$c877;D3:$11d1;D4:($87,$c,$0,$60,$8,$93,$b1,$bd));

(* 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 =
        (D1:$cfa7cdc2;D2:$00a1;D3:$11d2;D4:($aa,$d5,$00,$00,$f8,$75,$ac,$12));


(************************************************************************
*                                                                       *
*   dmusici.h -- This module defines the DirectMusic interative API's   *
*                                                                       *
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
*                                                                       *
************************************************************************)
type
    TTRANSITION_TYPE = WORD;
    TMUSIC_TIME      = DWORD;

const
    DMUS_PPQ        = 768;     // parts per quarter note

const
    DMUS_COMPOSEF_NONE              = 0;
    DMUS_COMPOSEF_ALIGN             = $1;
    DMUS_COMPOSEF_OVERLAP           = $2;
    DMUS_COMPOSEF_IMMEDIATE         = $4;
    DMUS_COMPOSEF_GRID              = $8;
    DMUS_COMPOSEF_BEAT              = $10;
    DMUS_COMPOSEF_MEASURE           = $20;
    DMUS_COMPOSEF_AFTERPREPARETIME  = $40;
    DMUS_COMPOSEF_MODULATE          = $1000;
    DMUS_COMPOSEF_LONG              = $2000;

(* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member *)
const
    DMUS_PMSGF_REFTIME          = 1;      // if rtTime is valid
    DMUS_PMSGF_MUSICTIME        = 2;      // if mtTime is valid
    DMUS_PMSGF_TOOL_IMMEDIATE   = 4;      // if PMSG should be processed immediately
    DMUS_PMSGF_TOOL_QUEUE       = 8;      // if PMSG should be processed a little early, at Queue time
    DMUS_PMSGF_TOOL_ATTIME      = 16;     // if PMSG should be processed at the time stamp
    DMUS_PMSGF_TOOL_FLUSH       = 32;     // if PMSG is being flushed

(* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member *)
const
    DMUS_PMSGT_MIDI             = 0;      // MIDI short message
    DMUS_PMSGT_NOTE             = 1;      // Interactive Music Note
    DMUS_PMSGT_SYSEX            = 2;      // MIDI long message (system exclusive message)
    DMUS_PMSGT_NOTIFICATION     = 3;      // Notification message
    DMUS_PMSGT_TEMPO            = 4;      // Tempo message
    DMUS_PMSGT_CURVE            = 5;      // Control change / pitch bend, etc. curve
    DMUS_PMSGT_TIMESIG          = 6;      // Time signature
    DMUS_PMSGT_PATCH            = 7;      // Patch changes
    DMUS_PMSGT_TRANSPOSE        = 8;      // Transposition messages
    DMUS_PMSGT_USER             = 255;    // User message

(* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API *)
const
    DMUS_SEGF_AFTERQUEUETIME    = 1;      // play after the queue time (See IDirectMusicPerformance::GetQueueTime)
    DMUS_SEGF_AFTERPREPARETIME  = 2;      // play after the prepare time (See IDirectMusicPerformance::GetPrepareTime)
    DMUS_SEGF_GRID              = 4;      // play on grid boundary
    DMUS_SEGF_BEAT              = 8;      // play on beat boundary
    DMUS_SEGF_MEASURE           = 16;     // play on measure boundary
    DMUS_SEGF_DEFAULT           = 32;     // use segment's default boundary
    DMUS_SEGF_REFTIME           = 64;     // time parameter is in reference time
    DMUS_SEGF_SECONDARY         = 128;    // secondary segment
    DMUS_SEGF_QUEUE             = 256;    // queue at the end of the primary segment queue (primary only)
    DMUS_SEGF_CONTROL           = 512;    // play as a control track (secondary segments only)

(* The following flags are sent in the IDirectMusicTrack::Play() method *)
(* inside the dwFlags parameter                                         *)
const
    DMUS_TRACKF_SEEK            = 1;      // set on a seek
    DMUS_TRACKF_LOOP            = 2;      // set on a loop (repeat)
    DMUS_TRACKF_START           = 4;      // set on first call to Play
    DMUS_TRACKF_FLUSH           = 8;      // set when this call is in response to a flush on the perfomance


    DMUS_MAXSUBCHORD = 8;

    DMUS_NOTEF_NOTEON = 1;     // Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off

const
    DMUS_TEMPO_MAX = 350;
    DMUS_TEMPO_MIN = 10;

    DMUS_MASTERTEMPO_MAX  = 2.0;
    DMUS_MASTERTEMPO_MIN  = 0.25;

    DMUS_MASTERVOLUME_MAX = 6;
    DMUS_MASTERVOLUME_MIN = -100;

const
    (* Curve shapes *)
    DMUS_CURVES_LINEAR  = 0;
    DMUS_CURVES_INSTANT = 1;
    DMUS_CURVES_EXP     = 2;
    DMUS_CURVES_LOG     = 3;
    DMUS_CURVES_SINE    = 4;


    (* curve types *)
    DMUS_CURVET_PBCURVE  = $03;
    DMUS_CURVET_CCCURVE  = $04;
    DMUS_CURVET_MATCURVE = $05;
    DMUS_CURVET_PATCURVE = $06;

(* notification type values                              *)
(* The following correspond to GUID_NOTIFICATION_SEGMENT *)
const
    DMUS_NOTIFICATION_SEGSTART      = 0;
    DMUS_NOTIFICATION_SEGEND        = 1;
    DMUS_NOTIFICATION_SEGALMOSTEND  = 2;
    DMUS_NOTIFICATION_MUSICSTOPPED  = 3;
    DMUS_NOTIFICATION_SEGLOOP       = 4;

    // The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT
    DMUS_NOTIFICATION_MEASUREBEAT   = 0;
    // The following corresponds to GUID_NOTIFICATION_CHORD
    DMUS_NOTIFICATION_CHORD         = 0;
    // The following correspond to GUID_NOTIFICATION_COMMAND
    DMUS_NOTIFICATION_GROOVE        = 0;
    DMUS_NOTIFICATION_EMBELLISHMENT = 1;

const
    DMUS_MAX_NAME       = 64;       // Maximum object name length.
    DMUS_MAX_CATEGORY   = 64;       // Maximum object category name length.
    DMUS_MAX_FILENAME   = MAX_PATH;

    (* 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.
    DMUS_OBJ_CLASS        =  (1 shl 1);     // Class GUID is valid.
    DMUS_OBJ_NAME         =  (1 shl 2);     // Name is valid.
    DMUS_OBJ_CATEGORY     =  (1 shl 3);     // Category is valid.
    DMUS_OBJ_FILENAME     =  (1 shl 4);     // File path is valid.
    DMUS_OBJ_FULLPATH     =  (1 shl 5);     // Path is full path.
    DMUS_OBJ_URL          =  (1 shl 6);     // Path is URL.
    DMUS_OBJ_VERSION      =  (1 shl 7);     // Version is valid.
    DMUS_OBJ_DATE         =  (1 shl 8);     // Date is valid.
    DMUS_OBJ_LOADED       =  (1 shl 9);     // Object is currently loaded in memory.
    DMUS_OBJ_MEMORY       =  (1 shl 10);    // Object is pointed to by pbMemData.

const
    DMUSB_LOADED  =  (1 shl 0);       // Set when band has been loaded
    DMUSB_DEFAULT =  (1 shl 1);       // Set when band is default band for a style

type
    IDirectMusicTrack = interface;
    IDirectMusicPerformance = interface;
    IDirectMusicTool = interface;
    IDirectMusicSegment = interface;
    IDirectMusicSegmentState = interface;
    IDirectMusicGraph = interface;
    IDirectMusicBand = interface;
    IDirectMusicChordMap = interface;
    IDirectMusicLoader = interface;
    IDirectMusicObject = interface;

    PIDirectMusicSegmentState = ^IDirectMusicSegmentState;

    TDMUS_COMMANDT_TYPES = (DMUS_COMMANDT_GROOVE,
                            DMUS_COMMANDT_FILL,
                            DMUS_COMMANDT_INTRO,
                            DMUS_COMMANDT_BREAK,
                            DMUS_COMMANDT_END,
                            DMUS_COMMANDT_ENDANDINTRO);

    TDMUS_SHAPET_TYPES   = (DMUS_SHAPET_FALLING,
                            DMUS_SHAPET_LEVEL,
                            DMUS_SHAPET_LOOPABLE,
                            DMUS_SHAPET_LOUD,
                            DMUS_SHAPET_QUIET,
                            DMUS_SHAPET_PEAKING,
                            DMUS_SHAPET_RANDOM,
                            DMUS_SHAPET_RISING,
                            DMUS_SHAPET_SONG);

   (* every DMUS_PMSG is based off of this structure. The Performance needs    *)
   (* to access these members consistently in every PMSG that goes through it. *)
   PDMUS_PMSG = ^TDMUS_PMSG;
   TDMUS_PMSG = packed record
     dwSize: DWORD;
     rtTime: TREFERENCE_TIME;   // real time (in 100 nanosecond increments)
     mtTime: TMUSIC_TIME;       // music time
     dwFlags: DWORD;            // various bits (see DMUS_PMSG_FLAGS enumeration)
     dwPChannel: DWORD;         // Performance Channel. The Performance can
                                // use this to determine the port/channel.
     dwVirtualTrackID: DWORD;   // virtual track ID
     pTool: IDirectMusicTool;   // tool class pointer
     pGraph: IDirectMusicGraph; // tool graph class pointer
     dwType: DWORD;             // PMSG type (see DMUS_PM_TYPE defines)
     punkUser: IUnknown;        // user com pointer, auto released upon PMSG free
   end;

    (* DMUS_NOTE_PMSG *)
    PDMUS_NOTE_PMSG = ^TDMUS_NOTE_PMSG;
    TDMUS_NOTE_PMSG = packed record
      dwSize: DWORD;
      rtTime: TREFERENCE_TIME;   // real time (in 100 nanosecond increments)
      mtTime: TMUSIC_TIME;       // music time
      dwFlags: DWORD;            // various bits (see DMUS_PMSG_FLAGS enumeration)
      dwPChannel: DWORD;         // Performance Channel. The Performance can
                                 // use this to determine the port/channel.
      dwVirtualTrackID: DWORD;   // virtual track ID
      pTool: IDirectMusicTool;   // tool class pointer
      pGraph: IDirectMusicGraph; // tool graph class pointer
      dwType: DWORD;             // PMSG type (see DMUS_PM_TYPE defines)
      punkUser: IUnknown;        // user com pointer, auto released upon PMSG free

      mtDuration: TMUSIC_TIME;   // duration
      wMusicValue: WORD;         // Description of note in chord and key.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -