Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>@Dave Gamble nailed it, but I wanted to add a few things on VST shell plugins, since they are a bit tricky to work with.</p> <p>To determine if a VST is a shell plugin, send the <code>effGetPlugCategory</code> opcode to the plugin dispatcher. If it returns <code>kPlugCategShell</code>, then it's a shell plugin. To get the list of sub-plugins in the shell, you basically call <code>effShellGetNextPlugin</code> until it returns 0. Example code snippit (adapted from a <a href="http://github.com/teragonaudio/MrsWatson/" rel="nofollow">working VST host</a>):</p> <pre><code>// All this stuff should probably be set up far earlier in your code... // This assumes that you have already opened the plugin and called VSTPluginMain() typedef VstIntPtr (*Vst2xPluginDispatcherFunc)(AEffect *effect, VstInt32 opCode, VstInt32 index, VstIntPtr value, void *ptr, float opt); Vst2xPluginDispatcherFunc dispatcher; AEffect* plugin; char nameBuffer[40]; while(true) { memset(nameBuffer, 0, 40); VstInt32 shellPluginId = dispatcher(pluginHandle, effShellGetNextPlugin, 0, 0, nameBuffer, 0.0f); if(shellPluginId == 0 || nameBuffer[0] == '\0') { break; } else { // Do something with the name and ID } } </code></pre> <p>If you actually want to load a plugin in a VST shell, it's a bit trickier. First, your host needs to handle the <code>audioMasterCurrentId</code> opcode in the host callback. When you call the VST's <code>VSTPluginMain()</code> method to instantiate the plugin, it will call the host callback with this opcode and ask for the unique ID which should be loaded.</p> <p>Because this callback is made <em>before</em> the main function returns (and hence, before it delivers an <code>AEffect*</code> to your host), that means that you probably will need to store the shell plugin ID to load in a global variable, since you will not be able to save a pointer to any meaningful data in <code>void* user</code> field of the <code>AEffect</code> struct in time for it to be passed back to you in the host callback.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload