public void playMotif(Motif motif) { mediaPlayer.Reset(); AbcFileWriter.saveToFile(motif, StringConstants.TEMP_ABC, true); saveMidi(StringConstants.TEMP_ABC, StringConstants.TEMP_MIDI); mediaPlayer.SetMotifURL(StringConstants.TEMP_MIDI); mediaPlayer.PlayMotif(); }
public void play() { mediaPlayer.Reset(); AbcFileWriter.saveToFile(this.tune, StringConstants.TEMP_ABC, getTempo(), true); saveMidi(StringConstants.TEMP_ABC, StringConstants.TEMP_MIDI); mediaPlayer.SetTuneURL(StringConstants.TEMP_MIDI); this.playlist.setTempo(this.getTempo()); mediaPlayer.PlayTune(this.playlist.getCurrentPlayerTime()); }
public EditMotifForm(Motif m, Controller controller) { this.controller = controller; AbcFileWriter.saveToFile(m, StringConstants.TEMP_ABC, false); InitializeComponent(); this.update(); this.richTextBox.LoadFile(StringConstants.TEMP_ABC, RichTextBoxStreamType.PlainText); this.richTextBox.TextChanged += new System.EventHandler(this.richTextBox_TextChanged); bw = new BackgroundWorker(); bw.WorkerReportsProgress = true; bw.WorkerSupportsCancellation = true; bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); bw_status = BwStatus.READY; }
public void savePDF(string pdfPath) { AbcFileWriter.saveToFile(this.tune, StringConstants.TEMP_ABC, getTempo(), false); ConsoleParser.ExecuteCommand("\"" + StringConstants.ABCM2PS + "\"", "-c -g \"" + StringConstants.TEMP_ABC + "\" -E -O \"" + StringConstants.TEMP_EPS_WRITE + "\""); ConsoleParser.ExecuteCommand("\"" + StringConstants.EPSTOPDF + "\"", "--outfile=\"" + pdfPath + "\" \"" + StringConstants.TEMP_EPS_READ + "\""); }
public void saveMidi(string midipath) { AbcFileWriter.saveToFile(this.tune, StringConstants.TEMP_ABC, getTempo(), true); saveMidi(StringConstants.TEMP_ABC, midipath); }
public void saveABC(Motif m, string abcpath) { AbcFileWriter.saveToFile(m, abcpath, false); }
public void saveABC(string abcpath) { AbcFileWriter.saveToFile(this.tune, abcpath, getTempo(), false); }