I would like to synchronize two different music tracks (and maintain synchronization) as a DJ would with two records.
So far, I have the beats mapped for each song, so I am able to adjust their rates and time align them accordingly. What I've found though, with many sample tracks, is that the two tracks will drift out of sync after a while due to the tempos of the songs not remaining constant. I've tried compensating for this by periodically checking the tempos of the songs and re-adjusting their rates so that they are synchronized again by the start of the following measure.
Is there a common (or better) approach of synchronizing two music tracks?