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
    }

  ask by user3373281 translate from so

本文未有回复,本站智能推荐:

关注微信公众号