[PD] bandpass makeup gain formula?

Miller Puckette msp at ucsd.edu
Sun Mar 8 20:57:45 CET 2020


> 
> Measuring vcf~ with a Q of 5 and noise~ I do get different results
> depending on the center frequency. For 100Hz the filter output is
> 26dBRMS softer than its input signal, at 1000Hz it is 16dBRMS softer,
> and at 10000Hz it is 5dB softer. Raising the Q to 15 softenes all three
> levels accordingly.
>  
Aha - yes, my (Q+!) fix aims to allow changing Q without much affecting
the perceived loudness, but doesn't account for varying the center
frequency.

To loudness-balance filtered white noise, you'd want to aim to get the
same signal power as the noise has in a one-bark-wide band.  Above 500Hz
this increases linearly with frequency.  So you'd want a 10-dB increase
in the signal for a 10x increase in center frequency.  However, for frequencies
below 500hz you'd want the result to be roughly independent of center
frequency.  So what you're seeing looks OK except that it should be corrected
below 500 Hz.

OTOH if you want to balance with the whole of the white-spectrum noise (not
just the slice that's in your local bark) then you have to go look at
equal-loudness coutours (since in that case we're comparing loudnesses of
sounds at different frequencies).  At that point I just give up and use my
ears :)

> > Me, I use Q+1 to normalize filtered white noise.  
> Is that the way how you do it in vcf~'s code or how you would do it to
> normalize after bp~?
> 
That's how I normalize in the patch.  Example (but ignore the Hilbert stuff):

http://msp.ucsd.edu/syllabi/171.20w/patches/7.e.graphing-resonant-filter.pd

> > But theory would suggest
> > the output power should be proportional to bandwidth (= f/Q) - with the
> > bandwidth limited to Nyquist frequency - so one would divide by
> > sqrt(min(f/Q, SR/2)) . I'll stick with multiplying by Q+1 for myself :)
> I can't seem to get around the fact that sqrt(f/Q) changes with center
> frequency, and Q+1 does not. Is that part of the simplification???
> 
> Shouldn't the bandwidth of the filter let the same signal enery pass
> regardless of center frequency?
> 
Yeah, depends on whether you want to match power ( roughly dividing by
sqrt(f/Q) for "reasonable" f/Q values) or "sound good" (as I think Q+1 does
fairly well).

Also, the result for white noise isn't necessarily representative of what you
get filtering real signals - all sorts of things happen then.

cheers
Miller
> Sorry if I skipped this part of my DSP classes...
> 
> thanks!
> P
> 
> 
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list