From 14e2ca8d9921c5095d1768ee6e123c04ba5201a8 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 14 Nov 2017 14:35:26 -0500 Subject: [PATCH] Round the drum num arg --- src/extensions/scratch3_music/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/extensions/scratch3_music/index.js b/src/extensions/scratch3_music/index.js index ba42c1676..e0b2ca262 100644 --- a/src/extensions/scratch3_music/index.js +++ b/src/extensions/scratch3_music/index.js @@ -423,6 +423,7 @@ class Scratch3MusicBlocks { playDrumForBeats (args, util) { if (this._stackTimerNeedsInit(util)) { let drum = Cast.toNumber(args.DRUM); + drum = Math.round(drum); drum -= 1; // drums are one-indexed if (typeof this.runtime.audioEngine === 'undefined') return; drum = MathUtil.wrapClamp(drum, 0, this.runtime.audioEngine.numDrums - 1);