variable delay/phase shift at end of phasor~ ramp

Jun 19, 2013 at 11:31am

variable delay/phase shift at end of phasor~ ramp

Hello, this might be a pretty easy question, but I have searched around for quite awhile and have not been able to figure out a solution. I am trying to find a way to either produce a delay or shift in phase of a phasor~ object exactly when it ends its cycle. I would like to be able to input a number for the amount of delay at anytime and then it would implement the delay after the phasor~ cycle has ended. I have looked at some externals (wait~) this won;t work because the phasor~ cannot wait for itself. I have imagine this would be possible in gen~ but I don’t have much experience with it… Can anyone recommend a solution, or even point me in the right direction and I’ll try to figure the rest out… Thanks.

#253334
Jun 20, 2013 at 8:49am

Perhaps using sah~ ??

#253447
Jun 20, 2013 at 3:13pm

That’s the problem though, the signal to the delay~ amount will occur at the original zero point, I need it to delay variably at the delayed signal’s zero point.

<code>

– Pasted Max Patch, click to expand. –

</code>

#253482
Jun 20, 2013 at 3:38pm

The other method I have tried, and it works, is triggering a ramp with shot~ external by a train object. So I delay the pulse from train~ before it gets to shot~. The problem with that though, is that shot~ produces an uninterruptible phasor ramp so when I increase the frequency it skips an impulse trigger now and then. Maybe I can’t have my cake and eat it too.

<code>

– Pasted Max Patch, click to expand. –

</code>

#253484
Jun 20, 2013 at 6:11pm

If you just have a sah~ 0.5, it will trigger at the halfway point not at the end… and you need to initialize the delay~ object with a maximum delay time at least, i think…
But either way(whether you change delay using the source or change delay using the delayed(which is probably not fully possible without the history object in gen~ to allow for feedback loop))… you’ll create a discontinuity in the ramp at the point of change…

Slightly improved but still… probably not what you want…(you could also roll your own phasor using the accum object in gen~… or using count~ in regular msp):

– Pasted Max Patch, click to expand. –
#253507
Jun 21, 2013 at 2:46pm

Its going to be sent to a wave~ object so I need the ramp to be uninterrupted. I managed a way to do it with zigzag~ but now there is another problem, and it may because I don’t fully understand how train~ works. I am delaying a pulse train from train~ with a bandwidth of 0, it is at zero so when I change the delay amount the pulse does occur at the same time, or rather there is less of a chance for the delay to occur exactly where the pulse is. But now that train has a bandwidth of 0, it can only go as fast as 22.6ish milliseconds and then it just shuts off completely, maybe I am missing something but it seems like it should be relatively simple to produce a 1 sample width pulse at any frequency up to the sampling rate… not sure.

<code>

– Pasted Max Patch, click to expand. –

</code>

#253663

You must be logged in to reply to this topic.