周期性声音的所有谐波是否从 0 基数开始

信息处理 fft IFFT
2022-02-02 21:19:04

我一直在考虑加法合成,我想知道是否所有声音都从(理论上)第 0 阶段开始?

3个回答

在某个初始时间点,通常不会启动相位为 0 的所有谐波相关的正弦曲线。改变相位关系有助于降低峰均功率比,从而允许更高的平均音量而不会削波或超过某个峰值限制。

我没有足够的知识来评论自然界中发现的“所有声音”。但这是一个有趣的实验。使用软件生成包含基频和下一个较高的五个奇次谐波(每个都有适当的峰值幅度)的音频方波。通过扬声器播放该信号。然后让五个奇次谐波中的每一个从随机初始相位开始。生成的信号将具有截然不同的波形,随机相位信号的声音听起来与原始方波非常相似!这是一个表明人耳/大脑组合对相位失真非常宽容的实验。

我想说的是,所有谐波都以零相位开始任何单个特定时间(如 MIDI NoteOn)是不常见的。顺便说一句,要添加到 Rick Lyons 的答案,这里是一个 MATLAB 程序,它可以展示关于谐波的相位对齐您能听到和不能听到的内容。试试看。看看你能听到(或听不到)什么。

%
%   square_phase.m
%
%   a test to see if we can really hear phase changes
%   in the harmonics of a Nyquist limited square wave.
%
%   (c) 2004 rbj@audioimagination.com
%

if ~exist('Fs')
    Fs = 44100                      % sample rate, Hz
end

if ~exist('f0')
    f0 = 110.25                     % fundamental freq, Hz
end

if ~exist('tone_duration')
    tone_duration = 2.0             % seconds
end

if ~exist('change_rate')
    change_rate = 1.0               % Hz
end

if ~exist('max_harmonic')
    max_harmonic = floor((Fs/2)/f0) - 1
end  

if ~exist('amplitude_factor')
    amplitude_factor = 0.25         % this just keeps things from clipping
end

if ~exist('outFile')
    outFile = 'square_phase.wav'
end


                                  % make sure we don't uber-Nyquist anything
max_harmonic = min(max_harmonic, floor((Fs/2)/f0)-1);

t = linspace((-1/4)/f0, tone_duration-(1/4)/f0, Fs*tone_duration+1);

detune = change_rate;

x = cos(2*pi*f0*t);                  % start with 1st harmonic

n = 3;                               % continue with 3rd harmonic
while (n <= max_harmonic)
    if ((n-1) == 4*floor((n-1)/4))   % lessee if it's an "even" or "odd" term
        x = x + (1/n)*cos(2*pi*n*f0*t);
     else
        x = x - (1/n)*cos(2*pi*(n*f0+detune)*t);
        detune = -detune;       % comment this line in an see some
    end                          % funky intermediate waveforms
    n = n + 2;                   % continue with next odd harmonic
end

x = amplitude_factor*x;

% x = sin((pi/2)*x);               % toss in a little soft clipping

plot(t, x);                      % see
sound(x, Fs);                    % hear
wavwrite(x, Fs, outFile);        % remember