Hi All,


I am sure this has been discussed at length but for some reason I can
not find what I need.


I want to mix two songs (by overlapping the end of the first song with
the start of the second song say for ~10s) using a program and change
the rate of the first song so that their BPMs(BPM = Beats per minute
from a human's perspective) match during the overlap. It is understood
that not 'all' songs can be mixed.


The question is what is the best way to determine BPM ?


Any APIs, references to similar work, comments from people with similar
experience, links to algorithms will be appreciated.


Thanks! 
Aditya