How to change an oscillators phase on demand

Apr 16, 2012 at 3:19pm

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.

#63010
Apr 16, 2012 at 3:39pm

Have we been here before?

– Pasted Max Patch, click to expand. –

Brendan

#227416
Apr 16, 2012 at 3:47pm

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

#227417
Apr 16, 2012 at 5:00pm

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

[attachment=191231,3723]

Attachments:
  1. Capture.PNG
#227418
Apr 16, 2012 at 6:23pm

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.

[attachment=191244,3724]

Attachments:
  1. Screenshot20120416at19.18.04.png
#227419
Apr 16, 2012 at 6:35pm

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

#227420

You must be logged in to reply to this topic.