Example #1
0
 public void NewDevicesStand(ModuleBoard GetNewDevices, int GetNewAdress)
 {
     // Если на стедне больше нет приборов с указанным адресом..
     GetNewDevices.CPU.AdressRS = GetNewAdress;
     AddDevicesRS485(GetNewDevices.RS485);
     ListDevices.Add(GetNewDevices);
     System.Console.WriteLine("На стэнд добавлено новое устройство");
     Console.WriteLine("На стэнд добавлено оборудование с адреслм " + GetNewDevices.CPU.AdressRS + " Тип оборудования: " + GetNewDevices.CPU.NameDevices);
 }
Example #2
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     output[0] = moduleBoard.PitchWheel * TWO_OVER_16384 - 1;
     return(output);
 }
        protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
        {
            var next = oscillator.NextValue() * gain * (inputs[0] + 1);

            for (int i = 0; i < output.Length; ++i)
            {
                output[i] = next;
            }
            return(output);
        }
Example #4
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     moduleBoard.TransmitValue(id, inputs[0]);
     if (throughPut)
     {
         return(inputs);
     }
     else
     {
         return(output);
     }
 }
Example #5
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     output[0] = 0;
     for (int i = 0; i < inputs.Length; ++i)
     {
         output[0] += inputs[i];
     }
     return(output);
 }
Example #6
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     output[0] = moduleBoard.ControllerValues[controller] * TWO_OVER_128 - 1;
     return(output);
 }
Example #7
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     output[0] = inputs[0] * inputs[1];
     return(output);
 }
Example #8
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     return(inputs);
 }
Example #9
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     if (noteOn)
     {
         if (time < sustainStart)
         {
             curValue = onValues[time];
         }
         else
         {
             curValue = Sustain - 1;
         }
     }
     else
     {
         curValue += releaseIncrement;
         if (curValue < -1)
         {
             curValue = -1;
         }
     }
     for (int i = 0; i < output.Length; ++i)
     {
         output[i] = curValue;
     }
     return(output);
 }
Example #10
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     output[0] = moduleBoard.RecieveValue(id);
     return(output);
 }
Example #11
0
 protected abstract float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard);
Example #12
0
 public float[] Process(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     Debug.Assert(useable);
     return(IntProcess(inputs, time, noteOn, moduleBoard));
 }
Example #13
0
        protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
        {
            var totalInput = 0f;

            for (int i = 0; i < inputs.Length; ++i)
            {
                totalInput += inputs[i] * InputGains[i];
            }

            var result = new float[Outputs.Count];

            for (int i = 0; i < result.Length; ++i)
            {
                result[i] = totalInput * OutputGains[i];
            }

            return(result);
        }
Example #14
0
        protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
        {
            var curPan = pan + (inputs[0]);

            if (curPan < -1 || curPan > 1)
            {
                throw new InvalidModuleValue(this, curPan, $"Pan must be between -1 and 1. Module pan value: {pan} Pan input: {inputs[0]}");
            }
            output[0] = ValueFromPan(inputs[1], curPan);
            output[1] = ValueFromPan(inputs[1], -curPan);
            return(output);
        }
Example #15
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     throw new NotImplementedException();
 }
Example #16
0
 protected override float[] IntProcess(float[] inputs, long time, bool noteOn, ModuleBoard moduleBoard)
 {
     return(new float[] { effect.Next(inputs) });
 }