[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Signal PKG] limited slope

From: Robert T. Short
Subject: Re: [Signal PKG] limited slope
Date: Sun, 17 Dec 2017 09:48:39 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 12/16/2017 06:25 AM, Renato S. Yamane wrote:
2017-12-15 16:34 GMT+01:00 Robert T. Short <address@hidden>:
On 12/15/2017 12:27 AM, Renato S. Yamane wrote:
2017-12-14 20:25 GMT+01:00 Robert T. Short
On 12/13/2017 11:39 PM, Renato S. Yamane wrote:
Please, see the frequency response on image available in:

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);

I don't get the same spectral plots you show here.  My results are much
like your "expected" slope.

Can you tell me how you plot it? Just to be possible I make the same
check here in my side...

Well, I used a Welch's method estimator to get the spectral density.  I used
a Hamming window, but just about any window should do.  I didn't use any
overlap.  There is such an estimator as part of octave.  Then I just plotted
it.  I did a semilogx just like you did and only for frequencies > 1Hz.
Sorry, but can you help me with this "coding" that you did?

Have a good day,

[Tn,f] = pwelch(typenoise, hamming(2^12));
[Fn,f] = pwelch(filtered, hamming(2^12));

idx = f>0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]