You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, the Tone.Player audio sometimes gets out of sync with the Tone.Transport timers. This could happen when:
changing player.playbackRate
there is lag in the program
the duration of Tone.Transport.loopEnd is not equal to the duration of the player's audio buffer.
There ought to be a way to perfectly synchonize the looping in Tone.Transport with the audio player source. I thought about forking Tone.js and seeing if I can add an onended event listener to the original audio source, but I thought I might make this issue first.
The text was updated successfully, but these errors were encountered:
As it turns out, the players need to have a sync() method called manually before their times are correct.
I'm reading through the docs -- to know about this, one would have had to read through all the methods in the docs for player until they come across the sync() method and read what it does.
I think there are such things as usability "bugs", and this would be one of them.
Please consider:
the documentation ought to explain these sorts of things up in a paragraph or two up front before all the props/methods are documented. When people go to the docs for things like the Player class, they ought to be taught how to use the class, and this includes all the gotchas and assumptions like this.
Adding tooltips in the IDE which help explain these sort of things
There's probably a way to communicate a better mental model to the user through the design itself, although I wouldn't know how since I still don't have a good mental model of tone.js at this time.
As the title says, the Tone.Player audio sometimes gets out of sync with the Tone.Transport timers. This could happen when:
Tone.Transport.loopEnd
is not equal to the duration of the player's audio buffer.There ought to be a way to perfectly synchonize the looping in
Tone.Transport
with the audio player source. I thought about forking Tone.js and seeing if I can add anonended
event listener to the original audio source, but I thought I might make this issue first.The text was updated successfully, but these errors were encountered: