[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Signal PKG] limited slope
From: |
Renato S. Yamane |
Subject: |
[Signal PKG] limited slope |
Date: |
Thu, 14 Dec 2017 08:39:08 +0100 |
Hi,
Regarding the code below, someone have an idea why I have this limit
in low frequencies?
Please, see the frequency response on image available in: https://ibb.co/cgwOqG
Detail: when 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