[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
High pass filter limited to -55dB
From: |
Renato S. Yamane |
Subject: |
High pass filter limited to -55dB |
Date: |
Sun, 10 Dec 2017 16:44:04 +0100 |
Hi,
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,
Renato