How to change an oscillators phase on demand

DJF's icon

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.

brendan mccloskey's icon

Have we been here before?

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan

DJF's icon

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]?

brendan mccloskey's icon

This is referred to in the helpfiles you say you've looked at.......explore the Reference section in the helpfile

3723.Capture.PNG
PNG
DJF's icon

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.

3724.Screenshot20120416at19.18.04.png
png
Peter McCulloch's icon

Also, try the mouseovers: if you hold your mouse over the inlet, it'll tell you what it does (right inlet is "phase")