예제 #1
0
        public static void InitialSettings()
        {
            faderPage           = 1;
            EncoderMenuPosition = 1;
            BigEncoderOption    = BigEncoderButtonFunctionMidiValue.straightenAngle;
            ActivePanel         = ActivePanel.loupe;

            SendToMidiDevice.Send("Encoder");

            Display.Send(1, "High.  ", "Tone   ");
            Display.Send(2, "Lights ", "Tone   ");
            Display.Send(3, "Darks  ", "Tone   ");
            Display.Send(4, "Shadow ", "Tone   ");
            Display.Send(5, "Shadow ", "Split  ");
            Display.Send(6, "Midtone", "Split  ");
            Display.Send(7, "High.  ", "Split  ");
            Display.Send(8, "       ", "       ");

            LrParameters.BigEncoderDisplayButtons();

            SendToMidiDevice.MidiSend(ChannelCommand.NoteOn, 0, 95, 0);

            SendToMidiDevice.MidiSend(ChannelCommand.NoteOn, 0, 80, 0);
            SendToMidiDevice.MidiSend(ChannelCommand.NoteOn, 0, 81, 0);
            SendToMidiDevice.MidiSend(ChannelCommand.NoteOn, 0, 82, 0);
            SendToMidiDevice.MidiSend(ChannelCommand.NoteOn, 0, 83, 0);
        }
예제 #2
0
        public static void Send(int displayNumber, string txt1, string txt2)
        {
            var model = DisplayList.Where(x => x.Number == displayNumber).FirstOrDefault();


            string source = "F0 00 00 66 14 12";

            byte[] resultTxt  = Encoding.ASCII.GetBytes(txt1);
            byte[] resultTxt2 = Encoding.ASCII.GetBytes(txt2);


            byte[] result = source.Split(' ').Select(item => Convert.ToByte(item, 16)).ToArray();

            byte[] resultPageFirstLine  = model.FirstLine.Split(' ').Select(item => Convert.ToByte(item, 16)).ToArray();
            byte[] resultPageSecondLine = model.SecondLine.Split(' ').Select(item => Convert.ToByte(item, 16)).ToArray();


            int lenght  = result.Length + resultTxt.Length + 2;
            int lenght2 = result.Length + resultTxt2.Length + 2;


            byte[] sum  = new byte[lenght];
            byte[] sum2 = new byte[lenght2];


            result.CopyTo(sum, 0);
            resultPageFirstLine.CopyTo(sum, result.Length);
            resultTxt.CopyTo(sum, result.Length + 1);
            sum[lenght - 1] = 247;

            result.CopyTo(sum2, 0);
            resultPageSecondLine.CopyTo(sum2, result.Length);
            resultTxt2.CopyTo(sum2, result.Length + 1);
            sum2[lenght - 1] = 247;

            SysExMessage sysEx  = new SysExMessage(sum);
            SysExMessage sysEx2 = new SysExMessage(sum2);


            SendToMidiDevice.SysExSend(sysEx);
            SendToMidiDevice.SysExSend(sysEx2);
        }
예제 #3
0
        public static void Read(int id)
        {
            var saveList          = GlobalSettings.saveParameterList;
            var acctualParameters = LrParameters.listParameter;

            var model = saveList.Where(x => x.Id == id).FirstOrDefault();

            if (model != null)
            {
                foreach (var item in model.ParameterList)
                {
                    var model2 = acctualParameters.Where(x => x.name == item.name).FirstOrDefault();

                    model2.value = item.value;

                    SendToMidiDevice.Send(model2.name);
                }
            }

            foreach (var item in saveList.Where(x => x.Id == id).FirstOrDefault().ParameterList)
            {
                SendToLr.Send(item.name, item.value.ToString());
            }
        }