-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update tone.js dependency #309
Comments
Ok, so I tried this again, and wanted to leave some more details, for posterity. I tried updating to
It almost looks like we're trying to play it before the Tone transport is ready, but I'm not really sure how to debug this (and fewer ideas about how to fix this). cc @tambien |
i think my suggestion would be to try to decouple the players from the Transport. it should be possible to use Tone.Clock in a similar way as you're currently adding things to the Transport, but it would require a bit of reworking. Also for shorter segments, you could just schedule all of the notes upfront instead of playing them through the Tone.Part callback (for sections that are a few minutes long, this sometimes gets too congested to play easily). Then to stop it, you can just disconnect and dispose the player object which would throw away all future events. i can take a look at this when i have a moment, if no one else gets to it before me. |
Also, on that demo page I still see 260+ |
@tambien I'd loooove if you could take a look instead of me because I'm 100% going to break this. |
I took a quick uneducated look and while I don't see the Besides the note order being wrong, you can see that the notes are doubled with a very quick note at the end of most note. That's probably what causes the click. I then run the test suite: I guess the next step would be to reproduce the error in the test suite ( I'll check in tomorrow to see if someone took a look or if I should keep on digging :) |
Thanks so much for helping with this Matt!
*From: *Matt Aimonetti <[email protected]>
*Date: *Tue, May 7, 2019 at 6:28 PM
*To: *tensorflow/magenta-js
*Cc: *Subscribed
I took a quick uneducated look and while I don't see the AudioContext
… errors going to http://localhost:8080/player.html using the latest
tone.js, I do noticed that the base player sequence starts off and there
are a lot of clicks. The sequence once played out is fine again but the
clicks are still there. I decided to download the MIDI and surely enough
the sequence conversion is off now:
[image: image]
<https://user-images.githubusercontent.com/113/57342766-57921280-70f5-11e9-93c7-8cbfc9ebeb60.png>
Besides the note order being wrong, you can see that the notes are doubled
with a very quick note at the end of most note. That's probably what causes
the click.
I then run the test suite: $ yarn test
But they all passed.
I guess the next step would be to reproduce the error in the test suite (
midi_io_test.ts ?) and then fix the bug. The problem sounds like a lot of
fun but unfortunately I can't be late for my 🍣 dinner!
I'll check in tomorrow to see if someone took a look or if I should keep
on digging :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#309 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIJV2HQ4DS6ZQDQTMUFKZTPUIUFPANCNFSM4HLCHZFQ>
.
|
Apologies for the delay, I caught a cold and spent my free time in bed trying to recover 🤧 I still see this task as a key element to unlock of lot of things beyond the bug fixes. I'm not giving up 💃 |
I did some digging and while I haven't found a fix yet, here is some interesting information. tl;dr: the problem seems to be related to the way the player sets up/retrieves or uses Tone's polyphonic synth. Something in Tone changed in the way our use cases breaks the current behavior. The good news is that the problem is quite isolated, the bad news is that we can't write unit tests for it and it will require more manual untangling 🍝
Note that I create a new synth every time we press play to help us debug:
Looking into the
And looking into
The implementation returns a UPDATE: creating the polysynth in the |
@tambien any chance you have an idea what might be going on? |
A few issues are related to the fact that this project relies on a old version of tone.js which was since improved and bugs/dependencies fixed. https://github.com/Tonejs/Tone.js/blob/c023181579d55bac110b9d369f79aa5acd275499/CHANGELOG.md#1349
#56 #294 should all be fixed if we can update tone.js @notwaldorf mentioned issues trying to update so it might be trickier than it sounds.
The text was updated successfully, but these errors were encountered: