LoadFromFile() public method

public LoadFromFile ( string filename ) : void
filename string
return void
        public LORSceneCarol(IEnumerable <string> args)
        {
            hours.AddRange("5:00 pm", "9:00 pm");

            reindeer.Value   = true;
            airSnowman.Value = true;
            airR2D2.Value    = true;
            airSanta.Value   = true;
            packages.Value   = true;

            hours
            .ControlsMasterPower(packages)
            .ControlsMasterPower(airSnowman)
            .ControlsMasterPower(airR2D2)
            .ControlsMasterPower(airSanta)
            .ControlsMasterPower(reindeer);


            lorImport.LoadFromFile(@"..\..\..\Test Files\David Foster - Carol of the Bells.lms");

            lorImport.MapDeviceRGB("E - 1", "D# - 2", "D - 3", lightNote1);
            lorImport.MapDeviceRGB("C# - 4", "C - 5", "B - 6", lightNote2);
            lorImport.MapDeviceRGB("A# - 7", "A - 8", "G# - 9", lightNote3);
            lorImport.MapDeviceRGB("G - 10", "F# - 11", "F - 12", lightNote4);
            lorImport.MapDeviceRGB("E - 13", "D# - 14", "D - 15", lightNote5);
            lorImport.MapDeviceRGB("C# - 16", "C - 1", "B - 2", lightNote6);
            lorImport.MapDeviceRGB("A# - 3", "A - 4", "G# - 5", lightNote7);
            lorImport.MapDeviceRGB("G - 6", "F# - 7", "F - 8", lightNote8);
            lorImport.MapDeviceRGB("E - 9", "D# - 10", "D - 11", lightNote9);
            lorImport.MapDeviceRGB("C# - 12", "C - 13", "B - 14", lightNote10);
            lorImport.MapDevice("A# - 15", lightNote11);
            lorImport.MapDevice("A - 16", lightNote12);

            lorImport.MapDevice("Sky 1", lightNet1);
            lorImport.MapDevice("Sky 2", lightNet2);
            lorImport.MapDevice("Sky 3", lightNet3);
            lorImport.MapDevice("Sky 4", lightNet4);
            lorImport.MapDevice("Sky 5", lightNet5);

            lorImport.MapDevice("Sky 1", lightNet6);
            lorImport.MapDevice("Sky 2", lightNet7);
            lorImport.MapDevice("Sky 3", lightNet8);
            lorImport.MapDevice("Sky 4", lightNet9);
            lorImport.MapDevice("Sky 5", lightNet10);

            lorImport.MapDevice("Rooftop", snowmanKaggen);

            lorImport.MapDevice("Star1", lightStar1);
            lorImport.MapDevice("Star2", lightStar2);
            lorImport.MapDevice("Star3", lightStar3);
            lorImport.MapDevice("Star extra", lightStarExtra);

            lightREdge.OutputBrightness.Subscribe(x =>
            {
                pixelsRoofEdge.SetBrightness(x, null);
            });
            lightREdge.OutputColor.Subscribe(x =>
            {
                pixelsRoofEdge.SetAllOnlyColor(x);
            });

            lightBottom.OutputBrightness.Subscribe(x =>
            {
//                    pixelsVideo.SetBrightness(x, null);
            });
            lightBottom.OutputColor.Subscribe(x =>
            {
//                    pixelsVideo.SetAllOnlyColor(x);
            });

            lorImport.MapDeviceRGBW("R-Edge R", "R-Edge G", "R-Edge B", "R-Edge W", lightREdge);
            lorImport.MapDeviceRGBW("R-Bottom", "G-Bottom", "B-Bottom", "W-Bottom", lightBottom);
            lorImport.MapDeviceRGBW("Garage R", "Garage G", "Garage B", "Garage W", lightGarage);
            lorImport.MapDeviceRGBW("Rwindo R", "Rwindo G", "Rwindo B", "Rwindo W", lightRWindow);
            lorImport.MapDeviceRGBW("Cwindo R", "Cwindo G", "Cwindo B", "Cwindo W", lightCWindow);
            lorImport.MapDeviceRGBW("Lwindo R", "Lwindo G", "Lwindo B", "Lwindo W", lightLWindow);
            lorImport.MapDeviceRGBW("Ft door R", "Ft door G", "Ft door B", "FT door W", lightFrontDoor);
            lorImport.MapDeviceRGBW("Bush - red", "Bush - green", "Bush - blue", "Bush - white", lightBush);

            lorImport.MapDevice("Tree - A", lightSnowman);
            lorImport.MapDevice("Tree - B", lightSanta);

            lorImport.MapDevice("Spoke 1a", lightHat1);
            lorImport.MapDevice("Spoke 2a", lightHat2);
            lorImport.MapDevice("Spoke 3a", lightHat3);
            lorImport.MapDevice("Spoke  4a", lightHat4);
            lorImport.MapDevice("Spoke 5a", lightR2D2);
            //            lorImport.MapDevice("Spoke 6a", lightTest1);

            // lorImport.MapDevice("Spoke 7a", light);
            // lorImport.MapDevice("Spoke 8a", light);
            // lorImport.MapDevice("Spoke 9a", light);
            // lorImport.MapDevice("Spoike 10a", light);
            // lorImport.MapDevice("Spoke  11a", light);
            // lorImport.MapDevice("Spoke  12a", light);
            // lorImport.MapDevice("Spoke  13a", light);
            // lorImport.MapDevice("Spoke  14a", light);
            // lorImport.MapDevice("Spoke  15a", light);
            // lorImport.MapDevice("Spoke  16a", light);
            // lorImport.MapDevice("Pillar L8", light);
            // lorImport.MapDevice("Pillar L7", light);
            // lorImport.MapDevice("Pillar L6", light);
            // lorImport.MapDevice("Pillar L5", light);
            // lorImport.MapDevice("Pillar L4", light);
            // lorImport.MapDevice("Pillar L3", light);
            // lorImport.MapDevice("Pillar L2", light);
            // lorImport.MapDevice("Pillar L1", light);
            // lorImport.MapDevice("Pillar R8", light);
            // lorImport.MapDevice("Pillar R7", light);
            // lorImport.MapDevice("Pillar R6", light);
            // lorImport.MapDevice("Pillar R5", light);
            // lorImport.MapDevice("Pillar R4", light);
            // lorImport.MapDevice("Pillar R3", light);
            // lorImport.MapDevice("Pillar R2", light);
            // lorImport.MapDevice("Pillar R1", light);
            // lorImport.MapDevice("8  MiniTree 1r", light);
            // lorImport.MapDevice("8  MiniTree 2r", light);
            // lorImport.MapDevice("8  MiniTree 3r", light);
            // lorImport.MapDevice("8  MiniTree 4r", light);
            // lorImport.MapDevice("8  MiniTree 5r", light);
            // lorImport.MapDevice("8  MiniTree 6r", light);
            // lorImport.MapDevice("8  MiniTree 7r", light);
            // lorImport.MapDevice("8  MiniTree 8r", light);
            // lorImport.MapDevice("8  MiniTree 9r", light);
            // lorImport.MapDevice("8  MiniTree 10r", light);
            // lorImport.MapDevice("8  MiniTree 11r", light);
            // lorImport.MapDevice("8  MiniTree 12r", light);
            // lorImport.MapDevice("8  MiniTree 13r", light);
            // lorImport.MapDevice("8  MiniTree 14r", light);
            // lorImport.MapDevice("8  MiniTree 15r", light);
            // lorImport.MapDevice("8  MiniTree 16r", light);
            // lorImport.MapDevice("MiniTree 1g", light);
            // lorImport.MapDevice("MiniTree 2g", light);
            // lorImport.MapDevice("MiniTree 3g", light);
            // lorImport.MapDevice("MiniTree 4g", light);
            // lorImport.MapDevice("MiniTree 5g", light);
            // lorImport.MapDevice("MiniTree 6g", light);
            // lorImport.MapDevice("MiniTree 7g", light);
            // lorImport.MapDevice("MiniTree 8g", light);
            // lorImport.MapDevice("MiniTree 9g", light);
            // lorImport.MapDevice("MiniTree 10g", light);
            // lorImport.MapDevice("MiniTree 11g", light);
            // lorImport.MapDevice("MiniTree 12g", light);
            // lorImport.MapDevice("MiniTree 13g", light);
            // lorImport.MapDevice("MiniTree 14g", light);
            // lorImport.MapDevice("MiniTree 15g", light);
            // lorImport.MapDevice("MiniTree 16g", light);
            // lorImport.MapDevice("Hray B1", light);
            // lorImport.MapDevice("Hray B2", light);
            // lorImport.MapDevice("Hray B3", light);
            // lorImport.MapDevice("Hray B4", light);
            // lorImport.MapDevice("Hray B5", light);
            // lorImport.MapDevice("Hray B6", light);
            // lorImport.MapDevice("Hray B7", light);
            // lorImport.MapDevice("Hray B8", light);
            // lorImport.MapDevice("Hray R1", light);
            // lorImport.MapDevice("Hray R2", light);
            // lorImport.MapDevice("Hray R3", light);
            // lorImport.MapDevice("Hray R4", light);
            // lorImport.MapDevice("Hray R5", light);
            // lorImport.MapDevice("Hray R6", light);
            // lorImport.MapDevice("Hray R7", light);
            // lorImport.MapDevice("Hray R8", light);
            // lorImport.MapDevice("Vray 1", light);
            // lorImport.MapDevice("Vray 2", light);
            // lorImport.MapDevice("Vray 3", light);
            // lorImport.MapDevice("Vray 4", light);
            // lorImport.MapDevice("Vray 5", light);
            // lorImport.MapDevice("Vray 6", light);
            // lorImport.MapDevice("Vray 7", light);
            // lorImport.MapDevice("Vray 8", light);
            // lorImport.MapDevice("Vray 9", light);
            // lorImport.MapDevice("Vray 10", light);
            // lorImport.MapDevice("Vray 11", light);
            // lorImport.MapDevice("Vray 12", light);
            // lorImport.MapDevice("Vray 13", light);
            // lorImport.MapDevice("Vray 14", light);
            // lorImport.MapDevice("Vray 15", light);
            // lorImport.MapDevice("Vray 16", light);
            // lorImport.MapDevice("Vray 17", light);
            // lorImport.MapDevice("Vray 18", light);
            // lorImport.MapDevice("Vray 19", light);
            // lorImport.MapDevice("Vray 20", light);
            // lorImport.MapDevice("Vray 21", light);
            // lorImport.MapDevice("Vray 22", light);
            // lorImport.MapDevice("Vray 23", light);
            // lorImport.MapDevice("Vray 24", light);
            // lorImport.MapDevice("Vray 25", light);
            // lorImport.MapDevice("Vray 26", light);
            // lorImport.MapDevice("Vray 27", light);
            // lorImport.MapDevice("Vray 28", light);
            // lorImport.MapDevice("Vray 29", light);
            // lorImport.MapDevice("Vray 30", light);
            // lorImport.MapDevice("Vray 31", light);
            // lorImport.MapDevice("Vray 32", light);
            // lorImport.MapDevice("Arch 1-1", light);
            // lorImport.MapDevice("Arch 1-2", light);
            // lorImport.MapDevice("Arch 1-3", light);
            // lorImport.MapDevice("Arch 1-4", light);
            // lorImport.MapDevice("Arch 1-5", light);
            // lorImport.MapDevice("Arch 1-6", light);
            // lorImport.MapDevice("Arch 1-7", light);
            // lorImport.MapDevice("Arch 1-8", light);
            // lorImport.MapDevice("Arch 2-1", light);
            // lorImport.MapDevice("Arch 2-2", light);
            // lorImport.MapDevice("Arch 2-3", light);
            // lorImport.MapDevice("Arch 2-4", light);
            // lorImport.MapDevice("Arch 2-5", light);
            // lorImport.MapDevice("Arch 2-6", light);
            // lorImport.MapDevice("Arch 2-7", light);
            // lorImport.MapDevice("Arch 2-8", light);
            // lorImport.MapDevice("Arch 3-1", light);
            // lorImport.MapDevice("Arch 3-2", light);
            // lorImport.MapDevice("Arch 3-3", light);
            // lorImport.MapDevice("Arch 3-4", light);
            // lorImport.MapDevice("Arch 3-5", light);
            // lorImport.MapDevice("Arch 3-6", light);
            // lorImport.MapDevice("Arch 3-7", light);
            // lorImport.MapDevice("Arch 3-8", light);
            // lorImport.MapDevice("Arch 4-1", light);
            // lorImport.MapDevice("Arch 4-2", light);
            // lorImport.MapDevice("Arch 4-3", light);
            // lorImport.MapDevice("Arch 4-4", light);
            // lorImport.MapDevice("Arch 4-5", light);
            // lorImport.MapDevice("Arch 4-6", light);
            // lorImport.MapDevice("Arch 4-7", light);
            // lorImport.MapDevice("Arch 4-8", light);


            lorImport.Prepare();
//            lorImport.Dump();


            waveSource = CodecFactory.Instance.GetCodec(@"C:\Projects\Other\ChristmasSounds\trk\09 Carol of the Bells (Instrumental).wav");

            soundOut.Initialize(waveSource);

            acnOutput.Connect(new Physical.PixelRope(pixelsRoofEdge, 0, 50), 4, 1);
            acnOutput.Connect(new Physical.PixelRope(pixelsRoofEdge, 50, 100), 5, 1);
            acnOutput.Connect(new Physical.PixelRope(pixelsVideo, 0, 200), 1, 1);

            acnOutput.Connect(new Physical.GenericDimmer(lightStarExtra, 50), SacnUniverseDMX);

            acnOutput.Connect(new Physical.GenericDimmer(reindeer, 10), SacnUniverseDMX);
            acnOutput.Connect(new Physical.GenericDimmer(airSnowman, 11), SacnUniverseDMX);
            acnOutput.Connect(new Physical.GenericDimmer(airSanta, 12), SacnUniverseDMX);
            acnOutput.Connect(new Physical.GenericDimmer(airR2D2, 13), SacnUniverseDMX);

            acnOutput.Connect(new Physical.SmallRGBStrobe(lightBottom, 1), SacnUniverseDMX);
            acnOutput.Connect(new Physical.RGBStrobe(lightNote1, 60), SacnUniverseDMX);
            acnOutput.Connect(new Physical.RGBStrobe(lightNote2, 80), SacnUniverseDMX);
            acnOutput.Connect(new Physical.RGBStrobe(lightNote6, 40), SacnUniverseDMX);
            acnOutput.Connect(new Physical.RGBStrobe(lightNote10, 70), SacnUniverseDMX);
            acnOutput.Connect(new Physical.GenericDimmer(lightHat1, 1), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightHat2, 2), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightHat3, 3), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightHat4, 4), SacnUniverseRenard2);

            acnOutput.Connect(new Physical.GenericDimmer(lightNet4, 5), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet3, 6), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet1, 7), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet2, 8), SacnUniverseRenard2);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet5, 4), SacnUniverseRenard1);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet6, 5), SacnUniverseRenard1);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet7, 6), SacnUniverseRenard1);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet8, 7), SacnUniverseRenard1);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet9, 8), SacnUniverseRenard1);
            acnOutput.Connect(new Physical.GenericDimmer(lightNet10, 9), SacnUniverseRenard1);
            acnOutput.Connect(new Physical.GenericDimmer(lightRWindow, 10), SacnUniverseRenard1);     // Metal reindeers

            acnOutput.Connect(new Physical.AmericanDJStrobe(lightGarage, 5), SacnUniverseDMX);

            acnOutput.Connect(new Physical.GenericDimmer(lightSanta, 1), SacnUniverseArduino);
            acnOutput.Connect(new Physical.GenericDimmer(lightSnowman, 2), SacnUniverseArduino);
            acnOutput.Connect(new Physical.GenericDimmer(snowmanKaggen, 2), SacnUniverseRenard1);


            this.lorImport.Progress.Subscribe(x =>
            {
                long soundPos = waveSource.GetMilliseconds(waveSource.Position);

                this.log.Verbose("Sound pos: {0:N0}   Timeline pos: {1:N0}   Diff: {2:N0} ms",
                                 soundPos, x, soundPos - x);
            });
        }
