-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Improve scheduling accuracy #144
Comments
Timing has generally been pretty good for me, even at fast tempos. That being said, you have a good point about One thing to note is that we're currently using overtone/at-at for note-scheduling*, which uses a ScheduledThreadPoolExecutor to schedule events. This is probably a little better than just using *though I just realized that we're only using at-at to schedule the start of notes, but then using plain ol' |
@daveyarwood I'm glad to find this issue/discussion. I've experienced timing anomalies during playback, too. I dug into the code a bit and found the use of ScheduledThreadPoolExecutor and suspected that that is at least part of the problem. I agree that moving to a more real-time note scheduling mechanism is the way to go. |
Honestly, I think you should use a library compatible with MIDI to make exporting easier. To me, that's the primary thing keeping me from using Alda more: my use case depends heavily on MIDI exporting. |
Using a MIDI library would help for exporting MIDI, but we still need a system in place for reliable scheduling of generic audio events (MIDI or otherwise). Once we have waveform synthesis instruments, etc., it will be possible to write scores that have both MIDI and non-MIDI instruments alongside each other. BTW @kirbyfan64, I've been thinking about the MIDI export story a little bit, and I think probably what we'll do is make that an alternate mode of use for Alda -- i.e. rather than "playing" a score, you'll be able to "export" it to MIDI, which will give you a .mid file. |
Alda 1.0.0-rc2 (out soon) will use JSyn to schedule events in realtime, which ought to be a lot more precise. |
I noticed
alda.sound.midi.play-note!
usesThread/sleep
......which worries me...
As the link shows,
Thread.sleep
isn't guaranteed to be reliable. Has anyone tried Alda at faster tempos?The text was updated successfully, but these errors were encountered: