Tempo change like in Ableton => GEN time stretch or something else?

    Mar 02 2018 | 6:54 pm
    Dear all,
    I would seek your advice concerning a functionality that I am seeking to implement: here is an example what i am trying to achieve and what my current knowledge is: ABLETON LIVE AUDIO LOOP PLAYBACK and BPM CHANGE: When a audio drum loop is played in Ableton and one would reduce the BPM the loop will be played with reduced speed but with no change of pitch. I would assume this is time stretch if I understand correct.
    WHAT I HAVE DONE SO FAR: I have programmed a looper using 100% GEN CODE where I can record and playback incoming audio from a microphone in realtime. The audio data is stored in buffers. Playback and recording is done using standard gen peek and poke objects. Tempo changes are also possible but including pitch shifts. I implemented it the standard way with a counter that reads through the buffer (see below) and where I increase or decrease the counter speed (Speed can range from 0 - looper stops to 1 - normal play back speed to 100 - playbackspeed is 100 faster than normal). BufferReadPosition = int(counter(Speed,Restart,Buffer_Length)); Audio_Out = peek (Buffer1, BufferReadPosition, interp="linear");
    WHAT I WOULD LIKE TO ACHIEVE Currently I am able to change the playback speed with a slider from 0 to xxx - but with change of pitch included :-( . I am seeking out to the gen community if there is a possibility to copy the same functionality that Ableton Live has slowing down or increasing the BPM speed without pitch change in realtime reading through a buffer. As said before all my audio data is stored in normal buffers.
    I am aware of the stretch object but it is not a gen object and I sense that it is not able to do that in realtime while the audio is playing. All other implementations that I have come across are many years old and don´t have the quality that Ableton is providing and some of them . I would also consider buying a commercial patch if it is out there ;-).
    Any help of you highly appreciated.

    • Mar 16 2018 | 2:38 am
      You should be able to modify separately pitch and time using regular granular techniques. Have a look at the PSOLA algorithm, it should allow you to achieve what you're after I think.