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
handle | The MIDI stream handle.
|
quality | The 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.
The default setting is 0 (linear interpolation). Changes can be made at any time, but the effect of changes during playback will not be heard instantaneously due to buffering.
Platform-specific
On Android and iOS, sinc interpolation requires a NEON supporting CPU. Sinc interpolation is not available on Windows CE. 16 point sinc interpolation is only available on Windows/macOS/Linux and requires an SSE2 supporting CPU.
See also
BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ATTRIB_SRC