RNBO Objects & Operators cycle~
Open Help

cycle~

A periodic waveform oscillator.

Description

Generate a periodic waveform. The default waveform is one cycle of a cosine wave, but can be set to reference a named buffer.

Arguments

frequency [auto]

Optional

Depending on the index mode this is the frequency (in Hz) or the phase (0. - 1.).

buffername [symbol]

Optional

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.

Inlets

frequency [auto]

Depending on the index mode this is the frequency (in Hz) or the phase (0. - 1.).

phase_offset [auto]

If index mode is set to frequency (default), a value between 0. and 1. determines the phase offset. If index mode is set to phase, this inlet does nothing and phase is controlled using the left inlet.

Outlets

out1 [signal]

Oscillator audio output.

out2 [signal]

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

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

buffername [symbol] (default: RNBODefaultSinus)

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.

index [enum] (default: freq)

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.
Possible values:

0 = 'freq'
1 = 'phase'
2 = 'both'

interp [enum] (default: linear)

Sets the interpolation mode for the internal buffer used by cycle~.

  • linear (default)
  • cubic
  • spline
  • cosine
  • step
  • none
Possible values:

0 = 'linear'
1 = 'cubic'
2 = 'spline'
3 = 'cosine'
4 = 'step'
5 = 'none'
6 = 'fastcubic'
7 = 'spline6'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

buffer [number] (default: 0)

If multiple buffer names are declared to be used, this sets the currently active buffer using an index [0 based].

frequency [auto]

Depending on the index mode this is the frequency (in Hz) or the phase (0. - 1.).

phase_offset [auto]

If index mode is set to frequency (default), a value between 0. and 1. determines the phase offset. If index mode is set to phase, this inlet does nothing and phase is controlled using the left inlet.

reset [bang] (default: 0)

Unlike many reset attributes, this does not reset the rest of the operator state, only phase.

See Also

Name Description
cycle~
phasor~ Generate sawtooth signals
triangle~ A triangle/ramp wavetable oscillator with a phase input.