Beat matching for two audio streams extracts beats from each, computes a
conversion ratio from one stream to the other stream by an initial beat
alignment plus a stability-maintaining beat alignment. A variable
resampling converter or time scale modifier adjusts one stream to align
beats with those of the other (reference) stream. Thus for cross-fading
two music streams the beats of the fading-in stream can be matched to
those of the fading-out stream for a seamless transition.