Browse Source

Store the amplitude

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

2
voicegardens/static/voicegardens.js

@ -80,7 +80,7 @@ function stop() {
pitch = fft.analyze();
// https://p5js.org/reference/#/p5.SoundFile/getPeaks
amplitude = recording.getPeaks();
amplitude = recording.getPeaks(1)[0] * 100;
// https://p5js.org/reference/#/p5.SoundFile/duration
duration = recording.duration();

Loading…
Cancel
Save