public class Test5 implements Runnable{
private Sequencer midi;
private String[] names={"1.mid","2.mid","3.mid","4.mid","5.mid"};
private int i;
private Map<String,Sequence> map;
public Test5(){
initMap();
new Thread(this).start();
}
private void initMap(){
try {
map = new Hashtable<String, Sequence>();
midi = MidiSystem.getSequencer(false);
midi.open();
for (String s : names) {
try {
Sequence s1 = MidiSystem.getSequence(new File(s));
map.put(s, s1);
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/