A method and apparatus implement time compression and expansion of audio
data, with dynamic tempo change during playback. Dynamic changes in tempo
are implemented at specific points in the audio signal corresponding to
local minimums in the fade-in and fade-out characteristics of the
compression/expansion scheme. An audio signal is marked to define
temporal slices of audio data. Mark positions may be selected to minimize
significant transient activity midway between consecutive marks. Fade-in
and fade-out functions are associated with the leading side and trailing
side, respectively, of each mark, creating a series of cross-fading
"mounds" with peaks at each mark. When a tempo change is requested (e.g.,
a user selects a new tempo value in a user interface), the tempo change
is delayed until the start of the next "mound" (i.e., the next fade-in).
Thus, despite the tempo change, each mound uses a contiguous set of audio
data, preventing the clicks and pops associated with skips in the audio
data. Cross-fading minimizes any effects of desynchronization caused by
overlapping mounds of differing speeds.