MidiTrackSet

QWORD WINAPI MidiTrackSet
(
	HANDLE hSequence, 
	WORD wTrack, 
	DWORD dwWhat, 
	QWORD qwValue
);

This function sets properties of a track.

Parameters

Return values

Returns the previous value of the track property or BRELS_ERROR (0xFFFFFFFFFFFFFFFF) if an error occurred. The reasons for an error are an invalid sequence handle, an invalid track index, an invalid property constant or an invalid property value.

Remarks

The following table lists the properties you can set using MidiTrackSet:

ConstantProperty
CURRENT_EVENTIndex of the event of track to be played
TRACK_MUTEIf set to TRUE, notes will not be played in the track
TRACK_INDEXIndex of the track. If you set it, the tracks of the involved indexes change places

The following example toggles the muted state of a track:

Example

BOOL ToggleMute(HANDLE Sequence, WORD wTrack)
{
	BOOL Previous;

	Previous = MidiTrackGet(Sequence, wTrack, TRACK_MUTE);
	MidiTrackSet(Sequence, wTrack, TRACK_MUTE, !Previous);

	return Previous;
};

Further information

Released in November 19th, 2003
Updated in April 29th, 2004
Property of Breno de Lima Sarmento
Home page: http://www27.brinkster.com/brels
E-mail: [email protected]
ICQ: 78977999 ()