Exemple #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);
   }
 }
Exemple #2
0
 public static void xml(Score paramScore, String paramString) {
   try {
     PrintWriter localPrintWriter = new PrintWriter(new FileWriter(paramString));
     System.out.println("--------------------- Writing XML File -----------------------");
     String str = XMLParser.scoreToXMLString(paramScore);
     localPrintWriter.print(str);
     localPrintWriter.close();
     System.out.println(
         "XML file '" + paramString + "' written from score '" + paramScore.getTitle() + "'");
     System.out.println("-------------------------------------------------------------");
   } catch (IOException localIOException) {
     System.err.println(localIOException);
   }
 }
Exemple #3
0
 public static void jm(Score paramScore, String paramString) {
   try {
     System.out.println("--------------------- Writing JM File -----------------------");
     FileOutputStream localFileOutputStream = new FileOutputStream(paramString);
     ObjectOutputStream localObjectOutputStream = new ObjectOutputStream(localFileOutputStream);
     localObjectOutputStream.writeObject(paramScore);
     localObjectOutputStream.flush();
     localObjectOutputStream.close();
     System.out.println(
         "JM file '" + paramString + "' written from score '" + paramScore.getTitle() + "'");
     System.out.println("-------------------------------------------------------------");
   } catch (IOException localIOException) {
     System.err.println(localIOException);
   }
 }
Exemple #4
0
 public static void au(Score paramScore, String paramString, Instrument[] paramArrayOfInstrument) {
   double d1 = System.currentTimeMillis();
   System.out.println(
       "------------------------------ Writing AU File --------------------------------");
   String str1 = paramString + ".jpf";
   String str2 = "jmusic.tmp";
   File localFile = new File(str2);
   if (localFile.exists()) {
     localFile.delete();
   }
   Audio.processScore(paramScore, paramArrayOfInstrument, str1);
   Audio.combine(str1, str2, paramString, true, true);
   double d2 = System.currentTimeMillis();
   System.out.println(
       "AU file '"
           + paramString
           + "' written from score '"
           + paramScore.getTitle()
           + "' in "
           + (d2 - d1) / 1000.0D
           + " seconds.");
   System.out.println(
       "-------------------------------------------------------------------------------");
 }
Exemple #5
0
 public static void xml(Score paramScore) {
   xml(paramScore, paramScore.getTitle() + ".xml");
 }
Exemple #6
0
 public static void au(Score paramScore, Instrument[] paramArrayOfInstrument) {
   au(paramScore, paramScore.getTitle() + ".au", paramArrayOfInstrument);
 }
Exemple #7
0
 public static void au(Score paramScore, Instrument paramInstrument) {
   Instrument[] arrayOfInstrument = {paramInstrument};
   au(paramScore, paramScore.getTitle() + ".au", arrayOfInstrument);
 }
Exemple #8
0
 public static void jm(Score paramScore) {
   jm(paramScore, paramScore.getTitle() + ".jm");
 }