Forums > MaxMSP

Set the sinusoids positive/negative

Jan 04 2011 | 11:25 pm

I have a scope object that, with the same inputs (two sinusoids) when activated for the first time gives me the result shown in Figure A (attached), if I active it for the second time it show as in Figure B.
Is there a way to set the sinusoids, only positive/negative (A) or only positive (B)?


  1. sinusoids.jpg


Jan 05 2011 | 2:40 am

maybe post your patch so that the problem can be localized better. otherwise, check the inspector for the scope~ and get to know the corresponding parameters and messages which you can see in its help-file(paying close attention to the lo-hi ranges and the triggering). and also make sure that there is nothing before the scope~ that might be causing the sinusoids to only output absolute values upon second activation, etc.

hope that helps.

*Never fear, Noob4Life was never here!*

Jan 05 2011 | 3:32 am

Here’s some info that may not be totally obvious, and I think is not even really well documented. The right ("phase") inlet of the cycle~ object should more accurately be called the "phase offset" inlet. When MSP is turned on, every cycle~ object starts at cosine phase (at a value of 1), plus whatever phase offset is specified in the right inlet either by a signal or by the most recently received float (with the phase offset value specified as a fraction of a cycle). Thus, you can cause a cycle~ to start in sine phase by sending the value 0.75 (or -0.25) into the right inlet before you turn on MSP.

If two cycle~ objects have the same frequency when MSP is turned on, then it’s easy to control their phase relationship reliably. But if they have different frequencies at first, then you set them to the same frequency (without restarting MSP) it’s nearly impossible to know what their phase relationship will be, so even if you give them the same phase offset value, they still won’t be in phase. You’d have to restart MSP (to get them back in phase with each other) in order for the difference in their phase offsets to be very meaningful.

Here’s a patch that lets you test that. Initially it uses subsonic frequencies so you can visualize the resulting summed waveform better.

-- Pasted Max Patch, click to expand. --

Jan 05 2011 | 3:55 pm

Thank you both, particularly Dobrian Christopher that has made clear with its detailed response and with the example all my doubts.
Thanks a lot.

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

Forums > MaxMSP