From 393ffa551298b94eb44ca6c7271965185b785f3c Mon Sep 17 00:00:00 2001 From: William Toohey Date: Sat, 6 Feb 2016 01:46:03 +1000 Subject: [PATCH] Fix missing builds having 1 note --- src/js/HuesCore.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/HuesCore.js b/src/js/HuesCore.js index b92bcb6..deb0afb 100644 --- a/src/js/HuesCore.js +++ b/src/js/HuesCore.js @@ -394,6 +394,9 @@ HuesCore.prototype.setSong = function(index) { HuesCore.prototype.updateBeatLength = function() { this.loopLength = this.soundManager.loopLength / this.currentSong.rhythm.length; if(this.currentSong.buildup) { + if (!this.currentSong.buildupRhythm) { + this.currentSong.buildupRhythm = "."; + } this.buildLength = this.soundManager.buildLength / this.currentSong.buildupRhythm.length; } else { this.buildLength = -1; @@ -409,9 +412,6 @@ HuesCore.prototype.getBeatLength = function() { } HuesCore.prototype.fillBuildup = function() { - if (!this.currentSong.buildupRhythm) { - this.currentSong.buildupRhythm = "."; - } // update loop length for flash style filling this.updateBeatLength(); if(this.currentSong.buildup) { @@ -430,7 +430,7 @@ HuesCore.prototype.fillBuildup = function() { } console.log("Buildup length:", buildBeats); } - // update with a beatmap of possibly different length + // update with a buildup of possibly different length this.updateBeatLength(); if(this.doBuildup) { this.beatIndex = -this.currentSong.buildupRhythm.length;