//-- Return an InstrumentData object, containing only the
 //   property settings of this instrument
 public InstrumentData GetSettings()
 {
     InstrumentData Data = new InstrumentData();
     var _with1 = Data;
     _with1.FilterAftertouch = this.FilterAfterTouch;
     _with1.InputChannel = this.InputChannel;
     _with1.InputDeviceName = this.InputDeviceName;
     _with1.LocalControl = this.LocalControl;
     _with1.NoteDuration = this.NoteDuration;
     _with1.OutputChannel = this.OutputChannel;
     _with1.OutputDeviceName = this.OutputDeviceName;
     _with1.PatchNumber = this.PatchNumber;
     _with1.SendPatchChangeOnOpen = this.SendPatchChangeOnOpen;
     _with1.Transpose = this.Transpose;
     _with1.Volume = this.Volume;
     return Data;
 }
 //-- Applies the settings from an InstrumentData object and
 //   opens the MIDI port
 public void SetSettings(InstrumentData Instrument)
 {
     bool Open = _Engaged;
     Close();
     var _with2 = Instrument;
     this.FilterAfterTouch = _with2.FilterAftertouch;
     this.InputChannel = _with2.InputChannel;
     this.InputDeviceName = _with2.InputDeviceName;
     this.LocalControl = _with2.LocalControl;
     this.NoteDuration = _with2.NoteDuration;
     this.OutputChannel = _with2.OutputChannel;
     this.OutputDeviceName = _with2.OutputDeviceName;
     this.PatchNumber = _with2.PatchNumber;
     this.Transpose = _with2.Transpose;
     this.SendPatchChangeOnOpen = _with2.SendPatchChangeOnOpen;
     this.Volume = _with2.Volume;
     if (Open == true)
     {
         try
         {
             this.Open();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Example #3
0
        //-- Applies the settings from an InstrumentData object and
        //   opens the MIDI port
        public void SetSettings(InstrumentData Instrument)
        {
            bool Open = _Engaged;

            Close();
            var _with2 = Instrument;

            this.FilterAfterTouch      = _with2.FilterAftertouch;
            this.InputChannel          = _with2.InputChannel;
            this.InputDeviceName       = _with2.InputDeviceName;
            this.LocalControl          = _with2.LocalControl;
            this.NoteDuration          = _with2.NoteDuration;
            this.OutputChannel         = _with2.OutputChannel;
            this.OutputDeviceName      = _with2.OutputDeviceName;
            this.PatchNumber           = _with2.PatchNumber;
            this.Transpose             = _with2.Transpose;
            this.SendPatchChangeOnOpen = _with2.SendPatchChangeOnOpen;
            this.Volume = _with2.Volume;
            if (Open == true)
            {
                try
                {
                    this.Open();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
Example #4
0
        //-- Return an InstrumentData object, containing only the
        //   property settings of this instrument
        public InstrumentData GetSettings()
        {
            InstrumentData Data   = new InstrumentData();
            var            _with1 = Data;

            _with1.FilterAftertouch      = this.FilterAfterTouch;
            _with1.InputChannel          = this.InputChannel;
            _with1.InputDeviceName       = this.InputDeviceName;
            _with1.LocalControl          = this.LocalControl;
            _with1.NoteDuration          = this.NoteDuration;
            _with1.OutputChannel         = this.OutputChannel;
            _with1.OutputDeviceName      = this.OutputDeviceName;
            _with1.PatchNumber           = this.PatchNumber;
            _with1.SendPatchChangeOnOpen = this.SendPatchChangeOnOpen;
            _with1.Transpose             = this.Transpose;
            _with1.Volume = this.Volume;
            return(Data);
        }