Yeah, a threshold~ set to 1 is never triggered (or very rarely). <br>So there's no perfect answer to the question it seems...<br><br>Pierre<br><br><div class="gmail_quote">2011/9/20 Roman Haefeli <span dir="ltr"><<a href="mailto:reduzent@gmail.com">reduzent@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Tue, 2011-09-20 at 09:43 +0200, Pierre Massat wrote:<br>
> I m curious to know which object you would recommend instead of<br>
> threshold~ (the delay way is obviously not feasible as soon as you<br>
> need to change the speed of phasor~ during palyback).<br>
<br>
</div>Yeah, [threshold~] seems feasible, but this approach suffers from a few<br>
issues. As I said before, the bang comes only on block boundaries and is<br>
at least one block late, so it's not very precise. Also, a [phasor~]<br>
probably never reaches exactly 1 (or 0) and it is less likely the higher<br>
the frequency is. So you would need values like 0.001 or 0.999 for the<br>
[threshold~] which again makes it a bit more imprecise.<br>
<br>
You can also use the [vline~] approach and change the speed in the<br>
middle of the playback, though it needs a bit of patching to accomplish<br>
that. You need a delay, that is triggered at the time of the speed<br>
change. The delay value can be used to calculate the current position of<br>
the play head. Then you can use that value as a start point for a new<br>
message to [vline~].<br>
<font color="#888888"><br>
Roman<br>
</font><div><div></div><div class="h5"><br>
<br>
> 2011/9/20 Roman Haefeli <<a href="mailto:reduzent@gmail.com">reduzent@gmail.com</a>><br>
> On Mon, 2011-09-19 at 14:00 -0700, Jonathan Wilkes wrote:<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > >________________________________<br>
> > >From: tim vets <<a href="mailto:timvets@gmail.com">timvets@gmail.com</a>><br>
> > >To: Pierre Massat <<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>>; James Dunn<br>
> <<a href="mailto:james@4thharmonic.com">james@4thharmonic.com</a>>; pd-list <<a href="mailto:pd-list@iem.at">pd-list@iem.at</a>><br>
> > >Sent: Monday, September 19, 2011 4:08 PM<br>
> > >Subject: Re: [PD] stop sample playback when phasor~ reset?<br>
> > ><br>
> > ><br>
> > >When you use phasor~, you normally already know how long it<br>
> will take for the sound to be finished playing (because you<br>
> set its frequency to play it back at the proper speed)<br>
> > >Store the information about the sound loaded (or recorded)<br>
> and use that to stop the playback after one play duration.<br>
> > ><br>
> > ><br>
> > >[del <time>]<br>
> > >|<br>
> > >[t b b]<br>
> > >| |<br>
> > >[0( [0(<br>
> > >[ |<br>
> > >[phasor]<br>
> ><br>
> > What's the benefit of this over a line~ based approach?<br>
> ><br>
><br>
> [line~] is inferior to [phasor~] in that it only starts a ramp<br>
> on block<br>
> boundaries. Using [vline~] seems to me most flexible in terms<br>
> of sample<br>
> playback as it can start a ramp even in-between samples.<br>
><br>
> Using [threshold~] or any other method to detect the reset of<br>
> [phasor~]<br>
> is not feasible, because of two reasons:<br>
> * [threshold] (but also [snapshot~]) output the bang only at<br>
> block<br>
> bounaries, so the detection is not very precise<br>
> * Whenever the the audio domain (a signal) causes an event in<br>
> the<br>
> message domain (that's what [threshold~] and [snapshot~] are<br>
> for), the<br>
> event is at least one block late.<br>
><br>
> There is still one advantage of [phasor~] over [vline~]: The<br>
> speed of<br>
> the [phasor~] can be changed at signal rate, so one can create<br>
> continuous pitch changes when playing the sample. That's not<br>
> possible<br>
> with [vline~].<br>
><br>
> Roman<br>
><br>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br>