Reference p5.SawOsc

p5.SawOsc

Creates a sawtooth oscillator.

Syntax

p5.SawOsc([freq])

Parameters

freq
Number: Set the frequency * @example
function setup() { describe("a sketch that creates an oscillator with a sawtooth wave shape"); createCanvas(100, 100); textAlign(CENTER); textWrap(WORD); textSize(10); osc = new p5.SinOsc; } function mousePressed() { osc.start(); } function draw(){ background(220); text('click to hear a sawtooth wave shape', 0, 10, 100); }

Related References