CLI VST Host

Hi,

I’m trying to create a vst host that essentially takes in the path to a VST and instantiates the vst so a user can play with, hear sound, etc. This is my code so far, but I’m not sure what the next steps are.

    PluginDescription desc = PluginDescription();
    desc.fileOrIdentifier = path;
    desc.pluginFormatName = "VST3";
    desc.uniqueId = 0;
    
    String msg;
    
    AudioPluginFormatManager manager = AudioPluginFormatManager();
    manager.addDefaultFormats();
    
    unique_ptr<AudioPluginInstance> pluginInstance = manager.createPluginInstance(desc, 44100.0, 512, msg);

If you plan to run a virtual instrument, you should first open the audio output device and the Midi input device(s), maybe you want to parse command line arguments to let the user select the devices, something like “-h” to list all devices, and -m to specify the Midi input by index, and -a to specify the audio output by index.

Then you should load the plugin, make sure that it initializes correctly, then you can run the processBlock() to run both audio and Midi, i.e. forward the midi input buffer to the plugin and forward the audio coming from the plugin to the open audio device.

This needs quite some work…