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?

#36737
Apr 4, 2008 at 11:14pm

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

jml

#126255
Apr 5, 2008 at 12:28am

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

#126256
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.

#126257
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.

#126259
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!

#126261
Jul 17, 2008 at 7:54pm

OK here goes

– Pasted Max Patch, click to expand. –
#126263
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.

#126266
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?

#126268
Jul 17, 2008 at 10:23pm

yeah forgot to say i turned that down…

#126270
Jul 18, 2008 at 12:52am

Try giving the ADSR attack/decay 0.

#126273
Jul 18, 2008 at 1:09am

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

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

hth,

j

#126280
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”…

j

– Pasted Max Patch, click to expand. –
#126281
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. –
#126283
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?

#126285
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

#126286
Sep 7, 2009 at 11:58pm

bump

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

can anyone else reproduce?

#126287
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

bizarre

#126289

You must be logged in to reply to this topic.