Codebox Operators cycle

cycle

A periodic waveform oscillator.

new cycle([options])

Options

NameTypeDefaultDescription
buffernamesymbolRNBODefaultSinus

The buffername attribute followed by the name of a valid buffer will fill the cycle~ wavetable with the values from that buffer instead of the default wavetable.

indexenumfreq

Sets whether the cycle~ index is set using a frequency in hz or phase.
* 0 = frequency (default)
* 1 = phase. In this mode the left inlet controls the phase offset position and the right inlet does nothing.

Enum Values:
freq | phase | both

interpenumlinear

Sets the interpolation mode for the internal buffer used by cycle~.
* linear (default)
* cubic
* spline
* cosine
* step
* none

Enum Values:
linear | cubic | spline | cosine | step | none | fastcubic | spline6

Methods

next(frequency, phase_offset): [out1, out2]

Arguments

NameTypeDefaultDescription
frequencynumber
phase_offsetnumber

Returns

NameTypeDescription
out1number

Oscillator audio output.

out2number

The oscillator phase output shows the current phase as it cycles through the internal buffer.

reset(): out1

Returns

NameTypeDescription
out1