AudioSpec


Inherits from: Object : Spec


An audio spec specifies that the input should be an audio signal, or that an output will be an audio signal.


See Spec


AudioSpec(numChannels)


Inputs with an AudioSpec are expecting an audio rate player.  eg. filters and effects that take an audio input.


Here is an effect patch that specifies that it takes a stereo input (for the 'input' arg) and produces a stereo output.


Patch({ arg input,ffreq;

RLPF.ar(input,ffreq)

},[

AudioSpec(2), // input

ControlSpec(200,13000,\exp,default:10000)

],

AudioSpec(2) // output

);




*new (numChannels)

numChannels -The number of channels your input requires. Default value is 1. This can also be nil which expresses that your Instr will multi-channel expand if given more than one channel. 



defaultControl

Its default control is a PlayerInputProxy which is a placeholder.  It will play silently, but it will also

allow you to compile the patch's synth def and will create an audio input.

// inline example

g = AudioSpec(2).defaultControl;

g.numChannels.postln;

g.spec.postln;