From abcb47aa6a93a0413f3fd41cea469c2bfe2a4bb2 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 7 Feb 2020 10:35:39 +0100 Subject: [PATCH] Document inline --- voicegardens/static/voicegardens.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index d4c712e..ef3286a 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -77,9 +77,13 @@ function stop() { // signal to the draw loop that we should generate a new shape newSoundJustRecorded = true; - // store sound properties from recording + // https://p5js.org/reference/#/p5.FFT/analyze pitch = fft.analyze(); + + // https://p5js.org/reference/#/p5.SoundFile/getPeaks amplitude = recording.getPeaks(); + + // https://p5js.org/reference/#/p5.SoundFile/duration duration = recording.duration(); } }