Store the maximum pitch

This commit is contained in:
Luke Murphy 2020-02-07 12:53:53 +01:00
parent 1aac136c65
commit e9c29c777a
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

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