Store the maximum pitch
This commit is contained in:
parent
1aac136c65
commit
e9c29c777a
@ -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…
Reference in New Issue
Block a user