VictorChen / online-band

HTML5 Garage Band
0 stars 1 forks source link

Improve play performance #10

Closed VictorChen closed 9 years ago

VictorChen commented 9 years ago

I'm currently using a naive approach of looping through all the loops and playing the ones that need to be played at the time. Instead, I should calculate the time between loops and chain them up with setTimeout. Although, be careful:

http://www.sitepoint.com/creating-accurate-timers-in-javascript/

VictorChen commented 9 years ago

fixed with: https://github.com/VictorChen/online-band/commit/884349e19d5bd9d451a417376da4411bf887325f