Simple loop() syntax

Hi. I’m loving the new pitch-preserving stretch() instrument. I’ve been hoping for a equivalent syntax for loop, to stretch to fill a given duration by interpolating the audio file (knowing that the pitch will shift).

Based on the documentation, I presume the only way to change the playback speed with loop() is to specify the tempo of the original loop. But it should be possible to change the playback speed to stretch the full duration of the audiofile over a given duration:

loop("mydrumloop.wav", dur=4, beat_stretch=True)

(This would be similar to Sonic Pi’s beat_stretch option.)

I suppose I’ll make this a feature request, but is there a way to do this already and I just missed it?

Thanks!
Joel

Hi there, I’ve added this functionality in the newest update via the GitHub issue.

Oh that’s great! Thanks! I’m looking forward to trying it out.