Skip to content

Commit 5f57111

Browse files
committed
fix(tutorial): use p5.Oscillator constructor
Fixes a ReferenceError in the simple-melody-app tutorial where Oscillator was used without the p5 namespace, causing the example to fail at runtime.
1 parent ec7469b commit 5f57111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/tutorials/en/simple-melody-app.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ let myFreq = 262;
295295
function setup() {
296296
  createCanvas(400, 400);
297297
  // Create the Oscillator object.
298-
  osc = new Oscillator(myFreq);
298+
  osc = new p5.Oscillator(myFreq);
299299
  // console.log(osc.f);
300300
}
301301

0 commit comments

Comments
 (0)