Why won't sfplay~ stop?

Aug 31, 2011 at 1:25pm

Why won't sfplay~ stop?


I’m sorry if it’s an obvious problem – I am new to wonder that is Max.

Basically, I have set up a sampler which counts through the samples. It is made very slightly more complicated by the fact I am using 10 channels and different samples go to different outputs, but never more than one at a time.

I have set up the patch to count on to the next sample once the last has finished. However, I can’t get it to stop!

I am sending a [0] to all the sfplay~ objects, and the counter at the same time but it doesn’t stop playing – it just loops to the next sample.

Any help would be very much appreciated!

Aug 31, 2011 at 4:15pm

It would certainly help to see your patch, or even the relevant section of it. From your description, it may be a [counter] issue, not being reset correctly or at the correct time perhaps; are you familiar with the [trigger] object?


Aug 31, 2011 at 6:07pm

Hopefully this will mean you can see my patch. This is actually a sub patch and I am sending a bang to [r stopmsg] from the main patch if that’s important.

Thank you!

– Pasted Max Patch, click to expand. –
Aug 31, 2011 at 8:39pm

You can see the problem if you connect a [print] object to the number box just below the counter. The counter is sending an integer > 0.

Aug 31, 2011 at 8:48pm

To be a bit clearer here, your 0 is never getting to the sfplay~ objects.

Aug 31, 2011 at 9:34pm

Thanks newdendrite. I see what you mean. Do you happen to know how I can get a 0 into the counter and stop in continuing to count round in the loop?

Sending 0 to the fourth input on the counter seems to send a 0, but that just sets off the loop and the counter starts counting again.

I just seem to be stuck in a perpetual loop and would really appreciate any pointers.

I haven’t used the [trigger] object that Brendan suggests so I’m afraid I don’t quite know how best to try and use it.

Many thanks

Aug 31, 2011 at 9:51pm

I think you should remove the [r stopmsg] stuff at the top of the patch that is connected to the counter. The counter is not what’s driving the patch, absent a user clicking on the big button at the top, and as it is now, the stopmsg stuff just starts again from the beginning.


You must be logged in to reply to this topic.