urinieto / msaf

Music Structure Analysis Framework
MIT License
501 stars 79 forks source link

Adding the Mel and Log Mel spectrograms. #156

Closed ax-le closed 10 months ago

ax-le commented 10 months ago

Hi! And Happy New Year! This pull request aims at implementing two additional features: the Mel and the Log Mel spectrograms. The Mel filter bank is defined following [1] (i.e. 80 mel coefficients, with a min frequency of 80Hz, and a max frequency of 16kHz. Note that these Mel spectrograms were developed for signals sampled at 44.1kHZ with 2048 samples per window, while, in the current implementation of MSAF, signals are sampled at 22.05kHz with 4096 frames per window. It should be discussed how to solve that ambiguity (divide by two the max frequency? Change the sampling rate for Mel spectrograms?). Let me know if I can improve the code in any way!

References [1] Ullrich, K., Schlüter, J., & Grill, T. (2014, October). Boundary Detection in Music Structure Analysis using Convolutional Neural Networks. In ISMIR (pp. 417-422).

urinieto commented 10 months ago

Oh wow, that's fantastic, thank you! Should I wait for the TODO feature computation before merging this, @ax-le ?

urinieto commented 10 months ago

Never mind, I see you're addressing this here https://github.com/urinieto/msaf/issues/157

Merging away, thanks for your contribution!