Esempio n. 1
0
        //Canvi de instrument al combobox
        private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
        {
            GeneralMidiInstruments instrument = (GeneralMidiInstruments)System.Enum.Parse(typeof(GeneralMidiInstruments), comboBox1.SelectedItem.ToString());

            MidiPlayer.Play(new ProgramChange(0, canal, instrument));
        }
 public void ChangeInstrument(GeneralMidiInstruments targetInstrument)
 {
     PageController.GetPianoRollModel().ChangeInstrument(targetInstrument);
 }
Esempio n. 3
0
 /// <summary>Initialize the Controller MIDI event message.</summary>
 /// <param name="deltaTime">The delta-time since the previous message.</param>
 /// <param name="channel">The channel to which to write the message (0 through 15).</param>
 /// <param name="number">The instrument to which to change.</param>
 public ProgramChange(long deltaTime, byte channel, GeneralMidiInstruments number)
     : this(deltaTime, channel, (byte)number)
 {
 }
Esempio n. 4
0
 public void ChangeInstrument(GeneralMidiInstruments newInstrument)
 {
     generalInstrument = newInstrument;
     MidiPlayer.Play(new ProgramChange(0, 0, generalInstrument));
 }