Supercollider 3 + Quarks = Au Plugins

Posting this for anyone with OSX and time, interested in making AU Plugins with a plethora of academically written code, for sound.

Please note the linux and windows versions of SC3 do not currently support VST or LADSPA or DSSI

For a couple weeks I was looking into this then 2 weeks ago I started trying to make one, I got stuck trying to figure out something probably rather simple, >>>how to wrap the Ugen MoogFF ‘Moog VCF implementation, designed by Federico Fontana’

and I haven’t gone back to it yet until just now.

This needs Xcode, namely Rez I believe, and of course SuperCollider 3 + Quarks with AudioUnitBuilder installed
if you download:
SuperCollider3.3.1-with-extras
from this page:
http://supercollider.sourceforge.net/downloads/

after installation + optional installs, there is a readme.rtf with where to put the Quarks, and what to do:

1) To install for one user move the quarks directory to ~/Library/Application Support/SuperCollider. To install for all users, move the quarks directory to /Library/Application Support/SuperCollider.  

type and run Quarks.gui (cmd+d) and it will bring the installer listing. Also, someone wrote to only install the Quarks you intend on using, as the Quarks may possibly complicate each other.

This doesn’t really work yet:

  
  
( var name, func, specs, componentType, componentSubtype, builder;  
  
name = "Moog_Vcf-007"; // name of your plugin  
func = {  
 |freq, gain, reset|  
  
 var filterout, in;  
  
 in = Mix.new(AudioIn.ar([1])); //Input from AU host  
  
 filterout = MoogFF.ar(in, freq, gain, reset);  
  
  
 Out.ar(0, Pan2.ar(Mix.new(filterout)));//Output to AU host  
};  
  
specs = #[   
 [0, 100, \Linear, 50, \Generic], //in  
 [0, 100, \Linear, 50, \Generic], //freq  
 [8, 1000, \Linear, 0.5, \Hertz], //gain  
 [2, 0.0, \Linear, 0.0, \Boolean], //reset  
];   
  
  
  
  
componentType = \aufx;  
  
  
  
componentSubtype = \FLTE;   
  
  
builder = AudioUnitBuilder.new(name, componentSubtype, func, specs, componentType);  
builder.makeInstall;  
  
  
)  
  

but,

if you have Quarks setup right, you can run this code, and it will make the AU component, it will also be recognized by Renoise, if everything goes right.
Also, Be. Careful.
All of this, especially SC3 can get very extraordinarily break your equipment loud,
if not careful.

So be careful.

output looks like this after proper compile:

Created ~/Library/Audio/Plug-Ins/Components/Moog_Vcf-007.component  
an AudioUnitBuilder  

During the compile, scsynth with all the sc classes being called and such is wrapped.

From what I can tell with the above code I do not have the input/output setup correctly and the parameters are well goofed up. :)

There is a huge amount of these Ugens like 250+, on top of those, even more can be used for Control, like envelope types, triggers, counters, gates, lags, decays.

With this component once I get it working right, I want to mess it all up to make a plugin described here: a meta-lfo device array paired with a filter array scheme that spreads syncable control envelopes onto more syncable control envelopes onto the filter’s variables.
So I can do truly nutty stuff from the pattern commands, without a huge dsp chain in the dsp lane. :)

I’ll probably give this a try soon. Making plugins is such an amazing hassle that I’ve completely given up on the idea of ever completing one. I understand Max/Msp and PD so I usually just route midi from Renoise to them or make sounds and import them to Renoise. It was really cool of Cycling74 to just completely abandon Pluggo and go exclusive with Ablefuk. Anyways, thanks man.

Sounds like you have a great start!

the above code is quite a bit from this:

( var name, func, specs, componentType, componentSubtype, builder;  
  
name = "Decimator"; // name of your plugin  
func = {  
 | sampleRate, bitRate|  
  
 var decOut, in;  
  
 in = AudioIn.ar([1]); //Input from AU host  
  
 decOut = Decimator.ar(in, sampleRate , bitRate);  
  
  
 Out.ar(0, decOut);//Output to AU host  
};  
  
specs = #[   
 [0, 20000 , \Linear, 10000,\Hertz] ,  
 [0, 16 , \Linear, 8,\Indexed]   
];   
  
  
  
  
componentType = \aufx;  
  
  
  
componentSubtype = \DECI;   
  
  
builder = AudioUnitBuilder.new(name, componentSubtype,func, specs, componentType);  
  
  
  
  
builder.makeInstall;   
  
)  

I don’t think it ^ works though, because I get the same issues with the Moog_Vcf-00X I’m working on.

I got LPF.ar to work. It has artifacts happening in it, that I’m not sure how to get rid of yet, but it works! :)

( var name, func, specs, componentType, componentSubtype, builder;  
  
name = "LowPassFilter"; // name of your plugin  
func = {  
 |freq|  
  
 var lowpassfilterout, in;  
  
 in = AudioIn.ar([1]); //Input from AU host  
  
 lowpassfilterout = LPF.ar(in, freq);  
  
  
 Out.ar(0, Pan2.ar(Mix.new(lowpassfilterout)));//Output to AU host  
};  
  
specs = #[   
 [20.00, 1000.00, \Logarithmic, 40, \Hertz], //freq  
];   
  
  
  
  
componentType = \aufx;  
  
  
  
componentSubtype = \FLTL;   
  
  
builder = AudioUnitBuilder.new(name, componentSubtype, func, specs, componentType);  
builder.makeInstall;  
  
  
)  

I might have to make some tea or coffee. :)

This one is a comb filter using CombC (Comb filter with Cubic interpolation)

Having trouble figuring out how to remove the source as it’s getting mixed in to the output,
it sounds good, but would sound so good without the source.

( var name, func, specs, componentType, componentSubtype, builder;  
  
name = "CombCubic"; // name of your plugin  
func = {  
 |delaytime, decaytime|  
  
 var combout, in;  
  
 in = AudioIn.ar([1]); //Input from AU host  
  
 combout = CombC.ar(in, 0.01, delaytime, decaytime, 0.5);  
  
  
 Out.ar(0, Pan2.ar(Mix.new(combout)));//Output to AU host  
};  
  
specs = #[  
 [0.001, 0.0015, \Linear, 0.001, \Seconds], //delaytime  
 [0.0001, 2, \Linear, 1.75, \Seconds] //decaytime  
  
];   
  
  
  
  
componentType = \aufx;  
  
  
  
componentSubtype = \COMC;   
  
  
builder = AudioUnitBuilder.new(name, componentSubtype, func, specs, componentType);  
builder.makeInstall;  
  
  
)  

Linked some lfo metadevices to this Comb filter, listened to it for about an hour and here is what I was listening to:
http://soundcloud.com/iissaacc-haze/combing-the-atmosphere