When I click on the play button music piece starts playing from the beat that I want and to stop this I change cursorController code:
cursorControl.onBeat = function (beatNumber) {
var end = 8;
if (beatNumber >= end) {
synthControl.seek(4, 'beats');
synthControl.pause();
}
};
And it works correctly it returns to the beat that starts. But when I want to play the music for the second time. Clicking the play button does not work,after clicking again it does not start from 4 beat it starts from 8 or 16 beat.
I saw in some examples TimingCallbacks function but this function is not used in full-synth example.
How could I solve it?
Hi, I am using your full-synth example. I had a look on your play on repeat example and in full synth example I changed the code:
When I click on the play button music piece starts playing from the beat that I want and to stop this I change cursorController code:
And it works correctly it returns to the beat that starts. But when I want to play the music for the second time. Clicking the play button does not work,after clicking again it does not start from 4 beat it starts from 8 or 16 beat. I saw in some examples
TimingCallbacks
function but this function is not used in full-synth example. How could I solve it?