breakfastquay / rubberband

Official mirror of Rubber Band Library, an audio time-stretching and pitch-shifting library.
http://breakfastquay.com/rubberband/
GNU General Public License v2.0
580 stars 93 forks source link

How to jump to position in a song? #6

Closed AmyXS closed 3 years ago

AmyXS commented 7 years ago

Hi,

I couldn't find a method that allows for setting the playhead position, wonder if this is supported? I noticed the demo app has a slider that allows for jumping to a different position, could you please explain how this is done?

Cheers!

jamiebullock commented 6 years ago

Hi @swan488, I don't think jumping position is really the job of RubberBand.

You pass in blocks of samples to RubberBandStretcher::process() and retrieve them (stretched) from RubberBandStretcher::retrieve(). So if your input block "jumps" with respect to some larger buffer of audio, then the output from RubberBand will reflect that.

AmyXS commented 6 years ago

That makes sense, thanks for answering!