从音符开始检测节拍?
如何确定哪些音符开始是节拍?目前,我所拥有的有点像使用所谓的“脉冲序列”的“蛮力”方法。
基本上,这个想法是,您生成从最小节奏到最大节奏的脉冲序列。这些脉冲串只是以特定节奏出现节拍时的表示。例如,如果 Tempo = 60bpm(每分钟节拍数),则脉冲串的节拍间隔为 1 秒 (60 / 60 bpm)。对于 Tempo = 120bpm,脉冲串的节拍间隔为 0.5 秒 (60 / 120bpm)。
现在基本上,我只是使用这些脉冲序列来比较和对比音符开始在假定的节拍上发生的接近程度。因此,一般来说,这个想法是,如果音符起始点更靠近节拍位置,则总体差异会更小。然后基本上就是选择总体差异最小的节奏。
但是,我在实施过程中遇到了两个问题。
1.) 很少有完美的音符开始位置,特别是通过录制的音乐(我正在使用它),这通常会导致较差的结果。
2.) 更高的节奏将导致更小的间隔,这导致它成为具有非节拍开始(即第 8 个音符、第 16 个音符)的音乐的更好候选者,而不是音乐的实际更好节奏(即 60bpm 纯音乐)第八个音符可能会返回 120bpm)
您能建议一些其他(甚至简单的)节拍检测方法吗?我想自己实现该算法以获得经验,因此非常感谢有用的教程链接。谢谢你!
How do you determine which Note Onsets are beats? Currently, what I have is sort of like a 'brute force' method using what is called 'pulse-trains'.
Basically, the idea is, you generate pulse-trains from a minimum tempo to a maximum tempo. These pulse trains are just representations of when a beat occurs in a particular tempo. For example, if Tempo = 60bpm (beats per minute), the pulse train has beats that occur at intervals of 1 second (60 / 60 bpm). For Tempo = 120bpm, the pulse train has beats that occur at intervals of .5 seconds (60 / 120bpm).
Now basically, I just use these pulse trains to compare and contrast how close Note Onsets occur on the supposed beats. So generally, the idea is that if note onsets occur closer to a beat location, the overall difference will be smaller. Then its just basically picking the tempo with the smallest overall difference.
However, I have encountered two problems regarding this implementation.
1.) Having perfect locations for the note onsets are seldom the case, especially through recorded music (which I am working with), which results in generally poorer results.
2.) Higher tempos will result in lesser intervals, which results it in becoming a better candidate for music that have off-beat onsets (i.e. 8th notes, 16th notes), rather than the actual better tempo for the music (i.e. 60bpm with purely 8th notes will probably return 120bpm)
Can you suggest some other (even simple) methods of beat detection? I would like to implement the algorithm myself so as to gain experience, so helpful links for tutorials will be very much appreciated. Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此页面上有很多有趣的方法。
There are quite a few interesting approaches on this page.
我建议查看Dan Ellis'技术。它很直观,并且有 Matlab 和 Java 版本的代码。
I'd suggest checking out Dan Ellis' technique. It's intuitive, and there's code available in Matlab and Java.
对于很多音乐,“Grove”和“Swing”会及时从严格的节奏位置改变音符开始的位置。统计模式匹配技术,将整个小节或整个乐句的频谱模式与音乐的时移副本进行匹配,可能会效果更好。然后,您仍然需要估计从每分钟小节/乐句到每分钟节拍的除数。
For a lot of music, "Grove" and "Swing" will alter the location of the note onsets from strict tempo locations in time. A statistical pattern matching technique, where you match the spectral patterns of whole measures or whole phrases against time shifted copies of the music might work better. Then you still need to estimate a divisor to go from measures/phrases per minute to beats per minute.