Closed jeremyfromearth closed 2 years ago
Maybe the same issue as #918
Make sure you pass the value that Tone.Sequence gives you through to triggerAttackRelease
.
@tambien Thank you for the quick reply. This was exactly the problem. Back on track now!
Firstly, I've spent the last couple of weeks working with Tone and I think that the design of the library is really elegant and well thought out. Thanks for all of your work thus far.
Describe the bug Triggering notes, using
triggerAttackRelease
, from the tick callback of aTone.Sequence
on instruments such as MonoSynth, Sampler and others seems to be slightly intermittently delayed, causing very noticeable inaccuracies in timing. I do not see this behavior when I useTone.Players
from within the same callback. The timing is quite good in that case.To Reproduce I'm including a simple isolated demonstration that can be run from the examples folder. You can uncomment lines in the callback to compare
Sampler
andPlayers
accuracy. You can also test them at the same time and hear the discrepancy in their playback of the same sample. sampler-vs-players.zipExpected behavior For all notes triggered in the tick callback to be accurately timed, like a metronome.
What I've tried
latencyHint
to all of the available options, with no improvement.+0.01
to+0.5
. None of which improved the timing.humanize
to falsedev
and 14.7.39 branchesAdditional context Hardware: 2016 MacBook Pro, 2.9 GHz Quad-Core Intel Core i7 OS: MacOS Big Sur Same behavior can be heard on modern versions of Chrome, Safari and Firefox.