How to change an oscillators phase on demand
I would like to be able to send a message which determines an oscillators phase. For example, every time I press a button I would like a message to be delivered to a [phasor~] stating that it should immediately restart it's waveform cycle from 0 or 1. Could anyone help me in coming up with a way of doing this? I have looked at the help files and do not seem to be able to resolve the issue myself. I would like to be able to press this button at any point int time and on every occasion the waveform cycle will immediately jump to the specified value.
The reason I am wanting to do this is because I am using [phasor~] as a timing source, whereby a bang is outputted every time it restarts a waveform cycle i.e. 120bpm = 0.5Hz. I would like to be able to stop and start this counting mechanism - and every time I do so the [phasor~] waveform cycle is told to start at a specific value.
Have we been here before?
Brendan
I think maybe with a related question - I have posted a few regarding [phasor~] object in the past.. Thanks for the help! That looks to be exactly what I am looking for. Is the phase simply determined by a single message with one sole value in it? In this case a [0]?
Hmm... that is very strange as my .maxhelp looks different to that - and does not provide as much information. It offers a tab for further details regarding tempo - but it doesn't say anything about phase. It is because I am using max 6. Thanks for the screenshot of max 5 help file though - as before this I did not understand why some people where telling me to search for things in the help file which I could not find.
Also, try the mouseovers: if you hold your mouse over the inlet, it'll tell you what it does (right inlet is "phase")