diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 8d23058..360324c 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -77,7 +77,7 @@ function stop() { newSoundJustRecorded = true; // https://p5js.org/reference/#/p5.FFT/analyze - pitch = fft.analyze(); + pitch = getMaxPitch(fft.analyze()); // https://p5js.org/reference/#/p5.SoundFile/getPeaks amplitude = recording.getPeaks(1)[0] * 100;