MidiContext midiContext = new MidiContext();
int resolution = midiContext.getResolution(mfiTracks);
Debug.println("resolution: " + resolution);
Sequence midiSequence = new MfiVaviSequence(Sequence.PPQ, resolution, 1);
javax.sound.midi.Track midiTrack = midiSequence.getTracks()[0];
for (int i = 0; i < mfiTracks.length; i++) {
midiContext.setMfiTrackNumber(i);
midiContext.setCurrent(0);