MATLAB audioplayer 导致线性调频信号产生“喀哒声”

发布于 2024-10-30 20:54:07 字数 446 浏览 2 评论 0原文

我使用以下命令在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

扮仙女 2024-11-06 20:54:07

无论如何,我也获得了点击次数(大约 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

enter image description here

Spectrogram
enter image description here

(dynamic range is 140 dB)

烟─花易冷 2024-11-06 20:54:07

我注意到潜在的问题:

  • 当您的机器重播时,信号未正确标准化,
    它以 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文