private void Indev_ChannelMessageReceived(object sender, ChannelMessageEventArgs e)
 {
     if (isMapping)
     {
         ((MixerInput)mappingList.SelectedValue).mapping = new MixerInput.MidiMapping(e.Message.Command, e.Message.Data1);
         stopMapping();
     }
     else
     {
         foreach (MixerInput inpt in inputList)
         {
             if (inpt.mapping != null && inpt.mapping.Command == e.Message.Command && inpt.mapping.Data1 == e.Message.Data1)
             {
                 long id;
                 inpt.input.GetInputId(out id);
                 mixEffectBlock1.SetInt(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdPreviewInput, id);
             }
         }
     }
     if (e.Message.Command == ChannelCommand.Controller && e.Message.Data1 == 0)
     {
         float val = ((float)e.Message.Data2) / 127f;
         if (invertSlider)
         {
             val = 1.0f - val;
         }
         if (val == 1.0f)
         {
             invertSlider = !invertSlider;
         }
         mixEffectBlock1.SetFloat(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdTransitionPosition, val);
     }
 }
Exemple #2
0
        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            if (m_mixEffectBlock1 != null)
            {
                double position = trackBarTransitionPos.Value / 100.0;
                if (m_moveSliderDownwards)
                {
                    position = (100 - trackBarTransitionPos.Value) / 100.0;
                }

                m_mixEffectBlock1.SetFloat(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdTransitionPosition,
                                           position);
            }
        }