Skip to content

Commit 7f6adec

Browse files
committed
added p5 prefix to example code in classes
1 parent 172e3f2 commit 7f6adec

File tree

13 files changed

+32
-32
lines changed

13 files changed

+32
-32
lines changed

src/Amplitude.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Context as ToneContext } from "tone/build/esm/core/context/Context.js";
2020
* cnv.mousePressed(playSound);
2121
* textAlign(CENTER);
2222
* fill(255);
23-
* amp = new Amplitude();
23+
* amp = new p5.Amplitude();
2424
* sound.connect(amp);
2525
* }
2626
*

src/AudioIn.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import { start as ToneStart } from "tone/build/esm/core/Global.js";
1616
* cnv.mousePressed(startMic);
1717
* background(220);
1818
*
19-
* mic = new AudioIn();
20-
* delay = new Delay(0.74, 0.1);
21-
* filter = new Biquad(600, "bandpass");
19+
* mic = new p5.AudioIn();
20+
* delay = new p5.Delay(0.74, 0.1);
21+
* filter = new p5.Biquad(600, "bandpass");
2222
*
2323
* mic.disconnect();
2424
* mic.connect(delay);

src/Delay.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import { clamp } from './Utils';
2020
* textAlign(CENTER);
2121
* text('tap to play', width/2, height/2);
2222
*
23-
* osc = new Oscillator('square');
23+
* osc = new p5.Oscillator('square');
2424
* osc.amp(0.5);
25-
* delay = new Delay(0.12, 0.7);
25+
* delay = new p5.Delay(0.12, 0.7);
2626
*
2727
* osc.disconnect();
2828
* osc.connect(delay);
@@ -68,10 +68,10 @@ class Delay {
6868
* textSize(9);
6969
* text('click and drag mouse', width/2, height/2);
7070
*
71-
* osc = new Oscillator('sawtooth');
71+
* osc = new p5.Oscillator('sawtooth');
7272
* osc.amp(0.74);
73-
* env = new Envelope(0.01);
74-
* delay = new Delay(0.12, 0.7);
73+
* env = new p5.Envelope(0.01);
74+
* delay = new p5.Delay(0.12, 0.7);
7575
*
7676
* osc.disconnect();
7777
* osc.connect(env);

src/Envelope.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ class Envelope {
6060
* textSize(10);
6161
* text('tap to triggerAttack', width/2, height/2);
6262
*
63-
* osc = new Oscillator();
63+
* osc = new p5.Oscillator();
6464
* osc.disconnect();
65-
* env = new Envelope();
65+
* env = new p5.Envelope();
6666
* osc.connect(env);
6767
* }
6868
*
@@ -107,9 +107,9 @@ class Envelope {
107107
* textSize(10);
108108
* text('tap to triggerAttack', width/2, height/2);
109109
*
110-
* osc = new Oscillator();
110+
* osc = new p5.Oscillator();
111111
* osc.disconnect();
112-
* env = new Envelope();
112+
* env = new p5.Envelope();
113113
* osc.connect(env);
114114
* }
115115
*

src/FFT.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import { Gain as ToneGain } from "tone/build/esm/core/context/Gain.js";
1515
* function setup(){
1616
* let cnv = createCanvas(100,100);
1717
* cnv.mouseClicked(togglePlay);
18-
* fft = new FFT(32);
19-
* osc = new TriOsc(440);
18+
* fft = new p5.FFT(32);
19+
* osc = new p5.TriOsc(440);
2020
* osc.connect(fft);
2121
* }
2222
*

src/Gain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Gain as ToneGain } from "tone/build/esm/core/context/Gain.js";
1818
* cnv = createCanvas(100, 100);
1919
* cnv.mousePressed(playSound);
2020
*
21-
* gain = new Gain(0.74);
21+
* gain = new p5.Gain(0.74);
2222
* osc = new p5.Oscillator();
2323
* osc.amp(0.74);
2424
* osc.disconnect();

src/Noise.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import { Noise as ToneNoise } from "tone/build/esm/source/Noise.js";
1717
* cnv = createCanvas(100, 100);
1818
* textAlign(CENTER);
1919
* cnv.mousePressed(start);
20-
* noise = new Noise(noiseType);
21-
* env = new Envelope(0.01, 0.1, 0.15, 0.5);
20+
* noise = new p5.Noise(noiseType);
21+
* env = new p5.Envelope(0.01, 0.1, 0.15, 0.5);
2222
* noise.disconnect();
2323
* noise.connect(env);
2424
* noise.start();

src/Oscillator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { clamp } from "./Utils";
2020
* describe("a sketch that demonstrates the frequency and amplitude parameters of an oscillator.");
2121
* let cnv = createCanvas(100, 100);
2222
* cnv.mousePressed(playOscillator);
23-
* osc = new Oscillator();
23+
* osc = new p5.Oscillator();
2424
* }
2525
*
2626
* function draw() {
@@ -126,8 +126,8 @@ class Oscillator {
126126
* textWrap(WORD);
127127
* textSize(10);
128128
*
129-
* osc = new Oscillator('sine');
130-
* lfo = new Oscillator(1);
129+
* osc = new p5.Oscillator('sine');
130+
* lfo = new p5.Oscillator(1);
131131
* lfo.disconnect();
132132
* osc.amp(lfo);
133133
* }
@@ -170,7 +170,7 @@ class Oscillator {
170170
* function setup() {
171171
* let cnv = createCanvas(100, 100);
172172
* cnv.mousePressed(startOscillator);
173-
* osc = new Oscillator();
173+
* osc = new p5.Oscillator();
174174
* }
175175
*
176176
* function startOscillator() {

src/Panner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import { clamp } from './Utils';
2020
* background(220);
2121
* cnv.mousePressed(startSound);
2222
*
23-
* panner = new Panner();
24-
* lfo = new Oscillator(1);
23+
* panner = new p5.Panner();
24+
* lfo = new p5.Oscillator(1);
2525
* //disconnect lfo from speakers because we don't want to hear it!
2626
* lfo.disconnect();
2727
* panner.pan(lfo);

src/Panner3D.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { Panner3D as TonePanner3D} from "tone/build/esm/component/channel/Panner
4545
* vY = random(-0.5, 0.5);
4646
* vZ = random(-0.5, 0.5) * 1.5;
4747
*
48-
* spatializer = new Panner3D();
48+
* spatializer = new p5.Panner3D();
4949
* spatializer.maxDist(100);
5050
* soundSource.loop();
5151
* soundSource.disconnect();

0 commit comments

Comments
 (0)