Rhythm-guessing algorithm

No.13983288 ViewReplyOriginalReport
Does anyone know if there's a feasible algorithm to guess an interval that's likely to be somewhat "rhythmically consonant"* with any given song, where all you know is its length? (*some low-ish integer ratio of the tempo)

I tried naive BPM guessing by making some broad assumptions like "4/4, 128 measures" and just dividing beat count over total seconds and rounding, e.g. for a song with length 3:30, ((128 * 4) / 210) * 60 = ~146 BPM. This actually works for some generic songs like Darude - Sandstorm, but obviously it won't for any song that isn't 128 bars

If you reduce the assumptions to "4/4, even number of measures, x length", or even nothing but "4/4, x length", is there some way you can guess an interval that has a decent chance of feeling fairly in-sync with randomly sampled Western songs? I don't necessarily care much about it matching the actual BPM; just some frequency that has a decent chance of working reasonably well with the pulse, or at least of not feeling horribly off-rhythm

Obviously it'd be much easier if you also try to analyze the audio, but I'm looking for potential ways to do it without that