Hi oF!
I’ve made an addon which makes it super-easy to use Audio Units in your oF apps. It comes with a handful of examples which walk you through what Audio Units are, how to access them, how to hook them up to each other and how to mess with them. Here’s a demonstration of all of the bundled examples:
The syntax is quite simple. Here’s how you would create an Audio Unit chain with a sampler hooked up to a distortion unit, a reverb unit and a mixer.
// ofxAudioUnits are constructed with a description. These
// descriptions are explained in the first example.
ofxAudioUnit sampler = ofxAudioUnit(kAudioUnitType_MusicDevice, kAudioUnitSubType_Sampler);
ofxAudioUnit distortion = ofxAudioUnit(kAudioUnitType_Effect, kAudioUnitSubType_Distortion);
ofxAudioUnit reverb = ofxAudioUnit(kAudioUnitType_Effect, kAudioUnitSubType_MatrixReverb);
ofxAudioUnitMixer mixer;
ofxAudioUnitOutput output;
// Hook them all up.
sampler.connectTo(distortion).connectTo(reverb).connectTo(mixer).connectTo(output);
// Start making sound
output.start();
// Show the sampler's UI in a pop-up window
sampler.showUI();
Here it is on github : http://github.com/admsyn/ofxAudioUnit
A direct download link : http://github.com/admsyn/ofxAudioUnit/zipball/master