예제 #1
0
 public LEDBarOutput(Configuration config, LEDDomeOutput dome)
 {
     this.config                  = config;
     this.dome                    = dome;
     this.visualizers             = new List <Visualizer>();
     this.config.PropertyChanged += this.ConfigUpdated;
 }
예제 #2
0
        public static Tuple <double, double> GetProjectedLEDPoint(
            int strutIndex,
            int ledIndex
            )
        {
            var p1   = GetProjectedPoint(strutIndex, 0);
            var p2   = GetProjectedPoint(strutIndex, 1);
            var leds = LEDDomeOutput.GetNumLEDs(strutIndex);

            var d = ((double)ledIndex + 1) / ((double)leds + 2);
            var x = (p2.Item1 - p1.Item1) * d + p1.Item1;
            var y = (p2.Item2 - p1.Item2) * d + p1.Item2;

            return(new Tuple <double, double>(x, y));
        }
예제 #3
0
        public Operator(Configuration config)
        {
            this.config = config;
              this.stopwatch = new Stopwatch();
              this.stopwatch.Start();

              this.inputs = new List<Input>();
              var audio = new AudioInput(config);
              this.inputs.Add(audio);
              var midi = new MidiInput(config);
              this.inputs.Add(midi);

              this.outputs = new List<Output>();
              var hue = new HueOutput(config);
              this.outputs.Add(hue);
              var board = new CartesianTeensyOutput(config);
              this.outputs.Add(board);
              var dome = new LEDDomeOutput(config);
              this.outputs.Add(dome);
              var whyFire = new WhyFireOutput(config);
              this.outputs.Add(whyFire);

              this.visualizers = new List<Visualizer>();
              this.visualizers.Add(new HueAudioVisualizer(
            this.config,
            audio,
            hue
              ));
              this.visualizers.Add(new LEDPanelVolumeVisualizer(
            this.config,
            audio,
            board
              ));
              this.visualizers.Add(new HueSolidColorVisualizer(
            this.config,
            hue
              ));
              this.visualizers.Add(new HueSilentVisualizer(
            this.config,
            audio,
            hue
              ));
              this.visualizers.Add(new LEDPanelMidiVisualizer(
            this.config,
            midi,
            board
              ));
              this.visualizers.Add(new LEDDomeMidiTestVisualizer(
            this.config,
            midi,
            dome
              ));
              this.visualizers.Add(new LEDDomeStrandTestVisualizer(
            this.config,
            dome
              ));
              this.visualizers.Add(new LEDDomeVolumeVisualizer(
            this.config,
            audio,
            dome
              ));
              this.visualizers.Add(new LEDDomeFlashVisualizer(
            this.config,
            audio,
            midi,
            dome
              ));
              this.visualizers.Add(new WhyFireMidiVisualizer(
            this.config,
            midi,
            whyFire
              ));
        }
예제 #4
0
 public abstract void Animate(LEDDomeOutput dome);