private void btnSaveMusic_Click(object sender, EventArgs e) { if (music != null) { if (!cbSamePath.Checked || file == "") { SaveFileDialog fdsave = new SaveFileDialog(); fdsave.Filter = "WAVE files|*.wav"; fdsave.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); fdsave.Title = "Save as Wave file:"; if (fdsave.ShowDialog() == DialogResult.OK) { file = fdsave.FileName; } } Fncs.Save(AudioFileType.WAV, file, music); cbSamePath.Enabled = true; MessageBox.Show("Saved!"); } else { MessageBox.Show("Create a song first :p"); } }
private void btnCreateMusic_Click(object sender, EventArgs e) { music = Fncs.GetSong(Genre.Medieval, FormType.Arch, Midi.Channel.Channel1); lblSongCreated.Text = "A song has been created"; MessageBox.Show("Composed!"); }
private void KeyboardButton_Click(object sender, EventArgs e) { Note note = (keyindex - 1).GetNoteFromIndex(); Fncs.PlayNote(note, new FullNoteType(NoteType.SemiQuaver), Pitch, 60, Midi.Channel.Channel1); }