BASS_ATTRIB_MIDI_SRC attribute

The sample rate conversion quality of a MIDI stream's samples.

BASS_ChannelSetAttribute(
    DWORD handle,
    BASS_ATTRIB_MIDI_SRC,
    float quality
);

Parameters

handleThe MIDI stream handle.
qualityThe sample rate conversion quality... -1 = non-interpolated, 0 = linear interpolation, 1 = 8 point sinc interpolation, 2 = 16 point sinc interpolation.

Remarks

The samples in a soundfont will usually need to be played at rates that are different to their original rates. This attribute determines how that is done. The linear interpolation option uses less CPU, but the sinc interpolation gives better sound quality (less aliasing), with the quality and CPU usage increasing with the number of points. Sinc interpolation is only available with an SSE2 or NEON supporting CPU.

The default setting is 0 (linear interpolation). Changes can be made at any time, but the effect of changes during playback may not be heard immediately due to buffering.

See also

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ATTRIB_SRC