📄 dmusicf.h
字号:
)
// <orth-ck>
prth
(
<DMUS_IO_STYLEPART>
)
// <note-ck>
'note'
(
// sizeof DMUS_IO_STYLENOTE:DWORD
<DMUS_IO_STYLENOTE>...
)
// <crve-ck>
'crve'
(
// sizeof DMUS_IO_STYLECURVE:DWORD
<DMUS_IO_STYLECURVE>...
)
// <mrkr-ck>
'mrkr'
(
// sizeof DMUS_IO_STYLEMARKER:DWORD
<DMUS_IO_STYLEMARKER>...
)
// <rsln-ck>
'rsln'
(
// sizeof DMUS_IO_STYLERESOLUTION:DWORD
<DMUS_IO_STYLERESOLUTION>...
)
// <anpn-ck>
'anpn'
(
// sizeof DMUS_IO_STYLE_ANTICIPATION:DWORD
<DMUS_IO_STYLE_ANTICIPATION>...
)
// <pttn-list>
LIST
(
'pttn'
<ptnh-ck> // Pattern header chunk
<rhtm-ck> // Chunk containing an array of rhythms for chord matching
[<UNFO-list>] // Name, author, copyright info., comments
[<mtfs-ck>] // Motif settings chunk
[<DMBD-form>] // Optional band to be associated with the pattern (for motifs)
<pref-list>... // Array of part reference id's
)
// <ptnh-ck>
ptnh
(
<DMUS_IO_PATTERN>
)
// <rhtm-ck>
'rhtm'
(
// DWORD's representing rhythms for chord matching based on number
// of measures in the pattern
)
// pref-list
LIST
(
'pref'
<prfc-ck> // part ref chunk
)
// <prfc-ck>
prfc
(
<DMUS_IO_PARTREF>
)
// <mtfs-ck>
mtfs
(
<DMUS_IO_MOTIFSETTINGS>
)
// <prrf-list>
LIST
(
'prrf'
<DMRF-list>... // Array of Chordmap references
)
*/
/* Pattern chunk, for use in Pattern tracks */
#define DMUS_FOURCC_PATTERN_FORM mmioFOURCC('D','M','P','T')
/*
RIFF
(
'DMPT' // Pattern
<styh-ck> // Style header chunk
<pttn-list> // The pattern, in single pattern format (includes DMUS_FOURCC_PART_LIST chunks)
)
*/
/* Chord and command file formats */
/* These specify possible values for DMUS_IO_COMMAND.bRepeatMode (dx8) */
typedef enum enumDMUS_PATTERNT_TYPES
{
DMUS_PATTERNT_RANDOM = 0, /* Play randomly. (dx7 behavior) */
DMUS_PATTERNT_REPEAT = 1, /* Repeat last pattern. */
DMUS_PATTERNT_SEQUENTIAL = 2, /* Play sequential starting with first matching pattern. */
DMUS_PATTERNT_RANDOM_START = 3, /* Play sequential starting with a random pattern. */
DMUS_PATTERNT_NO_REPEAT = 4, /* Play randomly, but don't play the same pattern twice. */
DMUS_PATTERNT_RANDOM_ROW = 5 /* Play randomly as a row: don't repeat any pattern until all have played. */
} DMUS_PATTERNT_TYPES;
#define DMUS_FOURCC_CHORDTRACK_LIST mmioFOURCC('c','o','r','d')
#define DMUS_FOURCC_CHORDTRACKHEADER_CHUNK mmioFOURCC('c','r','d','h')
#define DMUS_FOURCC_CHORDTRACKBODY_CHUNK mmioFOURCC('c','r','d','b')
#define DMUS_FOURCC_COMMANDTRACK_CHUNK mmioFOURCC('c','m','n','d')
typedef struct _DMUS_IO_CHORD
{
WCHAR wszName[16]; /* Name of the chord */
MUSIC_TIME mtTime; /* Time of this chord */
WORD wMeasure; /* Measure this falls on */
BYTE bBeat; /* Beat this falls on */
BYTE bFlags; /* Various flags */
} DMUS_IO_CHORD;
typedef struct _DMUS_IO_SUBCHORD
{
DWORD dwChordPattern; /* Notes in the subchord */
DWORD dwScalePattern; /* Notes in the scale */
DWORD dwInversionPoints; /* Where inversions can occur */
DWORD dwLevels; /* Which levels are supported by this subchord */
BYTE bChordRoot; /* Root of the subchord */
BYTE bScaleRoot; /* Root of the scale */
} DMUS_IO_SUBCHORD;
typedef struct _DMUS_IO_COMMAND
{
MUSIC_TIME mtTime; /* Time of this command */
WORD wMeasure; /* Measure this falls on */
BYTE bBeat; /* Beat this falls on */
BYTE bCommand; /* Command type (see #defines below) */
BYTE bGrooveLevel; /* Groove level (0 if command is not a groove) */
BYTE bGrooveRange; /* Groove range */
BYTE bRepeatMode; /* Used to control selection of patterns with same groove level */
} DMUS_IO_COMMAND;
/*
// <cord-list>
LIST
(
'cord'
<crdh-ck>
<crdb-ck> // Chord body chunk
)
// <crdh-ck>
crdh
(
// Scale: dword (upper 8 bits for root, lower 24 for scale)
)
// <crdb-ck>
crdb
(
// sizeof DMUS_IO_CHORD:dword
<DMUS_IO_CHORD>
// # of DMUS_IO_SUBCHORDS:dword
// sizeof DMUS_IO_SUBCHORDS:dword
// a number of <DMUS_IO_SUBCHORD>
)
// <cmnd-list>
'cmnd'
(
//sizeof DMUS_IO_COMMAND: DWORD
<DMUS_IO_COMMAND>...
)
*/
/* File io for DirectMusic Tool and ToolGraph objects
*/
/* RIFF ids: */
#define DMUS_FOURCC_TOOLGRAPH_FORM mmioFOURCC('D','M','T','G')
#define DMUS_FOURCC_TOOL_LIST mmioFOURCC('t','o','l','l')
#define DMUS_FOURCC_TOOL_FORM mmioFOURCC('D','M','T','L')
#define DMUS_FOURCC_TOOL_CHUNK mmioFOURCC('t','o','l','h')
/* io structures: */
typedef struct _DMUS_IO_TOOL_HEADER
{
GUID guidClassID; /* Class id of tool. */
long lIndex; /* Position in graph. */
DWORD cPChannels; /* Number of items in channels array. */
FOURCC ckid; /* chunk ID of tool's data chunk if 0 fccType valid. */
FOURCC fccType; /* list type if NULL ckid valid. */
DWORD dwPChannels[1]; /* Array of PChannels, size determined by cPChannels. */
} DMUS_IO_TOOL_HEADER;
/*
RIFF
(
'DMTG' // DirectMusic ToolGraph chunk
[<guid-ck>] // GUID for ToolGraph
[<vers-ck>] // Optional version info
[<UNFO-list>] // Name, author, copyright info., comments
<toll-list> // List of Tools
)
// <guid-ck>
'guid'
(
<GUID>
)
// <vers-ck>
vers
(
<DMUS_IO_VERSION>
)
// <toll-list>
LIST
(
'toll' // Array of tools
<DMTL-form>... // Each tool is encapsulated in a RIFF chunk
)
// <DMTL-form> Tools are embedded in a graph. Theoretically, they can be saved as individual files too.
RIFF
(
'DMTL'
<tolh-ck>
[<data>] // Tool data. Must be a RIFF readable chunk.
)
// <tolh-ck> // Tool header chunk
(
'tolh'
<DMUS_IO_TOOL_HEADER> // Tool header
)
*/
/* The AudioPath file carries everything for describing a specific audio path,
including Tool Graph and Buffer Descriptor.
This can even be used for configuring a complete performance.
*/
#define DMUS_FOURCC_AUDIOPATH_FORM mmioFOURCC('D','M','A','P')
/*
RIFF
(
'DMAP' // DirectMusic AudioPath chunk
[<guid-ck>] // GUID for this Audio Path configuration
[<vers-ck>] // Optional version info
[<UNFO-list>] // Name, author, copyright info., comments
[<DMTG-form>] // Optional ToolGraph
[<pcsl-list>] // Optional list of port configurations
[<dbfl-list>]...// Optional array of Dsound buffer descriptors
)
*/
#define DMUS_FOURCC_PORTCONFIGS_LIST mmioFOURCC('p','c','s','l')
#define DMUS_FOURCC_PORTCONFIG_LIST mmioFOURCC('p','c','f','l')
#define DMUS_FOURCC_PORTCONFIG_ITEM mmioFOURCC('p','c','f','h')
#define DMUS_FOURCC_PORTPARAMS_ITEM mmioFOURCC('p','p','r','h')
#define DMUS_FOURCC_DSBUFFER_LIST mmioFOURCC('d','b','f','l')
#define DMUS_FOURCC_DSBUFFATTR_ITEM mmioFOURCC('d','d','a','h')
#define DMUS_FOURCC_PCHANNELS_LIST mmioFOURCC('p','c','h','l')
#define DMUS_FOURCC_PCHANNELS_ITEM mmioFOURCC('p','c','h','h')
typedef struct _DMUS_IO_PORTCONFIG_HEADER
{
GUID guidPort; /* GUID of requested port. */
DWORD dwPChannelBase; /* PChannel that this should start on. */
DWORD dwPChannelCount; /* How many channels. */
DWORD dwFlags; /* Various flags. */
} DMUS_IO_PORTCONFIG_HEADER;
#define DMUS_PORTCONFIGF_DRUMSON10 1 /* This port configured for drums on channel 10. */
#define DMUS_PORTCONFIGF_USEDEFAULT 2 /* Use the default port. */
/* Each portconfig has one or more pchannel to buffer mappings. Each buffer
is identified by a guid. Each pchannel can map to one or more buffers.
This is defined with one or more DMUS_IO_PCHANNELTOBUFFER_HEADER
structures. Each defines a range of PChannels and the set of buffers
that they connect to.
*/
typedef struct _DMUS_IO_PCHANNELTOBUFFER_HEADER
{
DWORD dwPChannelBase; /* PChannel that this should start on. */
DWORD dwPChannelCount; /* How many PChannels. */
DWORD dwBufferCount; /* How many buffers do these connect to. */
DWORD dwFlags; /* Various flags. Currently reserved for future use. Must be 0. */
} DMUS_IO_PCHANNELTOBUFFER_HEADER;
/* Each buffer is represented by an DSBC form. This is wrapped by the
DMUS_IO_BUFFER_ATTRIBUTES_HEADER which identifies how to use the
buffer. In particular, it indicates whether this gets dynamically duplicated
or all references to this should share the same instance.
To resolve references, the unique GUID of the buffer is also stored
in this structure.
*/
typedef struct _DMUS_IO_BUFFER_ATTRIBUTES_HEADER
{
GUID guidBufferID; /* Each buffer config has a unique ID. */
DWORD dwFlags; /* Various flags. */
} DMUS_IO_BUFFER_ATTRIBUTES_HEADER;
/* DMUS_IO_BUFFER_ATTRIBUTES_HEADER.dwFlags: */
#define DMUS_BUFFERF_SHARED 1 /* Share this with other audio paths, instead of creating unique copies. */
#define DMUS_BUFFERF_DEFINED 2 /* Use one of the standard predefined buffers (see GUID_Buffer... in dmusici.h.) */
#define DMUS_BUFFERF_MIXIN 8 /* This is a mixin buffer. */
/*
LIST
(
'pcsl' // Array of port configurations
<pcfl-list>... // One or more port configurations, each in a list chunk
)
LIST
(
'pcfl' // List container for one port configuration.
<pcfh-ck> // Portconfig header chunk.
<pprh-ck> // Port params, to be used to create the port.
[<dbfl-list>]...// Optional array of Dsound buffer descriptors
[<pchl-list>] // Optional list of pchannel to buffer assignments
)
// <pcfh-ck> // Port config header chunk
(
'pcfh'
<DMUS_IO_PORTCONFIG_HEADER> // Port config header
)
// <pprh-ck> // Port params header chunk
(
'pprh'
<DMUS_PORTPARAMS8> // Port params header
)
LIST
(
'pchl' // List container for one or more pchannel to buffer assignments.
<pchh-ck>... // One or more pchannel to buffer assignment headers and data.
// <pchh-ck>
(
'pchh'
<DMUS_IO_PCHANNELTOBUFFER_HEADER> // Description of PChannels
<GUID>... // Array of GUIDs defining the buffers they all connect to.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -