Tag Archives: half-time

New Feature: Automatic Tempo Correction by Dance

One of the cool things about maintaining a database of songs cataloged by dance is that I can use that information to correct the most common mistake made by algorithmic tempo matching: the double-time/halftime issue. I’ve done this on an ad hoc basis for years, but now I have everything lined up so the system can make these adjustments automatically.

One of the major blockers was that I was only maintaining one tempo per song. To do this right, I’d need to keep different tempos for every dance a song can be danced to, which was a major feature I implemented earlier this summer. So I decided it was time to take another look at automatically adjusting the tempo based on the dance.

The Feature

The general idea is to have two thresholds. One is the tempo under which it is clear that the listed tempo is half-time of what one would dance that specific dance to. The other is the tempo where it is clear that the listed tempo is double time. These are related to the subject of my last post. Although, in this case, there may not be a dance one would dance to the listed tempo. But there might be, which is where things get interesting.

When a song is added to the catalog or a new dance style is added to an existing song, the system checks if I’ve defined threshold tempos for the dance. If I have, and the song’s tempo is below or above the threshold, I double or halve the tempo, respectively. There are some additional nuances depending on whether other dances are already defined. But with the tempo-per-dance system, I can ensure that changing the tempo of one dance doesn’t affect the others. I do change the song’s default tempo if all dances define the same tempo. Sometimes this ends up listing the song’s tempo as half or double what the sheet music says, but since music4dance is a dance-oriented site, I’m all right with that.

Note that, in line with my current policy of trusting community members over algorithms, all of these changes are made using the “tempo-bot” account and can be changed by any signed-in community member.

Please Help

Why am I telling you all this? Because I am not an expert in all of the dances I have listed on music4dance. And even for those I have some experience with (or can at least stumble through on the dance floor), it’s through my personal lens, which may not be the same as yours.

If you’ve got a minute, please go to the tempos page (Tools → Tempi) and scroll down to the columns control. There is a new column called Range; go ahead and select that. When I’m looking at this info, I generally deselect all other columns except Meter and BPM to get a cleaner picture. Or click here to get directly to the page with the columns correctly configured. (More about that little trick in a future post).

Snapshot of the tempos page with columns set up to highlight range.

I’d like to know your take on what these thresholds should be for both the dances I’ve felt confident enough to set (sometimes based on data rather than personal knowledge) and those I haven’t pulled the trigger on.

Waltzes

I started to call out why waltzes are in a class of their own, but decided that’s worth a post of its own; look for that soon.

Dances that are primarily Social

Some dances, like West Coast Swing and Salsa, are primarily social dances. I know there are competitions for them as well, but they’re so broadly and actively danced socially that I think they’re evolving faster than the dances that I’m familiar with that have more of a center around competition with strict tempo rules.

In the case of West Coast Swing, I made the mistake of centering around the tempos that I’ve danced in competition. Based on feedback and additional research, I ended up listing it with such a broad range that I don’t think I can use the range-limiting technique on it at all.

In the case of Salsa, there were enough half-time songs to find a reasonable breakpoint. I’d love to hear from Salsa dancers and DJs if I’m wrong.

And I’m completely out of my depth with Argentine Tango and related dances, so if there is anyone out there willing to help with those, I would really appreciate any guidance you can give.

In short, I could really use some help on this one. Please comment on this post or send feedback if you can help.

Step of the Month

The “Step of the Month” for August:  This is a small variation on the July Step. Please share an unusual rhythm song (or songs) that you enjoy dancing to. I’m specifically looking for interesting variations that I haven’t mentioned yet in the Fun Rhythms series. I’ve got one more up my sleeve, but I’d like to continue on this path for more than three posts. But I need some help to do that. Post it in the comment thread here or send feedback.

Fun Rhythms: 12/8 meter- Slow Foxtrot + Viennese Waltz?

Since I’ve added the ability to set the tempo of a dance for a song independently of the tempo of the song itself, I’ve found some renewed energy to go through and clean up some of the inconsistencies that have crept into the music4dance catalog. As I promised (or threatened) when I blogged about the…

What Happens When a Song is Danced at Different Tempos?

Sometimes, a song can be a perfectly good Bolero when heard one way but a Salsa when counting the music differently. Another example is Slow Dance (Castle Foxtrot) vs. Lindy Hop. Generally, this phenomenon is because, with some music, it’s easy to count what the musicians see as either a half note or a quarter…

Ask music4dance: Why are the tempos that music4dance lists for Salsa wrong?

I’ve addressed questions about tempo in several different ways over the years, and I appreciate the continued feedback, as there is absolutely room for improvement in how the music4dance system handles tempo. Algorithms are far from perfect: The issue at hand is that many of the tempos listed for Salsa were exactly half the speed…

Ask music4dance: Why is the tempo range you list for West Coast Swing wrong?

A West Coast Swing DJ contacted me and kindly let me know that the tempo range I had listed for West Coast Swing was “entirely wrong.” The average tempos that she plays are between 90 and 110 bpm, while I listed a tempo range of 112-128 bpm.  Before I dig further into the details, I’d…

