shithub: sox

Download patch

ref: 1a1ec5d9c9a575e328367284b3a8911cdf9746a5
parent: 717f94fbd57743f0fd33c30b25c08d9e715423b8
author: Ulrich Klauer <ulrich@chirlu.de>
date: Tue Dec 27 17:21:44 EST 2011

Increase resolution for gnuplot plots of biquad filters

Set gnuplot horizontal resolution for biquad filter response plots to 250.
Default value is 100, this often results in edged plots.

This also makes it more obvious to the user what to change if the
resolution still isn't sufficient.

--- a/src/biquad.c
+++ b/src/biquad.c
@@ -109,6 +109,7 @@
       "o=2*pi/Fs\n"
       "H(f)=sqrt((b0*b0+b1*b1+b2*b2+2.*(b0*b1+b1*b2)*cos(f*o)+2.*(b0*b2)*cos(2.*f*o))/(1.+a1*a1+a2*a2+2.*(a1+a1*a2)*cos(f*o)+2.*a2*cos(2.*f*o)))\n"
       "set logscale x\n"
+      "set samples 250\n"
       "set grid xtics ytics\n"
       "set key off\n"
       "plot [f=10:Fs/2] [-35:25] 20*log10(H(f))\n"