Beispiel #2
0
        private void ImportAndMapBelieve()
        {
            lorBelieve.LoadFromFile(Path.Combine(Exec.ExpanderSharedFiles, "Seq", "Believe - Josh Groban 64 chns.lms"));

            lorBelieve.Progress.Subscribe(x =>
            {
                this.log.Verbose("Believe {0:N0} ms", x);
            });

            //            lorBelieve.Dump();

            lorBelieve.MapDevice("Yard 1", lightNet1);
            lorBelieve.MapDevice("Yard 2", lightNet2);
            lorBelieve.MapDevice("Yard 3", lightNet3);
            lorBelieve.MapDevice("Yard 4", lightNet4);
            lorBelieve.MapDevice("Yard 5", lightNet5);
            lorBelieve.MapDevice("Yard 6", lightNet6);
            lorBelieve.MapDevice("Yard 7", lightNet7);
            lorBelieve.MapDevice("Yard 8", lightNet8);
            lorBelieve.MapDevice("Yard 9", lightHat1);
            lorBelieve.MapDevice("Yard 10", lightHat2);
            lorBelieve.MapDevice("Yard 7", lightHat3);
            lorBelieve.MapDevice("Yard 8", lightHat4);

            lorBelieve.MapDevice("House 1", lightR2D2);
            lorBelieve.MapDevice("House 2", lightOlaf);

            lorBelieve.MapDevice("Wreath W", lightStairs1);
            lorBelieve.MapDevice("Wreath R", lightStairs2);
            lorBelieve.MapDevice("Mega Star", lightXmasTree);

            lorBelieve.MapDevice("Floods B", lightWall1, Utils.Data(Color.Blue));
            lorBelieve.MapDevice("Floods G", lightWall2, Utils.Data(Color.Green));
            lorBelieve.MapDevice("Floods R", lightWall3, Utils.Data(Color.Red));

            lorBelieve.MapDevice("Ferris Wheel 1", lightTopper1);
            lorBelieve.MapDevice("Ferris Wheel 2", lightTopper2);
            lorBelieve.MapDevice("Ferris Wheel 3", lightRail1);
            lorBelieve.MapDevice("Ferris Wheel 4", lightRail2);
            lorBelieve.MapDevice("Ferris Wheel 5", lightReindeer1);
            lorBelieve.MapDevice("Ferris Wheel 6", lightReindeer2);
            lorBelieve.MapDevice("Ferris Wheel 7", lightSanta);
            lorBelieve.MapDevice("Ferris Wheel 8", lightSnowman);

            lorBelieve.MapDevice("NATIVITY", lightVader, Utils.Data(Color.Red));
            lorBelieve.MapDevice("House 3",
                                 new VirtualDevice(b => saberPixels.SetColorRange(Color.Red, b, 0, 32, lorBelieve.Token)));

            lorBelieve.ControlDevice(pixelsMatrix);
            lorBelieve.ControlDevice(saberPixels);
            lorBelieve.MapDevice("Mega Tree 1",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 0, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 2",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 1, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 3",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 2, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 4",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 3, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 5",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 4, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 6",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 5, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 7",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 6, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 8",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 7, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 9",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 8, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Tree 10",
                                 new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 9, 20, 1, lorBelieve.Token)));
            lorBelieve.MapDevice("Mega Star", pixelsRoofEdge, Utils.Data(Color.Red));

            lorBelieve.Prepare();
        }
