How can I control in real time the phase of a phasor reading a wave~

Marcelo Mellado's icon

Good afternoon.
Im new to using the MC. objects and in overall to the audio universe in Max as I do more jitter stuff.

I simply want to be able to offset the phases of the phasor object in real time. The phasors are reading a particular waveform that are multiplying the signal of the oscillator, so if I offset these signals (their phases) they will produce a sequence and not sound all at the same time. It seems you cannot change the phasor phase in real time so there must be another way I'm not aware of. That why I came here.

what would you use to achieve this ? or is there a better way to do it?

thanks!

ciclo sonoro not working.maxpat
Max Patch

TFL's icon

You tried "applyvalue phase" followed by floats, but phasor~ (and mc.phasor~) don't have any attribute or message named "phase", as per their documentation. That's why it doesn't work.

However, you can set their phaseoffset attribute, which changes their initial phase offset. So then you need to send a reset message to make them restart from their initial phase, each with their how set offset.

Another option is to send a float to phasor~ right inlet, or, in the mc.phasor~version, send a "applymessage" followed by one float for each channel to its right inlet. The phase will be changed instantaneously, but the phaseoffset attribute will not be affected, which means that if you send a reset message to the object, the phase will be reset to the phaseoffset amount.

Either one way or the other can be the best, depending on your situation. Both could even be used in tandem.

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

Also, please next time avoid sending the patcher file, but select your objects and go Edit > "Copy compressed" instead, and paste the result here.

Roman Thilenius's icon

to set the phase to an arbitrary position while it runs you can combine resyncing and shifting.

resyncing using signals is built-in since a a few years (click~ to right inlet), and phase shifting using signals is [+~ 0.37] [%~ 1.], where you could set a new + signal at the same sample where you also reset the phasor~ object.