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?
Depends on exactly which type of oscillation you mean, but yes.
Check out wave~/zigzag~/index~.
jml
the right inlet of [cycle~] is the phase
you can set it and start the envelope simultaneously
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.
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.
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!
OK here goes
OK, I get the idea, but its still not doing what I want : /
I've attached two pictures to try and illustrate the problem.
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?
yeah forgot to say i turned that down...
Try giving the ADSR attack/decay 0.
Bizarre, do you think it could be something to do with my computer? (Dell Inspiron 8600)
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
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
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
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?
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
bump
why can't i open any of the compressed patchers in this thread?
can anyone else reproduce?
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