Skip to content
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

Bugfix: Always add delay to currentTime. #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simeng
Copy link

@simeng simeng commented Aug 20, 2015

It used to set first notes in the past when first noteOn wasn't run straight away after loading MIDI.js

…he past when first noteOn wasn't run straight away after loading MIDI.js
@@ -323,4 +317,4 @@
return new (window.AudioContext || window.webkitAudioContext)();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge this bugfix into mainstream. I was trying to play Javascript generated melodies with MIDI.js and it took me 1 hour just to find this bug, which prevents MIDI.js to work correctly, so this bug-report must be accepted.

@gagern
Copy link

gagern commented Jul 27, 2016

As I argued in #168 (comment), I think that the better solution would be to never add currentTime automatically. The reason is that it's possible to add that manually if desired (and if the current time is exposed), but it is impossible to simply subtract it to get absolute timing, since the value subtracted and the value added again might be different if the render thread advances the timer in between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants