Run shape generation after sounds collected

This commit is contained in:
Luke Murphy 2020-02-15 15:25:35 +01:00
parent 83c436b656
commit 4fcb9fd0be
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -69,9 +69,6 @@ function stop() {
if (recorder.recording) {
recorder.stop();
// signal to the draw loop that we should generate a new shape
newSoundJustRecorded = true;
// https://p5js.org/reference/#/p5.SoundFile/getPeaks
amplitude = recording.getPeaks(1)[0] * 100;
@ -80,6 +77,9 @@ function stop() {
// automatically archive this sound to the back-end
sendToArchive();
// signal to the draw loop that we should generate a new shape
newSoundJustRecorded = true;
}
}