DMUS_IO_STYLENOTE

DirectMusic

Microsoft DirectX 9.0 SDK Update (Summer 2004)

DMUS_IO_STYLENOTE

The DMUS_IO_STYLENOTE structure contains information about a note in a style. Used in the Style Form.

Syntax

typedef struct _DMUS_IO_STYLENOTE {
  MUSIC_TIME  mtGridStart;
  DWORD   dwVariation;
  MUSIC_TIME  mtDuration; 
  short   nTimeOffset;
  WORD    wMusicValue; 
  BYTE    bVelocity;
  BYTE    bTimeRange;
  BYTE    bDurRange;
  BYTE    bVelRange; 
  BYTE    bInversionID;
  BYTE    bPlayModeFlags; 
  BYTE    bNoteFlags;
} DMUS_IO_STYLENOTE;

Members

mtGridStart

Offset, in grids, at which the note occurs.

dwVariation

Variations that this note belongs to. Each bit corresponds to one of 32 variations.

mtDuration

Duration of the note.

nTimeOffset

Time after mtGridStart at which the event occurs. See the Remarks for DMUS_IO_STYLE_ANTICIPATION.

wMusicValue

Position in the scale.

bVelocity

Note velocity.

bTimeRange

Range within which to randomize start time. See Remarks.

bDurRange

Range within which to randomize duration. See Remarks.

bVelRange

Range within which to randomize velocity.

bInversionID

Identifier of inversion group to which this note belongs.

bPlayModeFlags

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

bNoteFlags

Flags. See DMUS_NOTEF_FLAGS.

Remarks

The values in bTimeRange and bDurRange are converted to music time when the note is played, using the following function:

int StoredRangeToActualRange(BYTE bRange)
{
  int nResult = 0;
  if (0 <= bRange && bRange <= 190)
  {
    nResult = bRange;
  }
  else if (191 <= bRange && bRange <= 212)
  {
    nResult = ((bRange - 190) * 5) + 190;
  }
  else if (213 <= bRange && bRange <= 232)
  {
    nResult = ((bRange - 212) * 10) + 300;
  }
  else // bRange > 232
  {
    nResult = ((bRange - 232) * 50) + 500;
  }
  return nResult;
}

Requirements

  Header: Declared in dmusicf.h.

See Also


© 2004 Microsoft Corporation. All rights reserved.