Forums > MaxMSP

Variable input play~

December 10, 2011 | 5:49 am

I’m having trouble varying the looping speed of the play~ object. I have $1 set to the length of the recorded object within the buffer~, and $2 set for the speed at which I would like it to loop, but I can’t get the message to recognize these inputs. Any suggestions?

My messages look like "start 0, $1 $2" where $1 = 1164 and $2 = 50.

– Pasted Max Patch, click to expand. –
December 10, 2011 | 2:52 pm

Hello. That has to be one of the most unorganised patches I’ve ever seen! Take a look at the patcher object, that will make it easier for you and other people to read – well worth looking in to.

When I did find the section you were referring to, this is because ‘message’ is receiving both numbers at the same time and can’t differentiate between the two. If you send the result to a message object, you can see how the play~ object won’t be able to understand it. Also, you have to use the line~ object in conjunction with play~ to generate the ramp.

Here you go:

– Pasted Max Patch, click to expand. –
December 10, 2011 | 5:35 pm

Haha I thought it was decently organized! I suppose every parent believes their child isn’t unfortunately special. Well thank you for the patch. I’ll check it out.

December 10, 2011 | 5:51 pm

Is it possible to play the loop while input message is changing? I want the sound to "ramp up" as the loop gets tighter and tighter, playing all the while.

December 10, 2011 | 7:16 pm

this is my preferred method of variable rate play~ control:


– Pasted Max Patch, click to expand. –


December 10, 2011 | 8:59 pm

Brendan, besides adjusting pitch, how can I control how long it takes for the patch to cycle through one loop?

December 10, 2011 | 9:19 pm

if you mean variable loop size, then that’s already in there, just use [info~] to get file size; if not, then can you explain in more detail – pitch and loop/file size are independent here:

– Pasted Max Patch, click to expand. –


December 10, 2011 | 9:28 pm

I don’t think I’m explaining myself properly. It’s not a matter of finding the loop size. Say I establish the file, and as such the loop to be 6000 ms. I’d like to change the speed of the recording, not necessarily the pitch. I know the pitch will be affected as the speed increases, but I don’t need to control the pitch per se.

So if a real time recording 6000 ms long takes 6000 ms to play through, I’d like to play the same 6k ms clip back in 200 ms.

December 10, 2011 | 10:24 pm

here ya go:

– Pasted Max Patch, click to expand. –


December 26, 2013 | 5:05 am

Been trawling around looking for a solution to being able to scale the playback speed of play~ in a way that works like sfplay~, and Brendan’s last suggestion seems to work well – but my play~ object is no longer sending a bang out at the end of playback! Any idea how to get this to work again?

December 27, 2013 | 3:15 am

I am assuming that [play~]‘s right outlet only gives end-of-ramp bangs, in response to discrete messages. And this might explain why you’re not getting such bangs; but you can use [delta~] to get a bang from [phasor~], at the point that the ramp descends back to zero (end of ramp):


– Pasted Max Patch, click to expand. –



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