Stopping an event with infinite duration

To give some further alternatives, wrapping with a group-based solution can also be done with Pbindf or Pchain (<>):

p = Pbind(\dur, inf);
Pbindf(p, \group, g = Group()).play;

g.release


p = Pbind(\dur, inf);
(p <> (group: g = Group())).play;

g.release

// also release time can be passed
// g.release(5)
1 Like