Forums > MaxMSP

Syncing Oscillator to envelope

April 4, 2008 | 10:13 pm

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?



jml
April 4, 2008 | 11:14 pm

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

jml


April 5, 2008 | 12:28 am

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


July 16, 2008 | 9:17 pm

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.


July 17, 2008 | 11:29 am

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.


July 17, 2008 | 7:11 pm

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!


July 17, 2008 | 7:54 pm

OK here goes

– Pasted Max Patch, click to expand. –

July 17, 2008 | 9:48 pm

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

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


July 17, 2008 | 10:15 pm

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?


July 17, 2008 | 10:23 pm

yeah forgot to say i turned that down…


July 18, 2008 | 12:52 am

Try giving the ADSR attack/decay 0.


July 18, 2008 | 1:09 am

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


July 18, 2008 | 1:07 pm

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)…

hth,

j


July 18, 2008 | 2:45 pm

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"…

j

– Pasted Max Patch, click to expand. –

July 3, 2009 | 12:26 am

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. –

July 4, 2009 | 12:05 am
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?


July 4, 2009 | 12:28 am

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


September 7, 2009 | 11:58 pm

bump

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

can anyone else reproduce?


September 8, 2009 | 2:23 pm

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

bizarre


Viewing 19 posts - 1 through 19 (of 19 total)