MATLAB 中的节拍提取

发布于 2024-10-11 02:37:05 字数 147 浏览 5 评论 0原文

我没有 MATLAB 经验,不幸的是我的项目是在 MATLAB 中进行的。

基本上,目标是将音乐源(最好是 mp3 格式,但 .wav 也可以)读入 MATLAB,然后应用低通滤波器,过滤除节拍之外的所有内容。然后它应该获取每个节拍发生的时间并将结果写入文本文件。

I have no experience in MATLAB and unfortunately my project is in MATLAB.

Basically the objective is to read a music source (preferably in mp3 format but .wav is also OK) into MATLAB and then apply a low pass filter in such a way that it filters everything except the beats. Then it should get the time at which each beat occurs and write the results to a text file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

逆流 2024-10-18 02:37:05

我认为使用 .wav 文件要容易得多,尽管 Matlab 很好地提供了用于此类操作的实用程序,但事实上它确实如此: 读取 .wav

实现低通滤波器的最简单方法是移动平均滤波器。

最简单的方法是循环数据并取每组 n 个值的平均值。我不确定截止频率到底如何取决于 n,但你可以尝试一下。

另外,我知道Octave有一个信号处理工具包,并且我认为Matlab有内置的滤波器功能:https://ccrma.stanford.edu/~jos/fp/Matlab_Filter_Implementation.html

第三种方法是执行 FFT 并以频率进行滤波领域。

一旦获得信号的低频部分,您就可以检查高于幅度阈值的样本,并输出在数据中找到这些样本的位置。

It's quite a bit easier to work with .wav files I think, although Matlab way well have utilities for such things, in fact it does: Reading .wav

The easiest way to implement a low pass filter is a moving average filter.

The simplest way to do this would be be to loop over the data and take an average of each group of n values. I'm not sure exactly how the cutoff frequency would depend on n, but you could experiment a bit.

Otherwise, I know that there is a signal processing toolkit for Octave and I think that Matlab has a built-in filter function: https://ccrma.stanford.edu/~jos/fp/Matlab_Filter_Implementation.html

A third way which is over the top, would be to perform an FFT and do the filtering in the frequency domain.

Once you have the low-frequency part of the signal you can check for samples that are above an amplitude threshold and output where in the data these were found.

你在看孤独的风景 2024-10-18 02:37:05

在 google 上搜索关键字“beat extract matlab”30 秒,得到以下两个代码源:

  1. 音乐音频速度估计和节拍跟踪
  2. 打败这个节拍同步项目

30 seconds on google with the keywords "beat extraction matlab" yield the following two code sources:

  1. Music Audio Tempo Estimation and Beat Tracking
  2. Beat This A Beat Synchronization Project
葬心 2024-10-18 02:37:05

在Matlab中,您可以使用最先进的多特征节拍跟踪算法,该算法的信息发布在这里:
JR Zapata、M. Davies 和 E. Gómez,“多功能节拍跟踪器”,IEEE/ACM 音频、语音和语言处理汇刊。 22(4),第 816-825 页,2014 年。 http://dx.doi.org /10.1109/TASLP.2014.2305252

多功能节拍跟踪器的 Matlab 实现是:
https://github.com/JoseRZapata/MultiFeatureBeatTracking

In Matlab you can use and state of the art Multi Feature beat tracker algorithm, the information of the algorithm is publish here:
J.R. Zapata, M. Davies and E. Gómez, "Multi-feature beat tracker," IEEE/ACM Transactions on Audio, Speech and Language Processing. 22(4), pp. 816-825, 2014. http://dx.doi.org/10.1109/TASLP.2014.2305252

The Matlab implementation of the multifeature beat tracker is:
https://github.com/JoseRZapata/MultiFeatureBeatTracking

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