2

I'm trying to develop a query by humming system and looking for an efficient algorithm to compare frequencies of hummed queries against the frequencies in the database. Seems like Dynamic Time Wrapping will be suitable as it can deal with different speeds (tempo).

  1. But, can this be used for comparison even if the user hums in a different chord? In other words, hums in a different pitch (for example, the original song is in chord C… and the user sings it in chord E)
  2. Are there any sample code written in c#? (found some matlab coding, but unfortunately I'm not familiar with matlab). Or atleast a tutorial that describes dtw in regard to this context?
  3. If DTW is not suitable, are there any other algorithms that would be suitable for this purpose? Your suggestions are much appreciated. Thanks in advance :)

2 Answers2

0

1, It is better to normalize the pitch before compare two tunes by DTW, it is called pitch shifting in literature, I think.

2, I am not sure whether there is an C# implementation, https://github.com/EmilioMolina/QueryBySingingHumming, here is an c/c++ demo code for it.

3, DTW is effective algorithm in match two time series, but the only problem is the computational-cost, we have to find a way to lower the cost when we doing a real-world systems: a) find a way to do DTW-index? b)find a more efficient but not-so-accurate algorithm to narrow the searching scope for DTW?

FernandoSanchez
  • 176
  • 6
  • 7
0

In Equal temperament tuning (not that humans are tuned per se, but as a model) the ratio between adjacent notes (half steps) is the 12th root of 2, or 1.0595, such that 12 half steps make up one octave, and each octave is a doubling of frequency. No matter what key someone hums a tune in you should be able to determine the intervals they are humming by considering the ratios of the frequencies of the notes.

Ben Jackson
  • 90,079
  • 9
  • 98
  • 150