Csound Csound-dev Csound-tekno Search About

[Csnd] I want to build my own equalizer

Date2012-11-15 22:42
FromCacophony7
Subject[Csnd] I want to build my own equalizer
Is an equalizer made out of bandpass filters?



--
View this message in context: http://csound.1045644.n5.nabble.com/I-want-to-build-my-own-equalizer-tp5718015.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-11-15 22:48
FromVictor Lazzarini
SubjectRe: [Csnd] I want to build my own equalizer
yes, but possibly you might want to use a certain type of bandpass filter that is designed for eq work.
Try eqfil.

I showed an example here last week.

Victor
On 15 Nov 2012, at 22:42, Cacophony7 wrote:

> Is an equalizer made out of bandpass filters?
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/I-want-to-build-my-own-equalizer-tp5718015.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2012-11-16 10:25
FromAnders Genell
SubjectRe: [Csnd] I want to build my own equalizer
So you did, and I remain very grateful!
This is the example referred to:

Victor wrote:
Here's a 1/3-octave graphic equaliser with user-defined number of bands.
It uses a function table to define the gains for each band. 

opcode Eq, a, aiipp
as1,ifreq,itab,ibnd,icnt xin
inxtf = ifreq*2^(1/3)
if (icnt >= ibnd) goto bank
if (inxtf > sr/2) goto bank
as1 Eq as1,inxtf,itab,ibnd,icnt+1
bank:
kgain table ibnd-icnt, itab
ibw = ifreq/1.5
as1 eqfil as1, ifreq, ibw, kgain
xout as1
endop


instr 1
ilowest = 100
imaxbands = 24
itab ftgen 0,0,32,-7,1,10,0.5,10,1,4,1
a1 diskin2 "jarrettm.wav",1
a2 Eq a1,ilowest,itab,imaxbands
outs a2,a2
endin


> yes, but possibly you might want to use a certain type of bandpass filter that is designed for eq work.
> Try eqfil.
> 
> I showed an example here last week.
> 
> 


Date2012-11-16 17:20
FromAdam Puckett
SubjectRe: [Csnd] I want to build my own equalizer
Great example of recursion! I had never seen it done that way. If I
remember correctly from my programming class, doesn't the base case
usually go first?

Very interesting!

On 11/16/12, Anders Genell  wrote:
> So you did, and I remain very grateful!
> This is the example referred to:
>
> Victor wrote:
> Here's a 1/3-octave graphic equaliser with user-defined number of bands.
> It uses a function table to define the gains for each band.
>
> opcode Eq, a, aiipp
> as1,ifreq,itab,ibnd,icnt xin
> inxtf = ifreq*2^(1/3)
> if (icnt >= ibnd) goto bank
> if (inxtf > sr/2) goto bank
> as1 Eq as1,inxtf,itab,ibnd,icnt+1
> bank:
> kgain table ibnd-icnt, itab
> ibw = ifreq/1.5
> as1 eqfil as1, ifreq, ibw, kgain
> xout as1
> endop
>
>
> instr 1
> ilowest = 100
> imaxbands = 24
> itab ftgen 0,0,32,-7,1,10,0.5,10,1,4,1
> a1 diskin2 "jarrettm.wav",1
> a2 Eq a1,ilowest,itab,imaxbands
> outs a2,a2
> endin
>
>
>> yes, but possibly you might want to use a certain type of bandpass filter
>> that is designed for eq work.
>> Try eqfil.
>>
>> I showed an example here last week.
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>

Date2012-11-16 17:26
FromRory Walsh
SubjectRe: [Csnd] I want to build my own equalizer
Check out Victor's vocoder UDO. Another nice example of recursion.

