Csound Csound-dev Csound-tekno Search About

equalization and oscbnk

Date2006-01-29 00:04
From"Robson Cozendey"
Subjectequalization and oscbnk
Hello everyone!

Does anyone knows where I can find tutorials on parametric equalizers? I'd 
like to understand what means "Q", high shelf and low shelf, etc.

And maybe the following is a question for Istvan,
I was playing with the "oscbnk" example in the manual, which gives a 
beautiful synth strings effect, and as an habit of mine I tried to put it in 
the simplest form for better understanding it. Then I ended with the file 
below.

What I dont understand yet is why the equalization table (f-table 5) isn't 
normalized? If f-table 3 indexes f-table 5 (and sweeps it up an down) and 
the maximun frequency is given in the other "keqmaxf" parameter, f-table 5 
shouldn't be normalized to be applied the maximum frequency? What means the 
variation of f-table 5 between "1" and "32"?

Thanks in advance,
Robson

---------------------------------------




-o oscbnk.wav





/* oscbnk.orc */
/* Written by Istvan Varga */
sr	=  48000
kr	=  750
ksmps	=  64
nchnls	=  1

ga01	init 0
ga02	init 0

/* sawtooth wave */
i_	ftgen 1, 0, 16384, 7, 1, 16384, -1
/* LFO modulator for frequency and equalizer*/
i_	ftgen 3, 0, 4096, 7, 0, 512, 0.25, 512, 1, 512, 0.25, 512,	\
			     0, 512, -0.25, 512, -1, 512, -0.25, 512, 0
/* EQ */
i_	ftgen 5, 0, 1024, 5, 1, 512, 32, 512, 1

	instr 1

p3	=  p3 + 0.4

/* oscillator */

kcps =	cpspch(p4)	; note frequency
kamd = 0.0
kfmd = 0.02 * kcps	; FM depth in Hz
kpmd = 0.0
iovrlap = 80
iseed = 200
kl1minf = 0.1
kl1maxf = 0.2
kl2minf = 0
kl2maxf = 0
ilfomode = 144
keqminf = 0.0
keqmaxf = 6000
keqminl = 0.0
keqmaxl = 0.0
keqminq = 1
keqmaxq = 1
ieqmode = 2
kfn = 1
il1fn = 3
il2fn = 0
ieqffn = 5
ieqlfn = 5
ieqqfn = 5
ares oscbnk  kcps, kamd, kfmd, kpmd, iovrlap, iseed, kl1minf, kl1maxf, 
kl2minf, kl2maxf, ilfomode, \
		keqminf, keqmaxf, keqminl, keqmaxl, keqminq, keqmaxq, ieqmode, \
		kfn, il1fn, il2fn, ieqffn, ieqlfn, ieqqfn
out ares*1000
	endin


/* oscbnk.orc */







/* oscbnk.sco */
/* Written by Istvan Varga */
t 0 60

i 1 0 4 6.05
i 1 0 4 8.00
i 1 0 4 8.05
i 1 0 4 8.09

e
/* oscbnk.sco */





---------------------------------------------

_________________________________________________________________
  http://imaginemsn.com/messenger/default2.aspx?locale=pt-br

Date2006-01-29 11:06
FromIstvan Varga
SubjectRe: equalization and oscbnk
AttachmentsNone  

Date2006-01-29 11:14
FromIstvan Varga
SubjectRe: equalization and oscbnk
AttachmentsNone  

Date2006-01-29 19:52
From"Robson Cozendey"
SubjectRe: equalization and oscbnk
Thanks Istvan,
The program made everything clear.


>From: Istvan Varga 
>Reply-To: csound@lists.bath.ac.uk
>To: csound@lists.bath.ac.uk
>Subject: Re: [Csnd] equalization and oscbnk
>Date: Sun, 29 Jan 2006 12:06:39 +0100
>
>On Sunday 29 January 2006 01:04, Robson Cozendey wrote:
>
> > Does anyone knows where I can find tutorials on parametric equalizers? 
>I'd
> > like to understand what means "Q", high shelf and low shelf, etc.
>
>Peaking EQ means that the magnitude of the filter frequency response
>is 1 (0 dB) at 0 Hz and the Nyquist frequency (sr/2), while it is the level
>parameter at the center frequency (kc for pareq). In this mode, Q controls
>the bandwidth of the filter (kc / kq, a higher Q means narrower bandwidth).
>
>In low shelf mode, the magnitude is 1 at sr/2, and the level parameter (kv)
>at 0 Hz. There is resonance controlled by Q at the corner frequency if Q is
>greater than 0.7071. With kv=0 and kq=0.7071 you get a response very 
>similar
>to butterhp.
>
>High shelf mode is similar, but in this case the magnitude is 1 at 0 Hz, 
>and
>the level parameter (kv) at 0 sr/2. There is resonance controlled by Q at 
>the
>corner frequency if Q is greater than 0.7071. With kv=0 and kq=0.7071 you 
>get
>a response very similar to butterlp.
>
>Here is a CSD file that allows changing pareq parameters with a GUI in real
>time, and displays the frequency response of the filter. It should be used
>with a version of Csound 5 that was built with the FLTK plugin with 
>threading
>disabled (e.g. the latest Gogins release for Windows, or the Lazzarini 
>package
>for OS X).
>
>
>
>--displays -+rtaudio=null -o dac -b 1024 -B 2048
>
>
>sr	=  48000
>ksmps	=  32
>nchnls	=  1
>0dbfs	=  1
>
>	FLpanel "pareq", 360, 120
>
>ih1		FLvalue " ", 50, 22, 20, 90
>gkfco, ih1v	FLknob "Freq", 500, 10000, -1, 1, ih1, 60, 15, 10
>		FLsetVal_i 5000, ih1v
>ih2		FLvalue " ", 50, 22, 120, 90
>gklvl, ih2v	FLknob "Level", 0.01, 3, -1, 1, ih2, 60, 115, 10
>		FLsetVal_i 3, ih2v
>ih3		FLvalue " ", 50, 22, 220, 90
>gkQ, ih3v	FLknob "Q", 0.1, 3, -1, 1, ih3, 60, 215, 10
>		FLsetVal_i 3, ih3v
>ih4		FLvalue " ", 40, 22, 310, 90
>gkmode, ih4v	FLroller "Mode", 0, 2, 1, 0, 2, ih4, 20, 60, 320, 10
>		FLsetVal_i 2, ih4v
>
>	FLpanelEnd
>
>	FLrun
>
>	opcode pulse, a, ki
>
>	setksmps 1
>kprd, iphs	xin
>kcnt	init iphs
>aout	=  0
>kcnt	=  kcnt + 1
>	if (kcnt < kprd) kgoto cont1
>kcnt	=  0
>aout	=  1
>cont1:
>	xout aout
>
>	endop
>
>	instr 1
>
>gkmode_old	init -1
>a1		pulse 4096, 2048
>kc		port gkfco, 0.04
>kv		port gklvl, 0.04
>kq		port gkQ, 0.04
>modeChange:
>a2		pareq a1, kc, kv, kq, round(i(gkmode))
>		if (gkmode == gkmode_old) kgoto noChange
>		reinit modeChange
>		rireturn
>noChange:
>gkmode_old	=  gkmode
>		dispfft a2, 4096.01 / sr, 4096, 1
>
>	endin
>
>
>
>
>i 1 0 3600
>e
>
>
>
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

_________________________________________________________________
Você sabia que com o seu MSN Messenger você faz ligações de PC-papa- PC, 
grátis e para qualquer lugar do mundo? É só acessar   
http://imagine-msn.com/messenger/default2.aspx?locale=pt-br