[thechat] Music Information Retrieval for Dance Identification

S.M.German smgerman at comcast.net
Sun May 5 22:05:54 CDT 2013

RonL noted:
> It seems to me that there is still a pretty significant gap to go from
> recognition to time signature recognition.  (And that's without even
> considering the technical difficulties in differentiating between related
> signatures like 3/4 time and 6/8 time.)  Beyond that I'm thinking there is
> additional challenge in identifying the accents within a time signature
> would be necessary to suggest an appropriate dance.

I expected that (time signature) to be a big issue, but apparently, it's

Some studies are reporting 75%+ identification rates just looking for tempo,
ignoring time signature, even with the overlap in beats per minute between,
e.g. Waltz and Rhumba.  Also, a lot of the MIR techniques begin with
discrete fourier transform (DFT).  Two dances with different rhythms will be
recognizable in the frequency domain, even if they are close in
Beats-per-Minute and that primary frequency peak.

So it's looking like the thing I thought might be the main theoretical
challenge (telling 3/4 from 4/4) isn't even a consideration in the final

> On one hand, a "brute force" approach would likely work.  If you think
> how a Shazam style service works ... [Caveat: I'm TOTALLY guessing here.
> don't know how it works.  I haven't looked under the hood.  Heck, I
> even used it!] ... I suspect it works by pattern matching a song snippet
> against a database.  The brilliance is in tuning the algorithm and
speeding up
> the look-up.  Something similar would work here: identify the song, then
> return the database field containing the dance suggestion you have pre-
> assigned to that song.

As you might expect, Shazam gets mentioned often in papers on MIR.  They run
a big database of hashes.  If they require, for example, a 15-second snippet
of song, then each song in their system is broken down in to every possible
15-second clip.  Then a hash is computed from the energy peaks within a
clip.  At the user end, the same hashing algorithm is run for 15 seconds of
music from the user's microphone, and from there it's all indexing and

Aside from quick hashing and matching, the key to a good results is
accounting for ambient noise and degradation of the signal.  The downside is
this only work for songs Shazam has in its database.  

What I'm aiming for is a general data signature for each dance and an
algorithm that works even for songs the software hasn't heard before.  Some
corpus of classified music will be necessary for training, but I don't plan
on maintaining a Shazam-like database.

> But that's not a cool or elegant approach.
> Good Luck!
> RonL.
> (On the other 'other hand' ... I'm pretty durn sure I've seen different
> dancing Waltz, Polka, and Two-Step to the same song on the same dance
> floor at the same time in the same dance hall in Texas.  Now I ain't
saying I
> know which couple was dancing the "right" dance.  But I am sayin' I would
> never even try to tell the other two they wuz dancing the "wrong" dance!
> No sir! Not me!  I bruise like a grape!)

Yeah, some folks are like that.  Waltz and Polka are close enough, you can
get away with it.  Samba and Mambo are very close such that most amateurs
who think they are dancing to a Mambo song, are actually dancing to Samba.
West-coast swing folks will insist just about every song in 4/4 time is a

But who's to say what is right?  There's a place I've been to dance now and
again, and every time there's this little old couple.  They're like a couple
of dwarves--been together so long it's not immediately obvious which one is
the wife and which is the husband.  (Heck, could be two wives or two

Anyway, the point is they do the same "dance" no matter what music is
playing.  The same steps, they just change up the rhythm to match the beat.
A little slower or faster as needed.  They chain together steps to move
around the floor for Waltz of Foxtrot; they move around in one spot for
Rhumba or Char Cha.  Anyone who thinks they aren't doing it "right" or
that's not proper dancing may know every step in the world, but they don't a
thing about dance.


More information about the thechat mailing list