Store the amplitude
This commit is contained in:
parent
c9bf6f5e5d
commit
8af457e626
@ -80,7 +80,7 @@ function stop() {
|
|||||||
pitch = fft.analyze();
|
pitch = fft.analyze();
|
||||||
|
|
||||||
// https://p5js.org/reference/#/p5.SoundFile/getPeaks
|
// https://p5js.org/reference/#/p5.SoundFile/getPeaks
|
||||||
amplitude = recording.getPeaks();
|
amplitude = recording.getPeaks(1)[0] * 100;
|
||||||
|
|
||||||
// https://p5js.org/reference/#/p5.SoundFile/duration
|
// https://p5js.org/reference/#/p5.SoundFile/duration
|
||||||
duration = recording.duration();
|
duration = recording.duration();
|
||||||
|
Loading…
Reference in New Issue
Block a user