Codebox Operators rect

rect

Anti-aliased rectangular (pulse) oscillator.

new rect()

Methods

next(frequency, pulsewidth, syncPhase): [out1, out2]

Arguments

NameTypeDefaultDescription
frequencynumber
pulsewidthnumber0.5
syncPhasenumber

Returns

NameTypeDescription
out1number

An antialiased rectangular waveform. An ideal, straight-line
rectangular wave generated in a computer contains aliased
frequencies that can sound irritating. {rnbo_rect~} produces a
nice, analog-esque output waveform.

out2number

The phase of the oscillator.

reset(): void