Skip to main content

triangle

triangle(
@frequency 440
@duration 50
@phase 0
@offset 0.5
) -> llll

Generates a triangular/ramp oscillator as a buffer.


Arguments

  • @frequency [int/float/llll]: frequency, either as a single number, envelope, or buffer. (default: 440).
  • @duration [int/float]: buffer duration, in milliseconds (default: 50).
  • @phase [int/float]: initial phase, in the 0-1 range. (default: 0).
  • @offset [int/float]: peak position offset, in the 0-1 range. (default: 0.5).

Output

synthesized buffer [llll]


Usage

$buffer = triangle();
$buffer.inspect('triangle buffer')