rsc3/doc-schelp/HelpSource/Classes/MidEQ.schelp

84 lines
1.2 KiB
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
class:: MidEQ
summary:: Parametric filter.
categories:: UGens>Filters>Linear
Description::
Attenuates or boosts a frequency band.
classmethods::
method::ar, kr
argument::in
The input signal.
argument::freq
Center frequency of the band in Hertz.
argument::rq
The reciprocal of Q (bandwidth / cutoffFreq).
argument::db
Amount of boost (db > 0) or attenuation (db < 0) of the
frequency band.
argument::mul
Output will be multiplied by this value.
argument::add
This value will be added to the output.
Examples::
code::
// mixer parametric eq as wahwah
{ MidEQ.ar(Saw.ar(200,0.2), FSinOsc.kr(1, 0, 24, 84).midicps, 0.3, 12) }.play
// notch filter
(
{ var in;
in = PinkNoise.ar(0.2) + SinOsc.ar(600, 0, 0.1);
MidEQ.ar(in, SinOsc.kr(0.2, 0.5pi) * 2 + 600, 0.01, -24)
}.play
)
/////
// first start the synth
(
x = {| freq=400, db=0, rq=0.1 |
var in;
in = SinOsc.ar([ 400, 420 ], 0, 0.4);
MidEQ.ar(in, freq, Lag.kr(rq, 0.3), db)
}.play
)
// now play with its parameters to hear how the filter affects two frequencies
// that are very close to each other
x.set(\db, -12)
x.set(\rq, 0.1)
x.set(\rq, 0.03)
x.set(\freq, 410)
x.set(\freq, 420)
x.set(\freq, 400)
x.set(\freq, 500)
::