Closed Michael-F-Ellis closed 4 months ago
I can't test this write now, but from my code examples I see that this worked for me:
tracks[0] = new mw.Track()
tracks[0].setTempo(125, 0)
@dirkk0 Thanks. I played around with some simple cases and confirmed that setTempo
does indeed work.
In my main code, I finally figured out that the problem was not disabling the cache while running under DevTools. I'm testing with VSCode Live Server and, apparently, it doesn't reliably force a reload of modules when they change. Opening DevTools and disabling cacheing fixes the problem.
Closing this.
Thanks for creating MidiWriter! I'm using it to create midi files from the results of parsing a simple rhythm language of my own devising. Every thing seems to be working as expected except that I can't seem to control the midi file tempo. I've tried
setTempo()
andaddEvent(new TempoEvent()
. No matter what I specify as a tempo, it plays back the rhythm correctly but at a fixed tempo of about quarter-note = 112. I've included a chunk from my code where the problem shows up.I must be doing something silly. Any advice?