2

How do you determine which onsets are beats? I am using Spectral Flux for Note Onset Detection and a Running Mean for peak-picking/thresholding.

I am just working with the guitar instrument so the presence of percussions may not help with this. Any ideas?

Thanks!

Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122
user488792
  • 1,943
  • 7
  • 31
  • 38

2 Answers2

4

EDIT: Wow...just realized this question is 3 years old...sorry to resurrect an old post.


My Master's thesis was in beat detection and the main advantage of my method over all other published methods of beat detection was in resolution, both in the time domain and frequency (beat) domain. You can find my thesis here. What it basically boils down to (after alot of filtering) is a comb-filter convolution. My code is an adaptation of this project, which contains Matlab files for you to see how it works.

My code (both in C++ and the Matlab port) is not publicly available due to possible copywrite issues with my university, but if you email me at dberm22[at]gmail[dot]com, I'd be more than willing to ahem::discuss my work with you.

dberm22
  • 3,187
  • 1
  • 31
  • 46
  • Wow, I'm impressed, I'd really like to have a look at the code, but first I'll read through your thesis and this project. I have been trying to get an accurate measurement of the tempo for a week, but I just can't find an algorithm that really does it. But your answer gave me hope :D – Kametrixom May 10 '15 at 19:40
  • 1
    Just for the record, there is nothing wrong with posting an answer to an old question. The answers to questions aren't just for the author of the original question, but to everyone who may stumble onto it through Google. – James McMahon Jan 20 '16 at 21:50
  • @dberm22 how does this stack up with modern techniques, 8 years on? – aehlke Jun 11 '22 at 03:41
  • 1
    @aehlke To be honest, I haven't kept up with recent advancements (if any) since graduating. All the math is still valid and it should still work very well, but unfortunately I don't know if anyone's trained any machine learning algorithms or anything like that. Sorry I can't be any more insightful. – dberm22 Jun 13 '22 at 15:20
2

Try using a beat tracking algorithm. Beat tracking is a distinct problem from onset detection.

I think there's a good algorithm in the Queen Mary plugin set for Sonic Visualizer. The plugins are open source, so you can have a look at the code to figure out how they work.

Or do a search on google scholar for "beat tracking". There are a number of effective approaches. Dan Ellis' is a good one to start with. It's intuitive, and there's code available in Matlab and Java.

dB'
  • 7,838
  • 15
  • 58
  • 101