Beispiel #1
0
        void Control_Changed(object sender, Midi.MidiChannelInt e)
        {
            TimerHeldButton = e;
            if (e.Value == 0)   // button released
            {
                Timer.Stop();

                float elapsedSeconds = (float)e.ToggleStopwatch.ElapsedMilliseconds / 1000;
                if (elapsedSeconds > Timer_SecondsBetweenMapping)
                {
                    SetColumnToProcess(e.ColumnIndex, SelectedProcessRow);
                }
                else
                {
                    SetColumnToProcess(e.ColumnIndex, null);
                }
                TimerPhase = 0;
            }
            else
            {
                Timer.Stop();
                Timer.Start();
            }
            // TODO: Implement "hold button for X seconds-check"
        }
Beispiel #2
0
 void TrackPlus_Changed(object sender, Midi.MidiChannelInt e)
 {
     if (e.Value != 0)
     {
         ShiftSelection(+1);
     }
 }
Beispiel #3
0
 void Device_Changed(object sender, Midi.MidiChannelInt e)
 {
     if (e.Value != 0)
     {
         for (int i = 0; i < System.Windows.Forms.Application.OpenForms.Count; i++)
         {
             System.Windows.Forms.Application.OpenForms[i].Invoke(new Action(() => ((volumecontrol.Form1)(System.Windows.Forms.Application.OpenForms[i])).RefreshList()));
         }
     }
 }
Beispiel #4
0
        void Focus_Changed(object sender, Midi.MidiChannelInt e)
        {
            if (e.Value > 0)
            {
                bool NewMuted = !Mapping[e.ColumnIndex].AudioProcess.Mute;
                if (!DeviceInterface.SetColor(
                        Midi.Interface.LaunchControlXL.SystemExclusiveIndexes.Focus,
                        e.ColumnIndex,
                        NewMuted ? 3 : 0,
                        NewMuted ? 0 : 3
                        ))
                {
                    return;
                }

                Mapping[e.ColumnIndex].AudioProcess.Mute = NewMuted;
                Mapping[e.ColumnIndex].UpdateValues();
            }
        }
Beispiel #5
0
 void Slider_Changed(object sender, Midi.MidiChannelInt e)
 {
     Mapping[e.ColumnIndex].AudioProcess.Volume = e.Value / 127.0f * 100.0f;
     Mapping[e.ColumnIndex].UpdateValues();
 }
Beispiel #6
0
 void Slider_Changed(object sender, Midi.MidiChannelInt e)
 {
     Console.WriteLine("Change is now: " + e.Value);
 }