Controlling the speed and playback position of a sound.

Aug 16, 2013 at 2:16pm

Controlling the speed and playback position of a sound.

I’d like to play back a sample in time with a movement (probably a wiimote gesture in future but a cursor movement is fine for now).

I’ve got no idea how to go about doing this but this video suggests it is possible, though I don’t need the gesture/ shape recognition, just the ability to scrub through a sound file with the speed of the sample increasing or decreasing relative to the input.

Essentially I’m after the same effect you might get using a DJ controller to slow down/ speed up a sample, though ideally at a steady pitch.

Any ideas?
Thanks.

#259105
Aug 16, 2013 at 11:55pm

have a look at buffer~, groove~, play~,… for the sound part. And the cv.jit externals maybe. Jit.op and absdiff are your friends too. If you use max for live, there are devices (one is called ‘motion… something’) made to do this kind of things.

#259120
Aug 17, 2013 at 11:46am

Thanks for the tips, though unfortunately I’m not a max for live user.

Here’s what I’ve got so far (taken from another thread on here). It almost does what I’m trying to do but ideally the pitch would remain constant and the sound would only be played when the slider value is increasing. I’m trying to use grainstretch to shift the pitch up relative to the slowness of the movement but I’m not entirely confident this will work.

– Pasted Max Patch, click to expand. –
#259147
Aug 17, 2013 at 2:30pm

Something went wrong pasting your patcher in, I think. I can’t open it.
Sounds a lot like granular synthesis, or fft analysis/resynthesis.
Using granular synthesis to pitch up what went down when you play back at slower rates is certainly interesting but somewhat missed the point of granular stuff.
With granular sampling you can play back an audio file at any speed without changing the pitch (there are downsides also as everywhere in life). There should be a nice example that come with max but I can’t find it right now.
But you can find tons of granular samplers online.
hope that helps
cheers

#259150
Aug 17, 2013 at 10:14pm

grainstretch~ (32bit) is useful for this kind of thing, especially if you are reading from a buffer, because it opens the possibility of great effects.

#259161
Aug 18, 2013 at 2:42am

grainstretch~

Does exactly wot it sez on the tin

#259169
Aug 18, 2013 at 4:57am

. . . and here’s a super simple grain stretcher, which decorrelates playback speed and pitch.

– Pasted Max Patch, click to expand. –

Brendan

#259177

You must be logged in to reply to this topic.