Hello,
I am trying to use an EQ to be able to process an incoming live signal from a record deck and apply an curve which approximates RIAA de-emphasis (i.e. to change a phono signal to line input). I’ve tried both MultiEQ and StaticEQ, with the code below
SynthDef(\kernelEncodeDecode, {arg buffer;
var out, src, encode;
// live stereo source signal from phono input
src = SoundIn.ar(0!2);
// RIAA de-emphasis (if no phono preamp on audio interface)
riaa = StaticEQ.new(src, \loshelf, 141, 18, 0.143, \loshelf, 445, 2, 0.143, \hishelf, 2213, -0.9, 0.143, \hishelf, 6214, -18, 0.143);
// encode to ambisonic using ambisonic encoder
encode = FoaEncode.ar(riaa, encoder);
// decode using the chosen decoder (binaural/quad/octo/5.1)
out = FoaDecode.ar(encode, decoder);
Out.ar(0, out);
}).add;
I was hoping that the EQ worked in the same way as a transform in that the first variable (‘src’) is run through the EQ and then returned as a new signal (‘riaa’) but I am getting a series of errors resulting in
ERROR: Convolution2 arg: ‘in’ has bad input: a StaticEQ
Can anyone see where I am going wrong here? I’ve also tried using four separate instances of BEQSuite, like this:
src = BLowShelf.new(src, 141, 0.143, 18);
src = BLowShelf.new(src, 445, 0.143, 2);
src = BHiShelf.new(src, 2213, 0.143, -0.9);
riaa = BHiShelf.new(src, 6214, 0.143, -18);
…but get the same result. If I comment out the EQ, everything works fine and I can add transformations and reverbs using the same method. Am I not understanding how the EQs work or how the input signal needs to be defined?
Any help much appreciated!