次の方法で共有


DMUS_IO_STYLEPART

The DMUS_IO_STYLEPART structure contains information about a musical part. Used in the Style Form.

Syntax

typedef struct _DMUS_IO_STYLEPART {
  DMUS_IO_TIMESIG  timeSig;
  DWORD    dwVariationChoices[32];
  GUID     guidPartID;
  WORD     wNbrMeasures;
  BYTE     bPlayModeFlags;
  BYTE     bInvertUpper;
  BYTE     bInvertLower;
  BYTE     bPad[3];
  DWORD    dwFlags;
} DMUS_IO_STYLEPART;

Members

timeSig

DMUS_IO_TIMESIG structure containing a time signature to override the style's default time signature.

dwVariationChoices

Each element corresponds to one of 32 possible variations. The flags set in each element indicate which types of chord are supported by that variation (see Remarks). One of the mode masks is also set to indicate whether the variations are in DirectMusic or IMA mode.

The following flags are defined as shown.

Value Description
DMUS_VARIATIONF_MAJOR Seven positions in the scale for major chords.
DMUS_VARIATIONF_MINOR Seven positions in the scale for minor chords.
DMUS_VARIATIONF_OTHER Seven positions in the scale for other chords.
DMUS_VARIATIONF_ROOT_SCALE Handles chord roots in the scale.
DMUS_VARIATIONF_ROOT_FLAT Handles flat chord roots (based on scale notes).
DMUS_VARIATIONF_ROOT_SHARP Handles sharp chord roots (based on scale notes).
DMUS_VARIATIONF_TYPE_TRIAD Handles simple chords for triads.
DMUS_VARIATIONF_TYPE_6AND7 Handles simple chords for 6 and 7.
DMUS_VARIATIONF_TYPE_COMPLEX Handles complex chords.
DMUS_VARIATIONF_DEST_TO1 Handles transitions to the 1 chord.
DMUS_VARIATIONF_DEST_TO5 Handles transitions to the 5 chord.
DMUS_VARIATIONF_MODES Mode mask. Obsolete.
DMUS_VARIATIONF_MODES_EX Mode mask.
DMUS_VARIATIONF_IMA25_MODE Mode mask. If (dwVariationChoices & DMUS_VARIATIONF_MODES_EX) == DMUS_VARIATIONF_IMA25_MODE, the variations are in Interactive Music Architecture mode.
DMUS_VARIATIONF_DMUS_MODE Mode mask. If dwVariationChoices contains this mask, the variations are in DirectMusic mode. All variations authored in DirectMusic Producer use this mode.

guidPartID

Unique identifier of the part.

wNbrMeasures

Length of the part, in measures.

bPlayModeFlags

Flags to define the play mode. For a list of values, see DMUS_PLAYMODE_FLAGS.

bInvertUpper

Upper limit of inversion.

bInvertLower

Lower limit of inversion.

bPad

Unused.

dwFlags

Flags that specify the behavior of the part. Can include the values shown in the following table.

Value Description
DMUS_PARTF_USE_MARKERS Part uses marker events.
DMUS_PARTF_ALIGN_CHORDS Part is allowed to switch only on chord-aligned markers.

Remarks

The flags in dwVariationChoices determine the types of chords supported by a given variation in DirectMusic mode. The first seven flags (bits 1 through 7) are set if the variation supports major chords rooted in scale positions. For example, 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 for minor chords, and the following seven flags serve the same purpose for chords that are not major or minor (for example, 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) must be set. Bits 25, 26, and 27 handle chords that are triads, sixth or seventh chords, and chords with extensions, respectively. Bits 28 and 29 handle chords that are followed by tonic and dominant chords, respectively.

Requirements

**  Header:** Dmusicf.h

See Also

© 2004 Microsoft Corporation. All rights reserved.