コード例 #1
0
 public MidiPlayer() throws MidiUnavailableException {
   this.c();
   this.c = MidiSystem.getReceiver();
   this.sequencer = MidiSystem.getSequencer(false);
   this.sequencer.getTransmitter().setReceiver(this);
   this.sequencer.open();
   this.a(-1L);
 }
コード例 #2
0
 public MIDIReader(String filename) {
   this.filename = filename;
   try {
     this.recebedor = MidiSystem.getReceiver();
     this.sequencia = MidiSystem.getSequence(new File(filename));
     this.tempoProcessor = new MidiUtils.TempoCache(sequencia);
     this.player = MidiSystem.getSequencer(true);
     this.player.setSequence(sequencia);
     this.player.open();
     this.interval = 0.5f;
     this.loadNotes();
     this.duration = this.getRealDuration();
   } catch (Exception ex) {
     Utilidades.alertar(ex.getMessage());
   }
 }
コード例 #3
0
ファイル: OpenClose.java プロジェクト: netroby/jdk9-dev
 public void fetchObjectMidiSystem() throws MidiUnavailableException {
   receiverMidiSystem = MidiSystem.getReceiver();
 }