BASS_CONFIG_MIDI_VOICES config option
The maximum number of samples to play at a time.
BASS_SetConfig(
BASS_CONFIG_MIDI_VOICES,
DWORD voices
);
Parameters
voices | Maximum number of samples to play at a time.
|
Remarks
This setting determines the maximum number of samples that can play together in a single MIDI stream. This is not necessarily the same thing as the maximum number of notes, due to presets possibly containing multiple layered samples, ie. multiple samples may be played for a single note. When the voice limit is hit, the voice with the lowest volume level will be killed, which will usually be one that is already fading out following a note release.
The more voices that are used, the more CPU that is required. So this option can be used to restrict that, for example on a lower spec system. The BASS_ATTRIB_MIDI_CPU attribute can also be used to limit CPU usage.
The default setting is 100. Changes only affect subsequently created MIDI streams, not any that already exist. The voice limit of an existing MIDI stream can be changed via the BASS_ATTRIB_MIDI_VOICES attribute.
Platform-specific
On Android and iOS, the default setting is 40.
See also
BASS_MIDI_StreamCreateFile, BASS_ATTRIB_MIDI_CPU, BASS_ATTRIB_MIDI_VOICES
BASS_GetConfig, BASS_SetConfig