Question

I'm using a copy-paste of TempoCache from javax.sound.midi to handle the tick calculations for my MIDI player, but on some files the tempo is terribly miscalculated. It seems to average the tempo from the tempo events, but I can't figure out any way to make it better.

The affected file is here: https://github.com/TechShroom/MidiShapesEL/blob/master/src/com/k/midishapes/midi/MidiUtils.java

If anything else is required, I'll add it here.

Was it helpful?

Solution

Looks like it happens to be my use of tick2Microsecond which doesn't account for tempo changes and doesn't work for SMPTE timing. Whoops.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top