Browse Source

Store the maximum pitch

main
Luke Murphy 4 years ago
parent
commit
e9c29c777a
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 2
      voicegardens/static/voicegardens.js

2
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;

Loading…
Cancel
Save