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:

Windowing an audio signal

In signal processing, a "window" is a function (shape) that is nonzero for some period of time, and zero before and after that period. When multiplied by another signal, it produces an output of 0 except during the nonzero portion of the window, when it exposes the other signal. The simplest example is a rectangular window, which is 0, then briefly is 1, then reverts to 0. The windowed signal will be audible only when it is being multiplied by 1––i.e., during the time when the rectangular windowing occurs.