On 16 November 2012 17:20, Adam Puckett  wrote:
> Great example of recursion! I had never seen it done that way. If I
> remember correctly from my programming class, doesn't the base case
> usually go first?
>
> Very interesting!
>
> On 11/16/12, Anders Genell  wrote:
>> So you did, and I remain very grateful!
>> This is the example referred to:
>>
>> Victor wrote:
>> Here's a 1/3-octave graphic equaliser with user-defined number of bands.
>> It uses a function table to define the gains for each band.
>>
>> opcode Eq, a, aiipp
>> as1,ifreq,itab,ibnd,icnt xin
>> inxtf = ifreq*2^(1/3)
>> if (icnt >= ibnd) goto bank
>> if (inxtf > sr/2) goto bank
>> as1 Eq as1,inxtf,itab,ibnd,icnt+1
>> bank:
>> kgain table ibnd-icnt, itab
>> ibw = ifreq/1.5
>> as1 eqfil as1, ifreq, ibw, kgain
>> xout as1
>> endop
>>
>>
>> instr 1
>> ilowest = 100
>> imaxbands = 24
>> itab ftgen 0,0,32,-7,1,10,0.5,10,1,4,1
>> a1 diskin2 "jarrettm.wav",1
>> a2 Eq a1,ilowest,itab,imaxbands
>> outs a2,a2
>> endin
>>
>>
>>> yes, but possibly you might want to use a certain type of bandpass filter
>>> that is designed for eq work.
>>> Try eqfil.
>>>
>>> I showed an example here last week.
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2012-11-16 17:57
FromJustin Smith
SubjectRe: [Csnd] I want to build my own equalizer
By doing the goto in case of the end condition, you avoid doing extraneous jumps in the usual case.

This kind of recursion makes me wonder if tail recursion could ever work in csound? With this method you increase the call stack size linearly with the number of eq channels, with tail recursion it could remain constant. 


On Fri, Nov 16, 2012 at 9:20 AM, Adam Puckett <adotsdothmusic@gmail.com> wrote:
Great example of recursion! I had never seen it done that way. If I
remember correctly from my programming class, doesn't the base case
usually go first?

Very interesting!

On 11/16/12, Anders Genell <anders.genell@gmail.com> wrote:
> So you did, and I remain very grateful!
> This is the example referred to:
>
> Victor wrote:
> Here's a 1/3-octave graphic equaliser with user-defined number of bands.
> It uses a function table to define the gains for each band.
>
> opcode Eq, a, aiipp
> as1,ifreq,itab,ibnd,icnt xin
> inxtf = ifreq*2^(1/3)
> if (icnt >= ibnd) goto bank
> if (inxtf > sr/2) goto bank
> as1 Eq as1,inxtf,itab,ibnd,icnt+1
> bank:
> kgain table ibnd-icnt, itab
> ibw = ifreq/1.5
> as1 eqfil as1, ifreq, ibw, kgain
> xout as1
> endop
>
>
> instr 1
> ilowest = 100
> imaxbands = 24
> itab ftgen 0,0,32,-7,1,10,0.5,10,1,4,1
> a1 diskin2 "jarrettm.wav",1
> a2 Eq a1,ilowest,itab,imaxbands
> outs a2,a2
> endin
>
>
>> yes, but possibly you might want to use a certain type of bandpass filter
>> that is designed for eq work.
>> Try eqfil.
>>
>> I showed an example here last week.
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-03 07:48
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] I want to build my own equalizer
This is a nice instrument/UDO Victor.  Thanks for creating and sharing it.

Rick


On Fri, Nov 16, 2012 at 5:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
opcode Eq, a, aiipp
as1,ifreq,itab,ibnd,icnt xin
inxtf = ifreq*2^(1/3)
if (icnt >= ibnd) goto bank
if (inxtf > sr/2) goto bank
as1 Eq as1,inxtf,itab,ibnd,icnt+1
bank:
kgain table ibnd-icnt, itab
ibw = ifreq/1.5
as1 eqfil as1, ifreq, ibw, kgain
xout as1
endop


instr 1
ilowest = 100
imaxbands = 24
itab ftgen 0,0,32,-7,1,10,0.5,10,1,4,1
a1 diskin2 "jarrettm.wav",1
a2 Eq a1,ilowest,itab,imaxbands
outs a2,a2
endin



Dr. Richard Boulanger, Ph.D.   

Professor of Electronic Production and Design

Professional Writing and Music Technology Division

Office @ 161 Mass Ave - 4th Floor

617-747-2485 (office)  774-488-9166 (cell)

http://csounds.com/boulanger     http://csounds.com/mathews

http://boulangerlabs.com    http://csoundforlive.com   http://csounds.com