private void MidiLoopButtonOnOnToggled(ButtonToggledEventArgs obj)
 {
     if (_owner.Instrument != null)
     {
         _owner.Instrument.LoopMidi = obj.Pressed;
     }
 }
Ejemplo n.º 2
0
        private void MidiLoopButtonOnOnToggled(ButtonToggledEventArgs obj)
        {
            if (_owner.Instrument == null)
            {
                return;
            }

            _owner.Instrument.LoopMidi      = obj.Pressed;
            _owner.Instrument.DirtyRenderer = true;
        }
        private void MidiInputButtonOnOnToggled(ButtonToggledEventArgs obj)
        {
            if (obj.Pressed)
            {
                if (!PlayCheck())
                {
                    return;
                }

                MidiStopButtonOnPressed(null);
                _owner.Instrument?.OpenInput();
            }
            else
            {
                _owner.Instrument?.CloseInput();
            }
        }
Ejemplo n.º 4
0
        private void MidiInputButtonOnOnToggled(ButtonToggledEventArgs obj)
        {
            var instrumentSystem = EntitySystem.Get <InstrumentSystem>();

            if (obj.Pressed)
            {
                if (!PlayCheck())
                {
                    return;
                }

                MidiStopButtonOnPressed(null);
                if (_owner.Instrument is {} instrument)
                {
                    instrumentSystem.OpenInput(instrument.Owner, instrument);
                }
            }
            else if (_owner.Instrument is {} instrument)
            {
                instrumentSystem.CloseInput(instrument.Owner, false, instrument);
            }
        }