MATLAB audioplayer 导致线性调频信号产生“喀哒声”
我使用以下命令在 MATLAB 中创建“chirp”信号。
Fs = 22050;
dt = 1/Fs;
tmax = 10;
t= 0:dt:tmax; % 10 second @ 22.5kHz sample rate
f0=50;f1=1000; % Start at 50Hz, go up to 1kHz
audio = chirp(t,f0,tmax,f1);
当我使用 MATLAB 中的音频播放器播放音频信号时,我会听到周期性的“咔哒”声。
p = audioplayer(audio, Fs);
play(p)
是线性调频信号的生成还是播放的问题?
我并不真正需要完美的播放,只是想确保鸣响良好并且数据中没有“喀哒声”。
I am creating a 'chirp' signal in MATLAB, using the following command.
Fs = 22050;
dt = 1/Fs;
tmax = 10;
t= 0:dt:tmax; % 10 second @ 22.5kHz sample rate
f0=50;f1=1000; % Start at 50Hz, go up to 1kHz
audio = chirp(t,f0,tmax,f1);
When I play the audio signal using the audio player in MATLAB, I hear periodic 'clicks'.
p = audioplayer(audio, Fs);
play(p)
Is it a problem with generation of the chirp signal or the playback?
I don't really need the playback to be perfect, just want to ensure that the chirp is fine and doesn't have the 'clicks' in the data.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无论如何,我也获得了点击次数(大约 5-6 次,间隔均匀)。我正在运行 OS X 10.6 MBP (2008) 和 MATLAB R1010b。然而,我认为这个问题与硬件有关(而且很烦人。我不知道我的声卡有问题),因为其他几个让它干净地运行。
至于你的线性调频信号的质量,没有任何问题。频谱和声谱图显示得很干净,如果喀哒声是由信号引起的,您会看到尖锐的峰值和超过 1000Hz 的显着贡献。
频谱
频谱图
(动态范围为 140 dB)
For what its worth, I too got the clicks (about 5-6 of them, spaced evenly). I'm running OS X 10.6 MBP (2008) and MATLAB R1010b. However, I think the issue is hardware related (and annoying. I didn't know my sound card had issues) as several other got it to run cleanly.
As for the quality of your chirp signal, there's nothing wrong with it. The frequency spectrum and the spectrogram come out clean, and if the clicks were due to the signal, you'd see sharp peaks and significant contributions beyond 1000Hz.
Frequency spectrum
Spectrogram
(dynamic range is 140 dB)
我注意到潜在的问题:
当您的机器重播时,信号未正确标准化,
它以 MAX16 进行剪辑,无论用于保存信号的格式
被重放。
信号有一些尖锐的不连续性,当循环时会出现这种不连续性
烦人的点击声。通常在最终值和第一个值之间
信号的。
I see to potential issues:
the signal is not properly normalized when replayed by you machine,
it clips at MAX16 which ever the format used to save the signal to
be replayed.
the signal has some sharp discontinuity which when looped introduced
the annoying click. Typically between the end value and the first one
of the signal.