package jmsltestsuite; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import com.softsynth.jmsl.score.Clef; import com.softsynth.jmsl.score.KeySignature; import com.softsynth.jmsl.score.Score; import com.softsynth.jmsl.score.ScoreFrame; /** when this score is saved and loaded, the tempo and timesig change is lost */ public class TestTempo { public static void main(String[] args) { Score score = new Score(1, 800, 600); ScoreFrame sf = new ScoreFrame(); sf.addScore(score); score.addMeasure(); for (int i = 0; i < 12; i++) score.addNote(1, 60, 0.5, 0.8); score.getMeasure(1).setTempo(120); score.getMeasure(1).getStaff(0).setClef(Clef.BASS_CLEF); score.getMeasure(1).setTimeSig(8, 8); score.getMeasure(1).getStaff(0).setKeySignature(KeySignature.keyNameToKeySignature("D/b")); sf.pack(); sf.setVisible(true); sf.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent arg0) { System.exit(0); } }); } }