Beispiel #3
0
        public LORScene(IEnumerable <string> args)
        {
            allPixels = new VirtualPixel1D(80);
            allPixels.SetAll(Color.White, 0);

            lorImport.LoadFromFile(@"..\..\..\Test Files\Cannon Rock104.lms");

            lorImport.MapDevice("Roof 1", lightRoof1);
            lorImport.MapDevice("Roof 2", lightRoof2);
            lorImport.MapDevice("Roof 3", lightRoof3);
            lorImport.MapDevice("Roof 4", lightRoof4);

            lorImport.MapDevice("Sidewalk 1", lightSidewalk1);
            lorImport.MapDevice("Sidewalk 2", lightSidewalk2);
            lorImport.MapDevice("Sidewalk 3", lightSidewalk3);
            lorImport.MapDevice("Sidewalk 4", lightSidewalk4);
            lorImport.MapDevice("Sidewalk 5", lightSidewalk1);
            lorImport.MapDevice("Sidewalk 6", lightSidewalk2);
            lorImport.MapDevice("Sidewalk 7", lightSidewalk3);
            lorImport.MapDevice("Sidewalk 8", lightSidewalk4);

            lorImport.MapDevice("Arch 1", light5_2);

            lorImport.Prepare();
            lorImport.Dump();


            waveSource = CodecFactory.Instance.GetCodec(@"C:\Projects\Other\ChristmasSounds\trk\21. Christmas Canon Rock.wav");

            soundOut.Initialize(waveSource);


            //            light5_1 = lorImport.MapDevice(1, 1, name => new StrobeColorDimmer(name));


            /*
             *          light1_1 = lorImport.MapDevice(1, 1, name => new StrobeColorDimmer(name));
             *          light1_2 = lorImport.MapDevice(1, 2, name => new StrobeColorDimmer(name));
             *          light1_3 = lorImport.MapDevice(1, 3, name => new StrobeColorDimmer(name));
             *          light1_4 = lorImport.MapDevice(1, 4, name => new StrobeColorDimmer(name));
             *          light1_5 = lorImport.MapDevice(1, 5, name => new StrobeColorDimmer(name));
             *          light1_6 = lorImport.MapDevice(1, 6, name => new StrobeColorDimmer(name));
             *          light1_7 = lorImport.MapDevice(1, 7, name => new StrobeColorDimmer(name));
             *          light1_8 = lorImport.MapDevice(1, 8, name => new StrobeColorDimmer(name));
             *          light1_9 = lorImport.MapDevice(1, 9, name => new StrobeColorDimmer(name));
             *          light1_10 = lorImport.MapDevice(1, 10, name => new StrobeColorDimmer(name));
             *          light1_11 = lorImport.MapDevice(1, 11, name => new StrobeColorDimmer(name));
             *          light1_12 = lorImport.MapDevice(1, 12, name => new StrobeColorDimmer(name));
             *          light1_13 = lorImport.MapDevice(1, 13, name => new StrobeColorDimmer(name));
             *          light1_14 = lorImport.MapDevice(1, 14, name => new StrobeColorDimmer(name));
             *          light1_15 = lorImport.MapDevice(1, 15, name => new StrobeColorDimmer(name));
             *          light1_16 = lorImport.MapDevice(1, 16, name => new StrobeColorDimmer(name));
             *
             *          light2_1 = lorImport.MapDevice(2, 1, name => new StrobeColorDimmer(name));
             *          light2_2 = lorImport.MapDevice(2, 2, name => new StrobeColorDimmer(name));
             *          light2_3 = lorImport.MapDevice(2, 3, name => new StrobeColorDimmer(name));
             *          light2_4 = lorImport.MapDevice(2, 4, name => new StrobeColorDimmer(name));
             *          light2_5 = lorImport.MapDevice(2, 5, name => new StrobeColorDimmer(name));
             *          light2_6 = lorImport.MapDevice(2, 6, name => new StrobeColorDimmer(name));
             *          light2_7 = lorImport.MapDevice(2, 7, name => new StrobeColorDimmer(name));
             *          light2_8 = lorImport.MapDevice(2, 8, name => new StrobeColorDimmer(name));
             *          light2_9 = lorImport.MapDevice(2, 9, name => new StrobeColorDimmer(name));
             *          light2_10 = lorImport.MapDevice(2, 10, name => new StrobeColorDimmer(name));
             *          light2_11 = lorImport.MapDevice(2, 11, name => new StrobeColorDimmer(name));
             *          light2_12 = lorImport.MapDevice(2, 12, name => new StrobeColorDimmer(name));
             *          light2_13 = lorImport.MapDevice(2, 13, name => new StrobeColorDimmer(name));
             *          light2_14 = lorImport.MapDevice(2, 14, name => new StrobeColorDimmer(name));
             *          light2_15 = lorImport.MapDevice(2, 15, name => new StrobeColorDimmer(name));
             *          light2_16 = lorImport.MapDevice(2, 16, name => new StrobeColorDimmer(name));
             *
             *          light3_1 = lorImport.MapDevice(3, 1, name => new StrobeColorDimmer(name));
             *          light3_2 = lorImport.MapDevice(3, 2, name => new StrobeColorDimmer(name));
             *          light3_3 = lorImport.MapDevice(3, 3, name => new StrobeColorDimmer(name));
             *          light3_4 = lorImport.MapDevice(3, 4, name => new StrobeColorDimmer(name));
             *          light3_5 = lorImport.MapDevice(3, 5, name => new StrobeColorDimmer(name));
             *          light3_6 = lorImport.MapDevice(3, 6, name => new StrobeColorDimmer(name));
             *          light3_7 = lorImport.MapDevice(3, 7, name => new StrobeColorDimmer(name));
             *          light3_8 = lorImport.MapDevice(3, 8, name => new StrobeColorDimmer(name));
             *          light3_9 = lorImport.MapDevice(3, 9, name => new StrobeColorDimmer(name));
             *          light3_10 = lorImport.MapDevice(3, 10, name => new StrobeColorDimmer(name));
             *          light3_11 = lorImport.MapDevice(3, 11, name => new StrobeColorDimmer(name));
             *          light3_12 = lorImport.MapDevice(3, 12, name => new StrobeColorDimmer(name));
             *          light3_13 = lorImport.MapDevice(3, 13, name => new StrobeColorDimmer(name));
             *          light3_14 = lorImport.MapDevice(3, 14, name => new StrobeColorDimmer(name));
             *          light3_15 = lorImport.MapDevice(3, 15, name => new StrobeColorDimmer(name));
             *          light3_16 = lorImport.MapDevice(3, 16, name => new StrobeColorDimmer(name));
             *
             *          light4_1 = lorImport.MapDevice(4, 1, name => new StrobeColorDimmer(name));
             *          light4_2 = lorImport.MapDevice(4, 2, name => new StrobeColorDimmer(name));
             *          light4_3 = lorImport.MapDevice(4, 3, name => new StrobeColorDimmer(name));
             *          light4_4 = lorImport.MapDevice(4, 4, name => new StrobeColorDimmer(name));
             *          light4_5 = lorImport.MapDevice(4, 5, name => new StrobeColorDimmer(name));
             *          light4_6 = lorImport.MapDevice(4, 6, name => new StrobeColorDimmer(name));
             *          light4_7 = lorImport.MapDevice(4, 7, name => new StrobeColorDimmer(name));
             *          light4_8 = lorImport.MapDevice(4, 8, name => new StrobeColorDimmer(name));
             *          light4_9 = lorImport.MapDevice(4, 9, name => new StrobeColorDimmer(name));
             *          light4_10 = lorImport.MapDevice(4, 10, name => new StrobeColorDimmer(name));
             *          light4_11 = lorImport.MapDevice(4, 11, name => new StrobeColorDimmer(name));
             *          light4_12 = lorImport.MapDevice(4, 12, name => new StrobeColorDimmer(name));
             *          light4_13 = lorImport.MapDevice(4, 13, name => new StrobeColorDimmer(name));
             *          light4_14 = lorImport.MapDevice(4, 14, name => new StrobeColorDimmer(name));
             *          light4_15 = lorImport.MapDevice(4, 15, name => new StrobeColorDimmer(name));
             *          light4_16 = lorImport.MapDevice(4, 16, name => new StrobeColorDimmer(name));
             *
             *          light5_1 = lorImport.MapDevice(5, 1, name => new StrobeColorDimmer(name));
             *          light5_2 = lorImport.MapDevice(5, 2, name => new StrobeColorDimmer(name));
             *          light5_3 = lorImport.MapDevice(5, 3, name => new StrobeColorDimmer(name));
             *          light5_4 = lorImport.MapDevice(5, 4, name => new StrobeColorDimmer(name));
             *          light5_5 = lorImport.MapDevice(5, 5, name => new StrobeColorDimmer(name));
             *          light5_6 = lorImport.MapDevice(5, 6, name => new StrobeColorDimmer(name));
             *          light5_7 = lorImport.MapDevice(5, 7, name => new StrobeColorDimmer(name));
             *          light5_8 = lorImport.MapDevice(5, 8, name => new StrobeColorDimmer(name));
             *          light5_9 = lorImport.MapDevice(5, 9, name => new StrobeColorDimmer(name));
             *          light5_10 = lorImport.MapDevice(5, 10, name => new StrobeColorDimmer(name));
             *          light5_11 = lorImport.MapDevice(5, 11, name => new StrobeColorDimmer(name));
             *          light5_12 = lorImport.MapDevice(5, 12, name => new StrobeColorDimmer(name));
             *          light5_13 = lorImport.MapDevice(5, 13, name => new StrobeColorDimmer(name));
             *          light5_14 = lorImport.MapDevice(5, 14, name => new StrobeColorDimmer(name));
             *          light5_15 = lorImport.MapDevice(5, 15, name => new StrobeColorDimmer(name));
             *          light5_16 = lorImport.MapDevice(5, 16, name => new StrobeColorDimmer(name));
             */

            /*TEST            light5_1 = lorImport.MapDevice(new Import.LorImport.UnitCircuit(5, 1), name => new StrobeColorDimmer(name));
             *
             *          for (int unit = 1; unit <= 5; unit++)
             *          {
             *              for (int circuit = 1; circuit <= 16; circuit++)
             *              {
             *                  int pixelPos = (unit - 1) * 16 + circuit - 1;
             *
             *                  var pixel = lorImport.MapDevice(new Import.LorImport.UnitCircuit(unit, circuit), name => new SinglePixel(name, allPixels, pixelPos));
             *
             * //FIXME                    var color = lorImport.GetChannelColor(unit, circuit);
             * //FIXME                    allPixels.SetColor(pixelPos, color, 0);
             *
             *                  log.Debug("Mapping unit {0}  circuit {1} to pixel {2} [{3}]", unit, circuit, pixelPos, pixel.Name);
             *              }
             *          }
             */
        }
