Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/analysis/Amplitude.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ import { p5soundNode } from "../core/p5soundNode.js";
* <div>
* <code>
* let sound, amp, cnv;
*
* function preload() {
* //replace this sound with something local with rights to distribute
* sound = loadSound('/assets/Damscray_DancingTiger.mp3');
* }
*
* function setup() {
*
* async function setup() {
* cnv = createCanvas(100, 100);
* cnv.mousePressed(playSound);
* textAlign(CENTER);
* fill(255);
* //replace this sound with something local with rights to distribute
* sound = await loadSound('/assets/Damscray_DancingTiger.mp3');
* amp = new p5.Amplitude();
* sound.connect(amp);
* }
Expand Down
9 changes: 3 additions & 6 deletions src/effects/Gain.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ import { p5soundNode } from "../core/p5soundNode.js";
* <div>
* <code>
* let cnv, soundFile, osc, gain;
*
* function preload() {
* soundFile = loadSound('assets/Damscray_DancingTiger.mp3');
* }
*
* function setup() {
*
* async function setup() {
* cnv = createCanvas(100, 100);
* cnv.mousePressed(playSound);
* background(220);
* soundFile = await loadSound('assets/Damscray_DancingTiger.mp3');
* gain = new p5.Gain(0.74);
* osc = new p5.Oscillator();
* osc.amp(0.74);
Expand Down
18 changes: 6 additions & 12 deletions src/effects/Panner.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@
* <div>
* <code>
* let panner, lfo, soundfile, cnv;
*
* function preload() {
* soundfile = loadSound('/assets/beat.mp3');
* }
*
* function setup() {
*
* async function setup() {
* createCanvas(100, 100);
* describe("a sketch that pans a sound source to the left speaker channel")
* background(220);
* soundfile = await loadSound('/assets/beat.mp3');
* panner = new p5.Panner(-1);
* soundfile.loop();
* soundfile.disconnect();
Expand Down Expand Up @@ -58,15 +55,12 @@
* <div>
* <code>
* let panner, lfo, soundfile, cnv;
*
* function preload() {
* soundfile = loadSound('/assets/beat.mp3');
* }
*
* function setup() {
*
* async function setup() {
* createCanvas(100, 100);
* describe("a sketch that pans a sound source between the left and right speaker channels");
* background(220);
* soundfile = await loadSound('/assets/beat.mp3');
* panner = new p5.Panner();
* lfo = new p5.Oscillator(1);
* //disconnect lfo from speakers because we don't want to hear it!
Expand Down
9 changes: 3 additions & 6 deletions src/effects/Panner3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@ import { p5soundNode } from "../core/p5soundNode.js";
* let vY;
* let vZ;
*
* function preload() {
* soundSource = loadSound('/assets/beat.mp3');
* font = loadFont('/assets/SourceSansPro-Regular.otf');
* }
*
* function setup() {
* async function setup() {
* describe(
* 'A 3D shape with a sound source attached to it. The sound source is spatialized using the Panner3D class. Click to play the sound.'
* );
* cnv = createCanvas(100, 100, WEBGL);
* soundSource = await loadSound('/assets/beat.mp3');
* font = await loadFont('/assets/SourceSansPro-Regular.otf');
* cnv.mousePressed(playSound);
*
* camera(0, 0, 0, 0, 0, 1);
Expand Down