通过选择要在下面使用的不同invfnorm变量,我可以使用以下代码段创建粉色、棕色、蓝色音频噪声,但是如何创建灰色噪声?
%https://en.wikipedia.org/wiki/Colors_of_noise
mean_amp=mean(yamp_orig.^2); %get mean of all freq amplitudes
amt_of_freq=size(xfreq_orig,1); %number of freq
%invfnorm=1./[1:amt_of_freq]; % 1/f creates pink noise
%invfnorm=[1:amt_of_freq]; % f creates blue noise
invfnorm=1./[1:amt_of_freq].^2; % 1/f^2 creates brown noise
amp_1f_new=sqrt(mean_amp*invfnorm/sum(invfnorm))(:); %new noise amplitudes to use
在链接https://en.wikipedia.org/wiki/Colors_of_noise
中,他们给出了粉色、棕色、蓝色音频噪声的公式,但对于灰色噪声,他们只是说它是“倒置的 A 加权曲线”,没有显示公式,我只需要公式。见下面的光谱。
我获得这些信息的网站位于此处灰色噪音
Ps:我使用的是类似于matlab的Octave 4.2.2