示例#1
0
 public void AddNote(InstrumentNoteInstance note)
 {
     lock (CurrentNotes)
     {
         CurrentNotes.Add(note);
     }
 }
示例#2
0
文件: Editor.cs 项目: hexd0t/Garm_Net
 private void button1_Click(object sender, EventArgs e)
 {
     if (ini == null)
     {
         ini = new InstrumentNoteInstance();
         ini.Instrument = (int)InstrumentChooser.Value;
         ini.time = 0;
         ini.freq = InstrumentSynth.PitchToFrequency(trackBar1.Value);
         View.Audio.MusicSynthGen.AddNote(ini);
         button1.Text = "Stop";
     }
     else
     {
         View.Audio.MusicSynthGen.RemoveNote(ini);
         ini = null;
         button1.Text = "Test";
     }
 }
示例#3
0
 public void RemoveNote(InstrumentNoteInstance note)
 {
     lock (CurrentNotes)
     {
         CurrentNotes.Remove(note);
     }
 }