API to learn names of current mapping of Bank/Program to names

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
Posts: 1
Joined: December 19, 2016 - 22:38
API to learn names of current mapping of Bank/Program to names

Does anyone know if VirtualMIDISynth.dll, bass.dll, or bassmidi.dll expose API so that a host app can learn which programs/instruments are loaded into each bank/program?
If not, does it expose API so that a host app can learn which SoundFont files are currently loaded, so we could come up with the mapping ourselves?

Thanks!
Tom

Posts: 1972
Joined: March 25, 2012 - 01:19
Re: API to learn names of current mapping of Bank/Program to names

The info you need (and VMS2 shows into soundfonts list item details) can be read with bassmidi.dll:
http://www.un4seen.com/doc/#bassmidi/BASS_MIDI_FontGetInfo.html

Accessing these info through VMS is not so easy because:

  • VMS1 is a usermode DLL, loaded into MIDI client process space by winmm.dll (Windows MIDI interface) so you can't easily access bassmidi.dll functions directly because you haven't loaded it directly.
  • suppose you can get BASS_MIDI_FontGetInfo address through GetProcAddress() call: this is valid only if your user selected VMS as output device and not, i.e., Microsoft Synth
  • you could load bassmidi.dll (and so bass.dll) by yourself, but this will work only with VMS2 where driver and synth (that loads BASS stuff) components are in two distinct processes; VMS2 won't load BASS into your process so you're free to do it and load any BASS version. VMS1 instead will load BASS (through winmm.dll) into your process space nd this will lead to DLL-hell VMS2 is going to avoid.

That said, I think that the beas way for you to get this info is to have a separate utility (.exe) that loads bassmidi.dll, parses the given *.sf2 file and returns the required info; your software could then run this utility and parse its output.