Hi there -
I’ve got a buffer with an audio file that’s about 1 second long.
I know that by playing it back via PlayBuf, at 1/10th speed, it’ll be 10 seconds long and lower in pitch, effectively having slowed it down.
I am curious if this is possible to do this client-side, though - since playing it from a buffer and recording it would presumably take longer.
Thanks!
The client side library doesn’t have a proper audio resampling function, and it would be slow in sclang. (It has resamp1 but this uses linear interpolation, which will not sound good.)
I’d suggest to use .unixCmd to invoke sox to do the speed change.
I’ve also done this using a non-realtime server in SC. I could send a script later, but, I think running sox on an audio file would take 5 lines of SC code while the NRT server way would take, oh, 3x that much at least. So it’s probably better to look into sox first.
hjh
1 Like