如何检测在PHP中一首歌曲的BPM一首、歌曲、PHP、BPM

2023-09-10 22:24:36 作者:殇离

如何才能一首歌曲的节奏/ BPM以编程方式确定的?常用的算法是什么,以及什么考虑必须进行?

How can the tempo/BPM of a song be determined programmatically? What algorithms are commonly used, and what considerations must be made?

推荐答案

这是在挑战一个计算器后解释。在一般情况下,最简单的节拍检测算法工作在声能,这是很容易检测定位峰。更复杂的方法使用 梳状滤波器 等统计/波形的方法。有关详细的解释,包括code样品,检查this GameDev文章 了。

This is challenging to explain in a single StackOverflow post. In general, the simplest beat-detection algorithms work by locating peaks in sound energy, which is easy to detect. More sophisticated methods use comb filters and other statistical/waveform methods. For a detailed explication including code samples, check this GameDev article out.