BASS_ATTRIB_MIDI_VOL attribute

The mix level of a MIDI stream.

BASS_ChannelSetAttribute(
    HSTREAM handle,
    BASS_ATTRIB_MIDI_VOL,
    float volume
);

Parameters

handleThe MIDI stream handle.
volumeThe volume level... 0 = silent, 1.0 = normal/default, above 1.0 = amplification.

Remarks

The volume curve used by this attribute is always linear, eg. 0.5 = 50%. The BASS_CONFIG_CURVE_VOL config option setting has no effect on this.

During playback, the effect of changes to this attribute are not heard instantaneously, due to buffering. This latency can be reduced via the BASS_ATTRIB_BUFFER attribute.

This attribute differs from the BASS_ATTRIB_VOL attribute in that it changes the level of the generated data, not just playback of it. It can be useful for reducing the level to prevent clipping/distortion.

See also

BASS_MIDI_StreamEvent, BASS_ATTRIB_MIDI_TRACK_VOL

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ChannelSlideAttribute