Beispiel #4
0
        private void ImportAndMapFeelTheLight()
        {
            lorFeelTheLight.LoadFromFile(Path.Combine(Exec.ExpanderSharedFiles, "Seq", "Feel The Light, Jennifer Lopez.lms"));

            lorFeelTheLight.Progress.Subscribe(x =>
            {
                this.log.Verbose("Feel the Light {0:N0} ms", x);
            });

            //            lorFeelTheLight.Dump();

            lorFeelTheLight.MapDevice("Unit 01.7 arch 1.7", lightNet8);
            lorFeelTheLight.MapDevice("Unit 01.8 arch 2.1", lightNet7);
            lorFeelTheLight.MapDevice("Unit 01.9 arch 2.2", lightNet6);
            lorFeelTheLight.MapDevice("Unit 01.10 arch 2.3", lightNet5);
            lorFeelTheLight.MapDevice("Unit 01.11 arch 2.4", lightNet4);
            lorFeelTheLight.MapDevice("Unit 01.12 arch 2.5", lightNet3);
            lorFeelTheLight.MapDevice("Unit 01.13arch 2.6", lightNet2);
            lorFeelTheLight.MapDevice("Unit 01.14 arch 2.7", lightNet1);

            lorFeelTheLight.MapDevice("windows 01", lightStairs1);
            lorFeelTheLight.MapDevice("windows 02", lightStairs2);

            lorFeelTheLight.MapDevice("04.01 Sing tree outline", lightHat1);
            lorFeelTheLight.MapDevice("04.09  Sing tree outline", lightHat2);
            lorFeelTheLight.MapDevice("05.01 Sing tree outline", lightHat3);
            lorFeelTheLight.MapDevice("05.09 Sing tree Outline", lightHat4);

            lorFeelTheLight.MapDevice("03.15 candy cane lane", lightTopper1);
            lorFeelTheLight.MapDevice("03.13 deer rudolf", lightTopper2);
            lorFeelTheLight.MapDevice("03.10 house eve 01", lightRail1);
            lorFeelTheLight.MapDevice("03.11 house eve 02", lightRail2);
            lorFeelTheLight.MapDevice("03.12 house eve 03", lightReindeer1);
            lorFeelTheLight.MapDevice("03.14 deer 02", lightReindeer2);

            lorFeelTheLight.MapDevice("03.9 mini tree 08", lightWall1, Utils.Data(Color.Red));
            lorFeelTheLight.MapDevice("03.8 mini tree 07", lightWall2, Utils.Data(Color.Red));
            lorFeelTheLight.MapDevice("03.7 mini tree 06", lightWall3, Utils.Data(Color.Red));
            lorFeelTheLight.MapDevice("03.6 mini tree 05", lightSanta);
            lorFeelTheLight.MapDevice("03.5 mini tree 04", lightSnowman);
            lorFeelTheLight.MapDevice("03.4 mini tree 03", lightVader, Utils.Data(Color.Red));
            lorFeelTheLight.MapDevice("03.3 mini tree 02",
                                      new VirtualDevice(b => saberPixels.SetColorRange(Color.Red, b, 0, 32, lorFeelTheLight.Token)));

            lorFeelTheLight.ControlDevice(pixelsMatrix);
            lorFeelTheLight.ControlDevice(saberPixels);
            lorFeelTheLight.MapDevice("Unit 02.1 Mega tree 1",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 0, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.2 Mega tree 2",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 1, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.3 Mege tree 3",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 2, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.4 Mega tree 4",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 3, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.9 Mega tree 9",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 4, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.10 Mega tree 10",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 5, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.11 Mega tree 11",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 6, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.12 Mega tree 12",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Red, b, 0, 7, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.15 Mega tree 15",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 8, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("Unit 02.16 Mega tree 16",
                                      new VirtualDevice(b => pixelsMatrix.SetColorRange(Color.Blue, b, 0, 9, 20, 1, lorFeelTheLight.Token)));
            lorFeelTheLight.MapDevice("03.1 mega tree topper 01", pixelsRoofEdge, Utils.Data(Color.White));

            lorFeelTheLight.Prepare();
        }