What is the default value of ugenPluginsPath?

I’m trying to add a path to the default value, but I can’t seem to find where it’s defined.
Is there a way to ask the server what the value is ? If not, on linux, what is the default value ?

To put it another way - an option to scsynth is:

-U <ugen-plugins-path>
          A list of paths separated by `:`.
          If specified, standard paths are NOT searched for plugins.

What are the “standard paths” and what could I pass to the process to mimic the existing behavior ?


In the SC IDE, evaluate Platform.systemExtensionDir and Platform.userExtensionDir.

1 Like

Thanks! I see both of those are populated.
However, if I set

s.options.ugenPluginsPath = [ Platform.systemExtensionDir, Platform.userExtensionDir];

I get a number of errors similar to:

exception in GraphDef_Recv: UGen 'Control' not installed.

essentially telling me that there is some other directory that I’m missing. Is there any other path that I can include, or is there a way to look up the location a UGen was loaded from ?

(FWIW, after some searching, it looks like it was in “/usr/lib64/SuperCollider/plugins/”, but I’d love a way to identify that programmatically.)

Ah, you also have to add the path where the core plugins are installed. On Windows, that would be something like C:/Program Files/SuperCollider-3.12.1/plugins. On macOS, it’s likely somewhere in the app bundle. On Linux I think it’s in /share/supercollider. You would have to check yourself.

It would be convenient to have a Platform method to retrieve the core plugin folder… Or even better: a method to return an Array of standard UGen search paths, so you can simply append your own paths. Feel free to open a ticket on GitHub.

Cool thanks - I figured something like that existed, but if it doesn’t I’ll add a ticket. Thanks!


localPluginsDirectory="env | grep LOCAL_PLUGINS_DIRECTORY | cut -f2 -d=".unixCmdGetStdOut.replace("\n","");
systemPluginsDirectory="env | grep SYSTEM_PLUGINS_DIRECTORY | cut -f2 -d=".unixCmdGetStdOut.replace("\n","");
s.options.ugenPluginsPath = [ systemPluginsDirectory, localPluginsDirectory];

and that seems to work for the time being. Obviously more programmatic is good, but that’ll work as well.