Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top