I am loading a midi file in AKAppleSequencer
which has a tempo of 80 BPM.
I checked the sequencer.length.seconds property and it shows the length of the file in seconds. In my case the file is 33 seconds long and the length.seconds property shows the same.
I have a timer that fires every 0.1 seconds and checks the sequencer.currentPosition.seconds property when the file is played
I noticed something strange, the sequencer.currentPosition.seconds property increments faster than actual clock seconds. Why is this happening?
When I timed it with a stopwatch, my midi file which is supposed to play 33 seconds finishes in 24 seconds (approximately).
On my sequencer, I don't have any tempo, rate set on the sequencer.
When I set the tempo to 60 BPM using sequencer.setTempo(60), the sequencer.currentPosition.seconds property updates every seconds at the right speed. This creates another problem, now the length.seconds property shows 41 (increased value) instead of original 33 which is expected on changing tempo.
I haven't tried this but if I set the tempo to greater than 80, I think the file playback will be even faster.