[music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Thomas Young
One for RBJ if he's back from his hols :) or anyone kind enough to answer of course... Is there a way to modify the bandpass coefficient equations in the cookbook (the one from the analogue prototype H(s) = s / (s^2 + s/Q + 1)) such that the gain of the stopband may be specified? I want to be

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Ross Bencina
On 4/01/2013 4:05 AM, Thomas Young wrote: Is there a way to modify the bandpass coefficient equations in the cookbook (the one from the analogue prototype H(s) = s / (s^2 + s/Q + 1)) such that the gain of the stopband may be specified? I want to be able I'm pretty sure that the BLT bandpass

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Nigel Redmon
The zeros are at DC and Nyquist because the numerator is s…Basically, you need to adjust the zeros based on the pole positions (both angle and Q) and the desired stop band spec. I'm not 100% sure what Thomas is after, but I suspect it's just an inversion of band reject (swap the poles and

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Nigel Redmon
Thomas—it's a matter of manipulating the A and Q relationships in the numerator and denominator of the peaking EQ analog prototypes. I'm not as good in thinking in the s domain as the z, so I'd have to plot it out and think—too busy right now, though it's pretty trivial. But just doing the gain

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Thomas Young
Thanks Nigel - I have just been playing around with the pole/zero plotter (very helpful app for visualising the problem) and thinking about it. You guys are probably right the simplest approach is just to scale the output and using the peaking filter. Additional optional mumblings: I think

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Nigel Redmon
OK, I had (well, took) time to think: You need to divide the numerator by the gain (A), and multiple the denominator by the gain (aka multiply the numerator by A^2). That will keep the peak at unity. Swap the numerator and denominator if you want the EQ to be symmetric for cut and boost. If

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Nigel Redmon
Well, you're already working with rbj's equations, so just multiple the numerator coefficients by A^2... On Jan 3, 2013, at 1:05 PM, Nigel Redmon earle...@earlevel.com wrote: OK, I had (well, took) time to think: You need to divide the numerator by the gain (A), and multiple the

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Nigel Redmon
Glad I read this again—brain thought one thing, and fingers typed another—multiply the denominator by A^2, not numerator. Oh, and for cut…it depends on if you want symmetrical response or not, but if you do, just swap a and b coefficients (yes, after multiplying by the A^2 factor so it ends up

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Nigel Redmon
sigh…hopefully my last post on this… Sorry, I looked at rbi's peak spec and it is symmetrical—I was thinking of his shelving filters, which need to be inverted for symmetry. So just multiply the denominator coefficients by A^2 and you're done. On Jan 3, 2013, at 2:02 PM, Nigel Redmon

Re: [music-dsp] Lerping Biquad coefficients to a flat response

2013-01-03 Thread Ross Bencina
Hi Thomas, Replying to both of your messages at once... On 4/01/2013 4:34 AM, Thomas Young wrote: However I was hoping to avoid scaling the output since if I have to do that then I might as well just change the wet/dry mix with the original signal for essentially the same effect and less