public Nutcracker3Scene(IEnumerable <string> args) { candyLight = new StrobeColorDimmer("Candy Light"); testButton = new DigitalInput("Test"); allPixels1 = new VirtualPixel1D(256); allPixels2 = new VirtualPixel1D(256); allPixels1.SetAll(Color.White, 0); allPixels2.SetAll(Color.White, 0); var lorImport = new Import.LorImport(@"C:\Users\HLindestaf\Downloads\coke_song\Coke-Cola Christmas.lms"); var channelNames = lorImport.GetChannels.Select(x => lorImport.GetChannelName(x)).ToList(); channelNames.ForEach(x => Console.WriteLine(x)); int pixelPosition = 0; var circuits = lorImport.GetChannels.GetEnumerator(); while (true) { // Controller.IChannelIdentity channelR, channelG, channelB; Controller.IChannelIdentity channel; if (!circuits.MoveNext()) { break; } channel = circuits.Current; VirtualPixel1D pixel1d; int pixelNum; if (pixelPosition < 256) { pixel1d = allPixels1; pixelNum = pixelPosition; } else { pixel1d = allPixels2; pixelNum = pixelPosition - 256; } var pixel = lorImport.MapDevice( channel, name => new SinglePixel(name, pixel1d, pixelNum)); log.Debug("Mapping channel [{0}] to pixel {1} [{2}]", channel, pixelPosition, pixel.Name); pixelPosition++; } lorTimeline = lorImport.CreateTimeline(1); }
public Nutcracker1Scene(IEnumerable <string> args) { testButton = new DigitalInput("Test"); allPixels = new VirtualPixel1D(60); allPixels.SetAll(Color.White, 0); var lorImport = new Import.LorImport(@"..\..\..\Test Files\HAUK~HALLOWEEN1.lms"); int pixelPosition = 0; var circuits = lorImport.GetChannels.GetEnumerator(); while (true) { Controller.IChannelIdentity channelR, channelG, channelB; if (!circuits.MoveNext()) { break; } channelR = circuits.Current; if (!circuits.MoveNext()) { break; } channelG = circuits.Current; if (!circuits.MoveNext()) { break; } channelB = circuits.Current; var pixel = lorImport.MapDevice( channelR, channelG, channelB, name => new SinglePixel(name, allPixels, pixelPosition)); log.Debug("Mapping channel R[{0}]/G[{1}]/B[{2}] to pixel {3} [{4}]", channelR, channelG, channelB, pixelPosition, pixel.Name); pixelPosition++; } lorTimeline = lorImport.CreateTimeline(null); }
public Nutcracker1Scene(IEnumerable<string> args) { testButton = new DigitalInput("Test"); allPixels = new VirtualPixel1D(60); allPixels.SetAll(Color.White, 0); var lorImport = new Import.LorImport(@"..\..\..\Test Files\HAUK~HALLOWEEN1.lms"); int pixelPosition = 0; var circuits = lorImport.GetChannels.GetEnumerator(); while (true) { Controller.IChannelIdentity channelR, channelG, channelB; if (!circuits.MoveNext()) break; channelR = circuits.Current; if (!circuits.MoveNext()) break; channelG = circuits.Current; if (!circuits.MoveNext()) break; channelB = circuits.Current; var pixel = lorImport.MapDevice( channelR, channelG, channelB, name => new SinglePixel(name, allPixels, pixelPosition)); log.Debug("Mapping channel R[{0}]/G[{1}]/B[{2}] to pixel {3} [{4}]", channelR, channelG, channelB, pixelPosition, pixel.Name); pixelPosition++; } lorTimeline = lorImport.CreateTimeline(null); }
public Nutcracker3Scene(IEnumerable<string> args) { candyLight = new StrobeColorDimmer("Candy Light"); testButton = new DigitalInput("Test"); allPixels1 = new VirtualPixel1D(256); allPixels2 = new VirtualPixel1D(256); allPixels1.SetAll(Color.White, 0); allPixels2.SetAll(Color.White, 0); var lorImport = new Import.LorImport(@"C:\Users\HLindestaf\Downloads\coke_song\Coke-Cola Christmas.lms"); var channelNames = lorImport.GetChannels.Select(x => lorImport.GetChannelName(x)).ToList(); channelNames.ForEach(x => Console.WriteLine(x)); int pixelPosition = 0; var circuits = lorImport.GetChannels.GetEnumerator(); while (true) { // Controller.IChannelIdentity channelR, channelG, channelB; Controller.IChannelIdentity channel; if (!circuits.MoveNext()) break; channel = circuits.Current; VirtualPixel1D pixel1d; int pixelNum; if (pixelPosition < 256) { pixel1d = allPixels1; pixelNum = pixelPosition; } else { pixel1d = allPixels2; pixelNum = pixelPosition - 256; } var pixel = lorImport.MapDevice( channel, name => new SinglePixel(name, pixel1d, pixelNum)); log.Debug("Mapping channel [{0}] to pixel {1} [{2}]", channel, pixelPosition, pixel.Name); pixelPosition++; } lorTimeline = lorImport.CreateTimeline(1); }
public LORScene(IEnumerable<string> args) { testButton = new DigitalInput("Test"); allPixels = new VirtualPixel1D("All Pixels", 80); allPixels.SetAll(Color.White, 0); var lorImport = new Animatroller.Framework.Import.LorImport(@"..\..\..\Test Files\wonderful christmas time.lms"); /* 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)); */ 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); } } lorTimeline = lorImport.CreateTimeline(1); }