[Scilab-users] Plotting properties of digital audio filters

Rafael Guerra jrafaelbguerra at hotmail.com
Fri Dec 11 14:50:38 CET 2015


Hi,

Would unwrapping the phase before plotting fix your phase issues?

Regards,
Rafael

-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of fred_audio_dsp
Sent: Friday, December 11, 2015 12:10 PM
To: users at lists.scilab.org
Subject: [Scilab-users] Plotting properties of digital audio filters

Hi,

With an interest in the under-documented properties of digital filters as
implemented in DAW software, I set out to capture the impulse response of
some of the built-in filters of the Pro Tools software.

Using scilab, I take the FFT of an impulse response, in order to get an idea
of the magnitude and phase responses of the filters.

My code is as follows:

[impulse,sr,fmt]=sfread("test.1.aif")
A=fft(impulse)

A=A(1:(size(A,"*")/2)) // Remove symmetric second half from FFT
N=size(A,"*")
f=([1:N]')*((sr/2)/N) // Frequency vector - note: all my recorded responses
are 1s long

db=20*log10(abs(A))
phi=(atan(imag(A),real(A)))*180/%pi

plot2d("ln",f,db)
plot2d("ln",f,phi)



The magnitude response plots work out nicely, though in the phase response
plots I get unexpected behaviour. E.g. for a low pass filter
(24dB/oct at 1kHz), oscillation between -180°-0°-180° above a certain
frequency, or for a peak filter (-2db at 200Hz, Q=1), a frequency response that
drops off to -180° as the frequency tends to Nyquist.

I am not well versed enough in DSP to solve this problem on my own, and
would like to ask for your suggestions as to how I could get the expected
frequency plots from this experiment.

Kind regards,

Frederik




--
View this message in context: http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




More information about the users mailing list