audioprocessingminim

How does one produce Double Speed sound...programmatically?


I'm doodling about with the Minim library of Processing, manipulating audio buffers myself to playback sounds, play in reverseetc.

But I wonder - how does one play a sound at twice speed or half speed, without manipulating the sampling rate? Do they "double buff" the buffer with the same sound twice to slow it down? How about speeding up?


Solution

  • There are many algorithms of varying degrees of sophistication to perform audio resampling (what you're trying to do here). If you have access to a raw buffer of audio samples, here are some naïve ways to manipulate them as you described: