auSavePluginPreset(string,string,string)

Syntax

auSavePluginPreset(string,string,string)

Example

dim = BUFFER_SIZE*AUDIO_OUTPUT_CHANNELS
outputBuffer = memarray('float', dim)
stretch = OUTPUT_W/(dim-1)
zeroOffset = OUTPUT_H/4

function setup()
 // a simple sine oscillator
 gaWave(GA_SINE,220)
 
 // add two AU plugin in cascade
 auAddPlugin("Apple: AUGraphicEQ")
 auAddPlugin("Apple: AUDistortion")
 
 // init the buffer
 for i = 0, dim - 1 do
 outputBuffer[i] = 0.0 
 end
 
end

function update()
 gaWaveVolume(0,0.2)
 
 for i = 0, dim - 1 do
 outputBuffer[i] = gaGetOutputBuffer(i) 
 end
 
end

function draw()
 gaBackground(0.0,0.9)
 
 ofTranslate(0,OUTPUT_H/2,0)
 // draw Audio Scope
 ofSetColor(255)
 ofNoFill()
 ofBeginShape()
 for i = 0, dim - 1 do
 ofVertex(i* stretch, outputBuffer[i] * zeroOffset)
 end
 ofEndShape(false)
 
end

function keyReleased()
 if gaKey() == string.byte('s') then
 auSavePluginPreset("Apple: AUDistortion",gaDataPath(""),"distorsion")
 end
end

Description

Save a .aupreset file of the specified AU Plugin, at the specified path with the specified name.

Parameters

string,string,string