From ceefcce269d8a0dc65379f17ae2f80c72a20f3e1 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 31 Jan 2020 17:28:38 +0100 Subject: [PATCH] Fix index bug --- voicegardens/static/voicegardens.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index dff5015..9f2d93b 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -200,7 +200,7 @@ class GeneratedShape { var duration = 0.8; var time = 0; var velocity = 0.5; - var index = random(0, notes.length + 1); + var index = floor(random(0, notes.length)); this.synth.play(notes[index], velocity, time, duration); }