Syncing Oscillator to envelope

Apr 4, 2008 at 10:13pm

Syncing Oscillator to envelope

Is there a way to sync a running oscillator to an envelope so that the wave will begin at 0 at the exact point the envelope begins?

Apr 4, 2008 at 11:14pm

Depends on exactly which type of oscillation you mean, but yes.
Check out wave~/zigzag~/index~.


Apr 5, 2008 at 12:28am

the right inlet of [cycle~] is the phase
you can set it and start the envelope simultaneously

Jul 16, 2008 at 9:17pm

Still can’t get this to work properly

Basically I have some waveforms in buffers, I’m trying to synthesise a kick drum and I’d like the start to be at 0 rather than -1 or 0.5

I’ve tried setting the phase to 0 with cycle when the envelope is triggered but that just doesn’t work.

I’m a bit lost with how to do it with the other objects too.

Jul 17, 2008 at 11:29am

sorry can’t make a patch right now, I’ll try tomorrow when I have more time.

Here’s another go…

I have a buffer with 512 samples.

I have an envelope.

I want them both to start at exactly the same time.

Jul 17, 2008 at 7:11pm

Hey thanks for the patch, unfortunately it doesn’t do what I want. How do you condense a patch in to that? is it just saved as text?

My waveforms are stored in buffers and played back with cycle~ (at the moment) my envelope is with adsr~

I’ll try and post a patch when I can figure out how!

Jul 17, 2008 at 7:54pm

OK here goes

– Pasted Max Patch, click to expand. –
Jul 17, 2008 at 9:48pm

OK, I get the idea, but its still not doing what I want : /

I’ve attached two pictures to try and illustrate the problem.

Jul 17, 2008 at 10:15pm

The images were taken from wavesurfer with a recorded file directly from the patch. They’re zoomed in quite far so it probably would look normal on the oscilloscope. Thanks for the help anyway :)

Anyone else have any ideas?

Jul 17, 2008 at 10:23pm

yeah forgot to say i turned that down…

Jul 18, 2008 at 12:52am

Try giving the ADSR attack/decay 0.

Jul 18, 2008 at 1:09am

Bizarre, do you think it could be something to do with my computer? (Dell Inspiron 8600)

Jul 18, 2008 at 1:07pm

adsr~ can be triggerd with signals, check the helpfile and look into the patcher “p signals”.

also its best to use signals to sync the osc and envelope, as it will lead to better accuracy (rather than scheduler)…



Jul 18, 2008 at 2:45pm

see attached patch for a demo of how to sync an oscillator’s phase to an envelope trigger, it’s actually a modified version of the msp example “oscsync-advanced”…


– Pasted Max Patch, click to expand. –
Jul 3, 2009 at 12:26am

I am again going crazy over this, for some reason this seems to be starting at the peak of the sine wave +1, rather than at 0.

I’d like someone to explain part of this patch as I don’t know exactly what its doing (which isn’t nice when it stops working) my knowledge of signal objects is pretty weak :[

Also, I can’t seem to open the other patchers in the thread for some reason

– Pasted Max Patch, click to expand. –
Jul 4, 2009 at 12:05am
Mike S wrote on Thu, 17 July 2008 13:29
I have a buffer with 512 samples.

I have an envelope.

I want them both to start at exactly the same time.

well you have to drive everything by a signal when you need “sync”.

do you do that?

Jul 4, 2009 at 12:28am

the envelope was with adsr, i could write one to a buffer easy enough though

i suppose that is the easier way of doing it

thanks again Raja, I really apreciate the help

Sep 7, 2009 at 11:58pm


why can’t i open any of the compressed patchers in this thread?

can anyone else reproduce?

Sep 8, 2009 at 2:23pm

yes almost always

i actually tried it just now and it works fine. this was on loading max, usually i already have a patch or two open but i don’t know why that would have anything to do with it



You must be logged in to reply to this topic.