electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Filters
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
lorddust



Joined: Sep 01, 2006
Posts: 6
Location: VA

PostPosted: Fri Sep 01, 2006 3:02 pm    Post subject: Filters
Subject description: understanding filters.
Reply with quote  Mark this post and the followings unread

I'm new to sound engineering, does anyone know of a site that can explain the ChucK filters and how to get diffrent effects from them in plain english?

i've been trying to do some noise canceling and muffleling but have been generally unsuccessful.
Back to top
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Fri Sep 01, 2006 4:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

hello Embarassed " .. i'm very new to DSP.
so i'm reading some DSP books now.
(i love math.. i love looking at math.. but i'm too lazy to calculate them all myself..
lots of sigmas give me a heardache lol..)

so maybe we can share about filter. i'm starting to study it.
i'm such a filter end-user.. Embarassed

this might help us:
The Scientist and Engineer's Guide to Digital Signal Processing
website: http://www.dspguide.com/pdfbook.htm

peace.
- kijjaz
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Fri Sep 01, 2006 4:43 pm    Post subject: Re: Filters
Subject description: understanding filters.
Reply with quote  Mark this post and the followings unread

lorddust wrote:
I'm new to sound engineering, does anyone know of a site that can explain the ChucK filters and how to get diffrent effects from them in plain english?

Welcome!

We would highly recommend joining [chuck] and perhaps [chuck-users] for additional support, if you are interested. We love this forum - many thanks to Kassen! Nonetheless, the mailing lists provides all with a different way to reach each other with key announcements and surveys and dicussions, and helps us developers to reach out too. ChucK is rapidly growing and evolving. Join up, if you are interested in anything ChucKian:

http://chuck.cs.princeton.edu/community/

There has been a few threads on controlling filters in ChucK, but probably not many posted with non-technical explanations.

The first thread begins here:
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-July/000764.html

... with explanations here:
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-July/000769.html
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-July/000773.html

These are still not as user-friendly as they could be, and probably the reason is that currently, ChucK offers many fundamental filters, such as BiQuad, OnePole, TwoPole, PoleZero, etc, but most of these require some basic understanding of filters and filter design to use effectively.

For the next release (1.2.0.7), there will be about 8-10 new out-of-the-box filters which offers more user-friendly interfaces. Some of these are already implemented and in CVS.

For now, we can try to deconstruct one of the examples:

http://chuck.cs.princeton.edu/doc/examples/basic/wind.ck

Code:
// noise generator, biquad filter, dac (audio output)
noise n => biquad f => dac;

Sets up the signal processing chain. We are connecting the output of an 'noise', which generates white noise, to a biquad filter, and then to the dac.

The biquad is a wonderfully useful filter. For now, just remember a biquad allows you to place a resonance (think of it as a peak at a particular frequency) and a anti-resonance (a notch or zero at a potentially different frequency). Furthermore, for the resonance or anti-resonance, you can control its "strength" or "sharpness" by setting its radius.

Code:
// set biquad pole radius
.99 => f.prad;

As the comment says, this line sets the pole radius (abbreviated to prad) for f, our biquad. The pole radius determines how "strong" the resonance is. The closer it is to 1, the sharper the resonance/peak at the center frequency, and more of the surrounding will be attenuated. At pole radius equal to 1, the filter becomes a resonator at the center frequency (output will be a sine wave). If the pole radius is greater than 1, then the filter is unstable and can explode.

Code:
// set biquad gain
.05 => f.gain;

Reduce the gain on the filter to avoid clipping and for volume control.

Code:
// set equal gain zeros
1 => f.eqzs;

This puts the 'zeroes', parameters associated with the anti-resonance, at special places and serves to to keep the filter gain under control independent of the center frequency.

Code:
// our float
0.0 => float t;

// infinite time-loop
while( true )
{
    // sweep the filter resonant frequency
    100.0 + std.fabs(math.sin(t)) * 1000.0 => f.pfreq;

set up loop. the very last line above updates the pole frequency (pfreq) of the filter. the range in this case is from 100 to 1100 hz.

Code:
    t + .01 => t;

add to our 't' variable

Code:
    // advance time
    100::ms => now;

advance time until we want to update something

Code:
}

close the thing.

So, what we have here is the basic idea behind subtractive synthesis, which takes a signal rich in spectral content (white noise statistically have equal energy at all frequencies), and subtract/carve things away (in this case using our biquad), leaving the signal we hear.

I hope this helps. I am not sure if my explanation is very clear. Please ask questions.

Last edited by ge on Fri Sep 01, 2006 11:05 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Fri Sep 01, 2006 4:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

great resource to learn about filters:

http://ccrma.stanford.edu/~jos/filters/
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Sep 02, 2006 9:56 am    Post subject: Reply with quote  Mark this post and the followings unread

It might also be interesting to point out that ChucK borrows a lot from the "STK" by Perry Cook and Gary Scavone. Perry wrote about that one in this book which is quite interesting; http://www.cs.princeton.edu/~prc/AKPetersBook.htm

The good news is that it's written in a nice and friendly tone and covers the exact filters that are currently in ChucK. The bad is that even then it's quite hard to understand how it all works....

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Sun Sep 03, 2006 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

great thread!

when is the next version, sounds immanent Laughing

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Mon Sep 04, 2006 2:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

majutsu wrote:
when is the next version

Hi Brian! Hopefully this will happen in the next few weeks.
We are still adding and testing features and ugen's.
As things get to a nice, semi-stable point, we will be releasin'. Shocked
Back to top
View user's profile Send private message Visit poster's website
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Tue Sep 05, 2006 4:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

what a great link on filters!!

hey, ge, off-topic, but you seem likely to get your phD in 2007. What do you think will happen with ChucK after graduation? What do you think the community will do?

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
ge



Joined: Aug 13, 2006
Posts: 108
Location: Palo Alto, CA

PostPosted: Tue Sep 05, 2006 6:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

majutsu wrote:
hey, ge, off-topic, but you seem likely to get your phD in 2007. What do you think will happen with ChucK after graduation? What do you think the community will do?

I think there is a super great deal of research yet to be done with ChucK and friends. We all hope to continue working on it. The community has been invaluable and totally supportive from the beginning, and we'd love to keep that going. We hope to open things up more (plug-in, import libraries) so that the community can more easily develop stuff. There is the audicle (which at some point we hope to make distributed), the miniAudicle, and many visualization possibilities. The language itself also is far from complete, obviously. So, you see, this is only the beginning to a bigger disaster. Shocked

As for me, I hope to graduate next year. I aim to eventually be in academia (CS and/or music) teaching, doing computer music research, and hopefully some composition and performance. At the same time, I really wouldn't mind staying at Princeton for a while longer working with Perry and the many other wonderful folks here, and try to take things to the next catastrophic level. Either way, I'll be chuckin' real hard.

Sorry for this long response. huh huh. I guess the short answer is that we (developers + community) plan to keep on chuckin', too.
Back to top
View user's profile Send private message Visit poster's website
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Mon Oct 23, 2006 5:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

chapter 8 of this book by miller puckette
http://crca.ucsd.edu/~msp/techniques.htm
is the greatest thing on filters i've ever read. it starts with the curious fact that filters are just delay networks!! and goes through every filter down to the math level if you wish. it's crystal clear even with just high-school trigonometry and algebra. i recommend it highly!

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use