Skip to content

Timestretch in Real Time

March 26, 2012
tags:

I’ve modified the pitchshift/timestretch example I uploaded last week to work in real time. No more loading samples, you can simply play audio through it and go! This implementation unfortunately imposes some restrictions on use, however – you can’t speed up the playback any more, and instead of being a constant effect, the effect must be triggered. These are both consequences of the fact that we’re not storing the whole file in memory and don’t have access to the data that we would need.

Instead, I’ve rigged it so that any MIDI note will start the effect, and when you release the note, the playback goes back to normal. Using this method it’s possible to alter the pitch/speed of the incoming sounds for a period of time dependent on the playback speed. This period is about 12 seconds while playing in reverse, about 24 seconds while speed = 0, and is infinite when the speed = 1. This means that the pitch-shift effect can be used indefinitely as long as the speed = 1.

Eventually I’ll be expanding this simple demo into a proper beatmashing ensemble. Until then you can download it here.

About these ads
3 Comments leave one →
  1. meter maid permalink
    April 1, 2012 9:54 pm

    I find this method a bit more fun to use. One thing I think would make it a lot cooler is if when you trigger with a midi note it would glide to the value of the knobs and then glide back to normal on release. Would this be possible?

    • meter maid permalink
      April 2, 2012 1:05 am

      More like x-fade the time stretch back to normal on release. That would give it a smoother effect more suitable to live use.

      • April 2, 2012 7:48 am

        this would be simple to implement, i’ll add it to the next version.

        i don’t think it’ll help that much with a smooth release though – you’ll still end up jumping forward in time if a stretch is used… what might be better is just a dry/wet envelope.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 29 other followers

%d bloggers like this: