我的总声音持续时间为.
我将持续时间分成几个子持续时间,并且在每个子持续时间中,我通过公式生成几个离散的正弦值采样率为.
在连续的子持续时间中使用的频率是不同的。
现在,当我使用这些值(使用 matlab)生成声音时,我会在两个子持续时间相遇的点之间听到咔哒声;我想是因为不连续。如何消除这些可听见的咔嗒声?
编辑 我正在使用的代码(大致)
duration = 0.25;
sampleRate = 44100;
numberOfSamples = (duration * sampleRate);
frequency = 19000:500:21500;
freqHopSamples = [];
for j = 1:length(frequency)
startIndex = ((j-1)*(numberSubSamples) + 1);
endIndex = j*numberSubSamples;
t = (startIndex:endIndex)/sampleRate;
freqHopSamples(startIndex:endIndex) = sin(2*pi*frequency(j)*t);
end
wavwrite(freqHopSamples, sampleRate, 'sound.wav');