Forums > MaxMSP

Controlling the speed and playback position of a sound.

August 16, 2013 | 2:16 pm

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?

August 16, 2013 | 11:55 pm

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.

August 17, 2013 | 11:46 am

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. —
August 17, 2013 | 2:30 pm

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

August 17, 2013 | 10:14 pm

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.

August 18, 2013 | 2:42 am


Does exactly wot it sez on the tin

August 18, 2013 | 4:57 am

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

— Pasted Max Patch, click to expand. —


Viewing 7 posts - 1 through 7 (of 7 total)

Forums > MaxMSP