Tux Guitar

Open Discussion

Subject Sequencer Question

Author Message
Post: Mar 30th 2008 at 6:11 PM

I am trying to use the source to spit out when a note starts (in milliseconds) and when it ends.
Is this possibly? I've been using the TGNote.getStart () methods within the makeNote function of Sequencer. At the moment I am only doing percussion, all that stuff about trill and stuff is not important to me at the moment.
Anyway, it appears to be way off, the first note in the song I am using appears about 1440 ms in (a second and a half) which is a pretty big break. Where exactly in the source should I be looking to do this feature?

Back to Top
Post: Mar 30th 2008 at 7:05 PM

I can't exactly understand what you mean..

If you want now how the sequence is created, take a look to:

If you want now how the "sequencer" play that sequence, you can take a look to:

org.herac.tuxguitar.player.impl.sequencer.MidiSequencerImpl ( For "TuxGuitar Sequencer" )

org.herac.tuxguitar.player.impl.jsa.sequencer.MidiSequencerImpl ( For Java Sound Api sequencer, of TuxGuitar-jsa plugin )

Back to Top
Post: Mar 30th 2008 at 7:12 PM

How does the midi player know when (time) to play a note and how long to hold that note for?

Back to Top
Post: Mar 30th 2008 at 10:09 PM

Is the MidiSequencer interface who do that.
but it depends on the implementations.
i paste you the class names of available sequencers on my previous post.

Back to Top
Post: Mar 30th 2008 at 10:25 PM

Ok thank you.
This is an awesome program by the way. You have to browse through the source to really appreciate how sweet it is.

Back to Top
Post: Mar 13th 2011 at 1:22 PM


if I play my drum beat in a loop it sounds like playing it through a thin can, do you know what I mean? in other cases the playback is active but I don't hear anything for a moment...

do you know why this occurres and how to avoid it?

bzw: great job! ;)

Back to Top