Skip to content

Instantly share code, notes, and snippets.

@carltesta
Created December 12, 2020 14:55
Show Gist options
  • Save carltesta/1e7035df092468690941c44880333c6d to your computer and use it in GitHub Desktop.
Save carltesta/1e7035df092468690941c44880333c6d to your computer and use it in GitHub Desktop.
//Run Aalto in SuperCollider
//with VSTPlugin
//https://git.iem.at/pd/vstplugin/-/releases
(
SynthDef(\aalto, { arg bus;
ReplaceOut.ar(bus, VSTPlugin.ar(nil, 2, id: \aalto));
}).add;
)
~aalto = VSTPluginController(Synth(\aalto, [\bus, 0]));
~aalto.open("Aalto", editor: true, verbose: true);
~aalto.editor;
~aalto.get(0, {|f|f.postln;})
(
Pdef(\aalto,
Pbind(
\type, \vst_midi,
\vst, ~aalto,
\midicmd, \noteOn,
\chan, 0,
\scale, Scale.minor,
\octave, Prand([3,4,5],inf),
\degree, Pwhite(0,7,inf),
//\midinote, Pseq([60,61,62,63,64,65,66,67],inf),
\dur, 0.25,
));
)
Pdef(\aalto).play(quant: 1);
Pdef(\aalto).stop;
//when done, free the resources!
~aalto.close;
@azhadsyed
Copy link

azhadsyed commented Feb 6, 2021

Question: does the file path to Aalto get specified in this code? Or is the path to Aalto implicitly defined somewhere else in the server runtime?

@carltesta
Copy link
Author

Question: does the file path to Aalto get specified in this code? Or is the path to Aalto implicitly defined somewhere else in the server runtime?

You can run VSTPlugin.search; to get a list of currently installed plugins and then use the name listed for the plugin in VSTPluginController with the .open command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment