QWORD WINAPI MidiTrackSet ( HANDLE hSequence, WORD wTrack, DWORD dwWhat, QWORD qwValue );
This function sets properties of a track.
QWORD
valueReturns 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.
The following table lists the properties you can set using MidiTrackSet:
Constant | Property |
CURRENT_EVENT | Index of the event of track to be played |
TRACK_MUTE | If set to TRUE , notes will not be played in the track |
TRACK_INDEX | Index 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:
BOOL ToggleMute(HANDLE Sequence, WORD wTrack) { BOOL Previous; Previous = MidiTrackGet(Sequence, wTrack, TRACK_MUTE); MidiTrackSet(Sequence, wTrack, TRACK_MUTE, !Previous); return Previous; };
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 ()