Softcut - time streeeeetch?


  • Pitch is tied to playback rate in softcut. I’m into it
  • wanted to ask what the code might look like to create a pitch corrected rate adjustment, presumably using a granular scrubbing technique. Haven’t quite wrapped my head around metro functionality yet but assume this would be a place to start, although interested to see different takes if there are some. Time stretch has all sorts of flavors.
  • any performance issues to look out for?

Thanks—hope this can be educational!

with one voice, it’s not gonna be granular exactly, there’s no overlap, but you can make a scrubby guy, which moves along at an arbitrary speed uncorrelated with the read/write speed

something like

--- load buffer etc..
sc = softcut -- type less
voice = 1
pos = 1 -- start position
r = 1/4 -- scrub rate
dt = 1/10 -- grain interval
inc = r * dt
grain_func = function()
   sc.position(voice, pos)
   pos = pos + inc

m = metro.init(grain_func)
m.time = dt

more things:

  • randomize grain rate / pitch / pos increment
  • use more voices with round-robin assignment

maybe be useful to know that you can set loop to 0 for a voice, and move position, loop_start, loop_end together to make a moving one-shot playback interval