Found it! The answer is (in case anyone else is needing this):
BASS_VST_SetProgram(vstHandle, MAKEWORD(BankNumber, PatchNumber));
Excellent!
Hi,
Sorry to say, but it's not a general solution. It may have worked with your particular VSTi plugin but with other plugins it will not.
First I would like to discuss some misconceptions:
In case BASS_VST_SetProgram 'Program' means a VST program that is completely unrelated to Midi programs/program change messages. BASS_VST_SetProgram also works in case of effect plugins where program can mean any effect presets etc.The same is true for VSTi plugins: a VST Program can mean any kind of presets. In case of VSTi plugins that mimic real hardware you should send Bank Select messages to change banks and then a Program Change message to slect an instrument from the selected bank. According to Midi specification a single Bank Select message should not do anything without a Program Change message.
E.g If you try this Yamaha plugin you will notice that it has only 1 VST program. But you can access all XG banks by sending Bank Select and Program Change messages:
https://veg.by/en/projects/syxg50/In case of Bass VST you can send Bank Select MSB with:
BASS_VST_ProcessEvent(vstHandle, channel, MIDI_EVENT_BANK, BankNumber);
Bank Select LSB with:
BASS_VST_ProcessEvent(vstHandle, channel, MIDI_EVENT_BANK_LSB, BankNumber);
And Program Change message with:
BASS_VST_ProcessEvent(vstHandle, channel, MIDI_EVENT_PROGRAM, ProgramNumber);
So to select e.g XG machine gun instrument in case of S-YXG50 you should call:
BASS_VST_ProcessEvent(vstHandle, 0, MIDI_EVENT_BANK, 64);
BASS_VST_ProcessEvent(vstHandle, 0, MIDI_EVENT_PROGRAM, 112);