cycle~

Cycle~ phase demo

This patch allows you to see how the phase relationship between two sine waves will affect the shape of the waveform when the two are mixed together. Initially, it shows a 4-Hz sinusoid and an 8-Hz sinusoid that are one-half cycle out of phase with each other. If you change the phase offset of one of the oscillators, you can see that the waves interfere differently, thus changing the shape of the waveform. However, as listeners we're not very sensitive to such changes in phase relationships, except in certain cases where waves cancel each other in extreme ways.

Sine Wave into Buffer~

The cycle~ object allows you to read from a stored cosine function (use a phase offset of 0.75 to get a sine phase), and does high-quality interpolation to give you excellent resolution even though it only uses a 512-sample table. (See MSP Tutorial chapters 1-3).

But if you want to put a sine wave into a buffer~, here’s a way:

MIDI stream to exponential curve

In this patch the zmap object changes the scale of the incoming number stream from the ctlin object from the standard range of MIDI (0-127) – the 0 is bypassed so that it is translated properly once the range is mapped back to linear amplitude – to a specified range in decibels – in the case of the example from -63 to 0 dB.

Phase cancellation due to delay

A sinusoid added to a delayed version of itself will result in a sinusoid of the same frequency but with its amplitude altered. The amount of amplitude change will depend on the phase relationship between the original sinusoid and its delayed copy. The two sinusoids will interfere with each other either constructively (reinforcing each other) or destructively (tending to cancel each other).