Tux Guitar

Suggestions

Subject Adjustable delay for audio/visual synchronization



Author Message
CgodLEY
Post: Sep 12th 2008 at 10:21 PM

During playback, the audio and visual (highlighted red notes) are not synchronized (not at the same time). Changing the MIDI Sequencer and MIDI port helps, but there is still an audio delay.

I did not find much documentation of the Java source code. Can you suggest which packages or classes I would need to change? Thank you.


Back to Top
 
Julian
Post: Sep 12th 2008 at 11:04 PM

Well, the tick position is returned by the Sequencer.
the Sequencer plugin for java "Real Time Sequencer" is on TuxGuitar-jsa project ( jsa = Java Sound Api ).

The tuxguitar sequencer is at TuxGuitar project:
org.herac.tuxguitar.player.impl.sequencer


Back to Top
 
CgodLEY
Post: Sep 13th 2008 at 4:52 AM

Thank you for the suggestion. I was able to achieve near perfect synchronization by adding a visual delay:

-------------------------------------------------
org.herac.tuxguitar.player.base - MidiPlayer.java
-------------------------------------------------

public long getTickPosition() {
return this.tickPosition - 130;
}

-------------------------------------------------
-------------------------------------------------

I'm using Ubuntu 8.04 with TiMidity / Real Time Sequencer.


Back to Top