The volume level of a track in a MIDI stream.
BASS_ChannelSetAttribute(
HSTREAM handle,
BASS_ATTRIB_MIDI_TRACK_VOL + track,
float volume
);
| handle | The MIDI stream handle. |
| track | The track to set the volume of... 0 = first track. |
| volume | The volume level... 0 = silent, 1.0 = normal/default, above 1.0 = amplification. |
Changes can be made at any time, but the effect of changes during playback may not be heard instantaneously due to buffering.
This attribute can also be used to count the number of tracks in a MIDI file stream. MIDI streams created via BASS_MIDI_StreamCreate do not have any tracks.
int tracks = 0;
float dummy;
while (BASS_ChannelGetAttribute(handle, BASS_ATTRIB_MIDI_TRACK_VOL + tracks, &dummy))
tracks++;
BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ChannelSlideAttribute