Forums > MaxMSP

How to change an oscillators phase on demand


DJF
April 16, 2012 | 3:19 pm

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.


April 16, 2012 | 3:39 pm

Have we been here before?

– Pasted Max Patch, click to expand. –

Brendan



DJF
April 16, 2012 | 3:47 pm

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


April 16, 2012 | 5:00 pm

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


DJF
April 16, 2012 | 6:23 pm

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

April 16, 2012 | 6:35 pm

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


Viewing 6 posts - 1 through 6 (of 6 total)