Variable input play~

rdesigner1's icon

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?

Max Patch
Copy patch and select New From Clipboard in Max.

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

Matthew's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

Here you go:

rdesigner1's icon

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.

rdesigner1's icon

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.

brendan mccloskey's icon

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

HIH

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan

rdesigner1's icon

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

brendan mccloskey's icon

Hi
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:

Max Patch
Copy patch and select New From Clipboard in Max.
rdesigner1's icon

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.

brendan mccloskey's icon

Ok
here ya go:

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan

youcloudsofdoom's icon

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?

brendan mccloskey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hi
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):

Brendan