package jmsltestsuite; import com.softsynth.jmsl.*; import java.awt.*; import java.awt.event.*; /** Informational purposes only. You must wait 20 seconds to see output to the console Schedule a MusicJob that posts its playtime to a list. Prints the list at the end with deltas in ms. The deltas should be 1000 ms between repeats. You will see discrepancies from this ideal. JMSL uses JSyn's event buffer to post events slightly in the future, to absorb this variation. Same for midi - uses MidiShare with time stamps to post midi events slightly ahead of time. So musical output is solid. @author Nick Didkovsky. */ public class TestMusicJobTiming { public static void main(String args[]) { MusicJob m = new MusicJob(); m.setRepeatPause(1.0); m.setRepeats(20); m.addRepeatPlayable(new TimePostingPlayable()); m.addStopPlayable(new TimePrintingPlayable()); //m.launch(JMSL.now()); SequentialCollection s = new SequentialCollection(m); s.launch(JMSL.now()); Frame f = new Frame("TestMusicJobTiming"); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); f.setSize(500, 100); f.setVisible(true); } }