示例#1
0
 public static void midi(Score paramScore, String paramString) {
   SMF localSMF = new SMF();
   try {
     double d1 = System.currentTimeMillis();
     System.out.println(
         "----------------------------- Writing MIDI File ------------------------------");
     localSMF.clearTracks();
     MidiParser.scoreToSMF(paramScore, localSMF);
     FileOutputStream localFileOutputStream = new FileOutputStream(paramString);
     localSMF.write(localFileOutputStream);
     double d2 = System.currentTimeMillis();
     System.out.println(
         "MIDI file '"
             + paramString
             + "' written from score '"
             + paramScore.getTitle()
             + "' in "
             + (d2 - d1) / 1000.0D
             + " seconds.");
     System.out.println(
         "------------------------------------------------------------------------------");
   } catch (IOException localIOException) {
     System.err.println(localIOException);
   }
 }
示例#2
0
 public static void midi(Score paramScore, OutputStream paramOutputStream) {
   SMF localSMF = new SMF();
   try {
     localSMF.clearTracks();
     MidiParser.scoreToSMF(paramScore, localSMF);
     localSMF.write(paramOutputStream);
   } catch (IOException localIOException) {
     System.err.println(localIOException);
   }
 }