High pass filter limited to -55dB

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

High pass filter limited to -55dB


Regarding the code below, someone have an idea why I have this limit
of -55dB in low frequencies?

See the frequency response on image available in: https://ibb.co/cgwOqG

Detail: if I use a crest factor of 12dB instead 6dB, I donĀ“t have this problem.

pkg load signal;
pkg load ltfat;

sampling_rate = 44100;
lenght = 30;
hpf = 400;
lpf = 4000;
crest_factor = 6;

typenoise = noise((lenght)*sampling_rate, 1, 'pink');
[b,a] = butter(2, [hpf/(sampling_rate/2), lpf/(sampling_rate/2)]);
filtered = filter(b, a, typenoise);
filtered = filtered / (rms(filtered) / 10^(-crest_factor/20));
audiowrite ('signal.wav', filtered, 44100);

Best regards,

Help-octave mailing list
[hidden email]