Tone.js icon indicating copy to clipboard operation
Tone.js copied to clipboard

Cannot schedule player instances in transport (React)

Open botoxparty opened this issue 1 year ago • 2 comments

Hey,

I'm not sure why I can't get this to work, have spent hours on this and can't seem to get it to work correctly.

I'm creating a DAW and trying to get the basics of the transport setup. It is just not playing anything.

Here's a link to the codesandbox with a minimal example

botoxparty avatar Sep 18 '24 19:09 botoxparty

So i have updated the example, it seems that the Transport is somehow linked to the time the page is loaded, and adds this amount of time to the scheduling.

e.g.

Page loads.

10 seconds later the user presses "Start"

The Transport schedule everything +10 seconds.

botoxparty avatar Sep 23 '24 10:09 botoxparty

Tone.js requires a user interaction to start and the transport time will start at this point (which is different to the audio context time, which will start on page load).

cordial avatar Sep 27 '24 13:09 cordial