Skip to content

Commit ff19284

Browse files
committed
Add documentation for getPlaybackRate in p5.SoundFile class
1 parent 128fa86 commit ff19284

File tree

1 file changed

+0
-99
lines changed

1 file changed

+0
-99
lines changed

src/amplitude.js

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -177,60 +177,6 @@ class Amplitude {
177177
}
178178
}
179179

180-
/**
181-
* Connects the output of a p5.Amplitude object to input of another
182-
* p5.sound object. For example, you may connect a p5.Amplitude to an
183-
* FFT or an Effect.
184-
*
185-
* @method connect
186-
* @for p5.Amplitude
187-
* @param {Object} object Audio object that accepts an input
188-
* @example
189-
* <div><code>
190-
* let sound, amplitude, fft, button;
191-
* function preload(){
192-
* sound = loadSound('assets/beat.mp3');
193-
* }
194-
*
195-
* function setup() {
196-
* let cnv = createCanvas(100,100);
197-
* cnv.mouseClicked(togglePlay);
198-
* amplitude = new p5.Amplitude();
199-
* button = createButton("tap to disconnect amp");
200-
* button.mouseClicked(amp_disconnect);
201-
* button.position(0,110);
202-
* fft = new p5.FFT();
203-
* sound.loop();
204-
* }
205-
*
206-
* function draw() {
207-
* background(220);
208-
* text('tap to play', 20, 20);
209-
* let level = amplitude.getLevel();
210-
* let size = map(level, 0, 1, 0, 200);
211-
* ellipse(width/2, height/2, size, size);
212-
* }
213-
*
214-
* function togglePlay() {
215-
* if (sound.isPlaying()){
216-
* sound.pause();
217-
* }
218-
* else{
219-
* sound.play();
220-
* }
221-
* }
222-
* function amp_disconnect(){
223-
* if (button.html()=="tap to disconnect amp"){
224-
* amplitude.disconnect();
225-
* button.html("tap to connect fft");
226-
* }
227-
* else{
228-
* amplitude.connect(fft);
229-
* button.html("tap to disconnect amp");
230-
* }
231-
* }
232-
* </code></div>
233-
*/
234180
connect(unit) {
235181
if (unit) {
236182
if (unit.hasOwnProperty('input')) {
@@ -244,51 +190,6 @@ class Amplitude {
244190
// }
245191
}
246192

247-
/**
248-
* Disconnects the output of this p5.Amplitude object.
249-
*
250-
* @method disconnect
251-
* @for p5.Amplitude
252-
* @example
253-
* <div><code>
254-
* let sound, amplitude, button;
255-
* function preload(){
256-
* sound = loadSound('assets/beat.mp3');
257-
* }
258-
*
259-
* function setup() {
260-
* let cnv = createCanvas(100, 100);
261-
* cnv.mouseClicked(togglePlay);
262-
* button = createButton();
263-
* button.mouseClicked(amp_disconnect);
264-
* button.html('tap to disconnect amplitude');
265-
* button.position(0,100);
266-
* amplitude = new p5.Amplitude();
267-
* sound.loop();
268-
* }
269-
*
270-
* function draw() {
271-
* background(220);
272-
* text('tap to play', 20, 20);
273-
* let level = amplitude.getLevel();
274-
* let size = map(level, 0, 1, 0, 200);
275-
* ellipse(width/2, height/2, size, size);
276-
* }
277-
*
278-
* function togglePlay() {
279-
* if (sound.isPlaying()){
280-
* sound.pause();
281-
* }
282-
* else{
283-
* sound.play();
284-
* }
285-
* }
286-
* function amp_disconnect(){
287-
* amplitude.disconnect();
288-
* button.html('amplitude disconnect now');
289-
* }
290-
* </code></div>
291-
*/
292193
disconnect() {
293194
if (this.output) {
294195
this.output.disconnect();

0 commit comments

Comments
 (0)