|
![](/i/fill.gif) |
scott wrote:
>> ...the sound is after all coming *from* my PC. ;-)
>
> Oh I mistakenly thought I read somewhere that you had your collection on
> real CDs.
I did. Right before I transcoded them...
>> The logical thing to do with be to decode the Vorbis files back into
>> WAV files and analyse the resulting spectrum.
>
> Would be more flexible to just read the mixed output from the soundcard,
> that way your program would calculate the BPM of whatever music your
> computer happened to be playing.
Only problem is that first I'd have to find out what the necessary API
calls are. This is highly likely to be quite intractibly difficult.
> You wouldn't have to worry about decoding various formats either then.
It's easy enough to decode Vorbis (or just use the original rip files).
That way I only have to worry about WAV. (This is more complicated than
it sounds!)
>> Although this is far, far less trivial than you'd imagine. (E.g.,
>> WinAmp can't reliably decide what the beat rate is either, mainly
>> because it can't "hear" the beats reliably.)
>
> Yeh I guess you'd need a good algorithm for detecting beats - presumably
> some kind of autocorrelation function on certain parts of the spectrum,
> easy to do both in one shot with FFTs), seems right up your street :-)
The thing that seems to throw WinAmp is that most drumbeats are fairly
complicated, with double beats, fills and breaks, and so on.
Really, the human brain is far, far better at beat detection than any
computer. Hell, I can even tap out the beat during a break where there
is no audible beat at all! The computer has no hope of coping with that.
It then becomes a question of statistics. Just how accurately can you
decide where the beats are, assuming all the tap signals contain a
certain amount of jitter?
Post a reply to this message
|
![](/i/fill.gif) |