Sequencer.getMicrosecondPosition() : Sequencer « javax.sound.midi « Java by API






Sequencer.getMicrosecondPosition()

  

import javax.sound.midi.MidiSystem;
import javax.sound.midi.Sequencer;

public class Main {
  public static void main(String[] argv) throws Exception {
    Sequencer sequencer = MidiSystem.getSequencer();
    sequencer.open();
    double seconds = sequencer.getMicrosecondPosition() / 1000000.0;
  }
}

   
    
  








Related examples in the same category

1.Sequencer: addMetaEventListener(MetaEventListener listener)
2.Sequencer: setSequence(Sequence sequence)
3.Sequencer: start()