http://serene-mountain-4924.herokuapp.com/ Simon说(在免费托管网站上加载b / c需要几秒钟)
如何让它在开头播放4个音符而不是从一个音符开始?
this.playPattern = function() { // playback a pattern
var next = Math.random() * INPUTS.length >> 0,
i = 0,
local_spacing;
PATTERN[PATTERN.length] = next;
SPACING = SPACING - 30;
SPACING = Math.max(SPACING, 60);
(function play() { // recursive loop to play pattern
setTimeout( function() {
SELF.playSingle( INPUTS[ PATTERN[i] ]);
i++;
if( i < PATTERN.length ) {
play();
} else {
setTimeout( function() { LISTEN = true; }, SPEED );
}
},
SPEED + SPACING)
})(); // end recursion
}