Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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;
        }
Esempio n. 4
0
 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 + "\"");
 }
Esempio n. 5
0
 public void saveMidi(string midipath)
 {
     AbcFileWriter.saveToFile(this.tune, StringConstants.TEMP_ABC, getTempo(), true);
     saveMidi(StringConstants.TEMP_ABC, midipath);
 }
Esempio n. 6
0
 public void saveABC(Motif m, string abcpath)
 {
     AbcFileWriter.saveToFile(m, abcpath, false);
 }
Esempio n. 7
0
 public void saveABC(string abcpath)
 {
     AbcFileWriter.saveToFile(this.tune, abcpath, getTempo(), false);
 }