Ask music4dance: Why are the tempos that music4dance lists for Salsa wrong?

I’ve addressed questions about tempo in several different ways over the years, and I appreciate the continued feedback, as there is absolutely room for improvement in how the music4dance system handles tempo.

Algorithms are far from perfect:

The issue at hand is that many of the tempos listed for Salsa were exactly half the speed at which one would dance. There is a straightforward explanation for this. Many of the tempos listed on the site are algorithmically generated. The algorithms are decent at this point for many types of music. But with some music (and Salsa definitely falls into this category), the algorithm “hears” a double-time or half-time beat and chooses that over the “correct” tempo for the dance.

I have several mitigations for what I think of as “shadow” tempos that I’ve implemented over the years, including a new one that was prompted by the email that also convinced me to write another post on this subject.

First, the system prefers a user-entered tempo over any algorithmically generated tempo, even if the latter is more recent (the general default for conflicting information is to believe the most recent edit). I currently don’t open up editing tempos to every user, but contact me with an example of something you’d like to change for a quick check that we’re on the same page, and I’d be happy to add that permission to your account. The more people we have catching and correcting these issues, the more reliable the site will be overall.

Second, I occasionally do a pass through the database and adjust the tempo values that are obviously outside a dance’s tempo range if halving or doubling them would put them within the dance’s range. I recently ran this process for Salsa, which significantly reduced the number of songs with the issue that prompted the original complaint. I have considered generalizing this algorithm so that if a song is added without specifying a tempo and the system generates a tempo algorithmically, it would make a simple adjustment to double or halve the tempo if that puts it within the dance’s range. But I haven’t pulled the trigger on that yet. In any case, this process still left a few songs tagged as Salsa with very unsalsa-like slow tempos. I’ll dig into that shortly.

The last feature that I hope mitigates this algorithmically generated tempo issue is brand new. People need to understand that a tempo is algorithmically generated and should therefore be taken with a grain of salt1. But there was no easy way in the music4dance user experience to indicate that the system had generated a tempo algorithmically. Now, near each algorithmically generated tempo listing is a small icon of a computer chip; clicking that icon takes you to our help page with information on how tempos are generated.

Image of the song library with algorithmic tempo icons

Different dancers can hear different beats:

But there is another, related issue. It’s not just algorithms that can “hear” a double or half-time beat. Dancers can do the same thing2. The algorithm hearing a half-time beat mentioned above is precisely the opposite problem from the one I discussed in this post, where the tempo was twice what one would dance Bolero/International Rumba to. But it was for a similar reason. Some songs have a strong enough double-time or half-time beat that it’s hard to tell which is the primary beat to count or dance to. When you are actually on the dance floor, this generally doesn’t matter, since if you’re at a salsa club and the choice is between dancing to 190BPM and 95PM, you’ll dance at 190BPM. Or conversely, if you’re in a dance studio where you’ve been studying American Rhythm, and have the same choice, you might choose to dance Bolero at 95BPM (or maybe  Mambo at 190BPM, depending on the feel of the song).

So the remaining songs in the music4dance Salsa catalog that are listed as much slower than one would dance a salsa remain because someone set that tempo based on a different dance where the slower tempo is appropriate (or because they were added with an algorithmic tempo since the last time I did a pass to clean them up). There is no easy way to solve this problem when each song has only one tempo. But I’ve been refactoring the code and the indexing service to make it easier to carry more information about the intersection between dance and song, which would allow us to list a different Salsa tempo than a Cha Cha tempo for the same song. The problem is that we would have to save a tempo field for every song/dance combination, even in the most common case where all dances to a given song are at the same tempo. I need to do some more testing to make sure that doesn’t degrade the overall search experience. The more I hear from you that this limitation is frustrating, the higher it will rise on my to-do list.

As always, please let me know if you have any thoughts about the subject of this post or the site by commenting below or using other feedback mechanisms listed here. And if you enjoy the site or the blog (or both), please consider contributing in whatever way makes sense for you.

Footnotes

  1. This strikes me as ironic, since I vibe-coded this feature using GitHub Copilot and Claude. And even though the underlying algorithmically generated tempo issue existed long before the current generative AI situation, it has a similar feel to me. ↩︎
  2. It’s also really fun to be able to dance a different dance than the rest of the room if you can make it work, but that may just be my rebel nature. ↩︎

What Happens When a Song is Danced at Different Tempos?

Sometimes, a song can be a perfectly good Bolero when heard one way but a Salsa when counting the music differently. Another example is Slow Dance (Castle Foxtrot) vs. Lindy Hop. Generally, this phenomenon is because, with some music, it’s easy to count what the musicians see as either a half note or a quarter…

Ask music4dance: Why is the tempo range you list for West Coast Swing wrong?

A West Coast Swing DJ contacted me and kindly let me know that the tempo range I had listed for West Coast Swing was “entirely wrong.” The average tempos that she plays are between 90 and 110 bpm, while I listed a tempo range of 112-128 bpm.  Before I dig further into the details, I’d…