diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index 755b869..c907b0a 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -218,7 +218,11 @@ class GeneratedShape { **/ // sound and properties passed into shape creation this.soundRecorded = soundRecorded; - this.soundAmplitude = soundAmplitude; + + // ensure that erroneous minus amplitudes are at least given 0 + if (soundAmplitude < 0) this.soundAmplitude = 0.0; + else this.soundAmplitude = soundAmplitude; + this.soundDuration = soundDuration; // mouse hover awareness for sound playing