[chuck-users] Filter screaming: danger to hearing

Tomasz Kaye's brain tomasz.brain at gmail.com
Sat Nov 28 15:31:41 EST 2009

I made a very crude test to see at roughly what kind of filter
settings the 'blowing up' was happening. It seems that keeping the
freq to below 10000 doesn't solve it unfortunately. With the following
code i'm varying the freq and Q of a BPF.

PulseOsc osc => BPF filter => blackhole;
100::samp => osc.period;
0 => int freqlowerbound;
10000 => int frequpperbound;
0 => int overrun;
0 => float qlowerbound;
1 => float qupperbound;

for(qlowerbound=>float k; k < qupperbound; k + 0.1 =>k) {
	qlowerbound + k => filter.Q;
	for(freqlowerbound=>int j; j < frequpperbound; j++){
		freqlowerbound + j => filter.freq;
		for(0=>int i; i < 100; i++)	{
			samp => now;
				<<< "Blowup happening: filter.freq: " + filter.freq() + "
filter.Q: " + filter.Q() >>>;
				1 => overrun;
				samp => now;
		if (overrun==1){
			// skip to the next Q value if we got a blowup at the current freq
			0 => overrun;

Here's the output I get (intel macbook, 44.1khz)

"Blowup happening: filter.freq: 2218.0000 filter.Q: 0.1000" : (string)
"Blowup happening: filter.freq: 4429.0000 filter.Q: 0.2000" : (string)
"Blowup happening: filter.freq: 6641.0000 filter.Q: 0.3000" : (string)
"Blowup happening: filter.freq: 8853.0000 filter.Q: 0.4000" : (string)

2009/11/28 Kassen <signal.automatique at gmail.com>:
> David;
>> I'm aware that this is what happens what a filter is set at a negative
>> value, and I guess from this example that the same thing happens at high
>> filter values. (Maybe the value is looping?) I've never noticed this problem
>> when the filter is keep > 0 and < 10000, so I think you can avoid it like
>> that until a fix is given. But yes, the resulting sound is always at max
>> volume.
> I believe that at least LPF can become unstable at lower frequencies (I
> still need to confirm this). Most likely the stability of the filter at
> given frequencies will also depend on the sample-rate is I'd suggest
> supplying yours when giving this kind of example. In this case 44.1K v.s.
> 48K can make a big difference, I suspect
> IMHO it would be good for these filters (LPF, BPF, etc) to confirm that the
> coefficients resulting from the requested parameters actually result in a
> stable filter.
> As a side-note, I tend to monitor through a mixer with the soundcard at full
> volume and the hardware faders down to a reasonable level and only use
> headphones directly from my laptop when on the move. Even then I will rarely
> start code I'm not sure about with headphones on. Our ears may well need to
> service us for another half century or -hopefully-  more. That's a long time
> for a precision instrument that can easily take the state of the art in
> technology to task in many regards.
> Perhaps it's not necessary to note this again but Tomasz's description of
> the blast he got scared me a bit.
> Kas.
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list