public TestScene() { pulsatingEffect = new Animatroller.Framework.Effect.Pulsating("Pulse FX", TimeSpan.FromSeconds(1), 0.2, 0.7); flickerEffect = new Animatroller.Framework.Effect.Flicker("Flicker", 0.4, 0.6); Executor.Current.Register(this); }
public HalloweenScene() { hours.AddRange("6:00 pm", "10:00 pm"); audioPlayer = new Animatroller.Framework.PhysicalDevice.NetworkAudioPlayer( Properties.Settings.Default.NetworkAudioPlayerIP, Properties.Settings.Default.NetworkAudioPlayerPort); pulsatingEffect1 = new Animatroller.Framework.Effect.Pulsating("Pulse FX 1", TimeSpan.FromSeconds(2), 0.1, 0.4); pulsatingEffect2 = new Animatroller.Framework.Effect.Pulsating("Pulse FX 2", TimeSpan.FromSeconds(2), 0.3, 0.5); candyPulse = new Animatroller.Framework.Effect.Pulsating("Candy Pulse", TimeSpan.FromSeconds(3), 0.01, 0.1); flickerEffect = new Animatroller.Framework.Effect.Flicker("Flicker", 0.4, 0.6); Executor.Current.Register(this); }
public TestScene2() { pulsatingEffect = new Animatroller.Framework.Effect.Pulsating("Pulse FX", TimeSpan.FromSeconds(2), 0, 1.0, false); Executor.Current.Register(this); }
public XmasScene2(IEnumerable<string> args) { if (!args.Contains("TEST")) { hours.AddRange("5:00 pm", "10:00 pm"); hours.AddRange("5:00 am", "7:00 am"); } pulsatingEffect1 = new Animatroller.Framework.Effect.Pulsating("Pulse FX 1", TimeSpan.FromSeconds(2), 0.3, 1.0, false); pulsatingEffect2 = new Animatroller.Framework.Effect.Pulsating("Pulse FX 2", TimeSpan.FromSeconds(2), 0.3, 1.0, false); popOutPiano = new Animatroller.Framework.Effect.PopOut("Piano", TimeSpan.FromSeconds(0.4)); popOutDrums = new Animatroller.Framework.Effect.PopOut("Drums", TimeSpan.FromSeconds(0.4)); popOutDrumsFast = new Animatroller.Framework.Effect.PopOut("Drums Fast", TimeSpan.FromSeconds(0.3)); popOutChord = new Animatroller.Framework.Effect.PopOut("Chord", TimeSpan.FromSeconds(0.4)); popOutSolo = new Animatroller.Framework.Effect.PopOut("Solo", TimeSpan.FromSeconds(0.3)); popOutSolo2 = new Animatroller.Framework.Effect.PopOut("Solo 2", TimeSpan.FromSeconds(0.2)); popOutChoir = new Animatroller.Framework.Effect.PopOut("Choir", TimeSpan.FromSeconds(1.0)); popOutVoice = new Animatroller.Framework.Effect.PopOut("Voice", TimeSpan.FromSeconds(1.0)); popOutVocal2 = new Animatroller.Framework.Effect.PopOut("Vocal 2", TimeSpan.FromSeconds(2.0)); popOutVocalLong = new Animatroller.Framework.Effect.PopOut("Vocal Long", TimeSpan.FromSeconds(5.0)); popOutEnd = new Animatroller.Framework.Effect.PopOut("End", TimeSpan.FromSeconds(5.0)); popOutPiano .AddDevice(lightIcicles); popOutDrums .AddDevice(lightReindeers) .AddDevice(lightHatsRight); popOutDrumsFast .AddDevice(lightCeiling1) .AddDevice(testPixels); popOutChord .AddDevice(lightTree) .AddDevice(lightCeiling2) .AddDevice(lightCeiling3); popOutSolo .AddDevice(lightNetLeft) .AddDevice(lightNetRight) .AddDevice(lightCeiling1) .AddDevice(lightCeiling3) .SetPriority(2); popOutSolo2 .AddDevice(lightCeiling1) .AddDevice(lightCeiling3) .SetPriority(2); popOutChoir .AddDevice(lightGarlandRight) .AddDevice(lightTreesRight) .AddDevice(lightCeiling1); popOutVoice .AddDevice(lightGarlandLeft) .AddDevice(lightCeiling3); popOutVocal2 .AddDevice(lightReindeers) .AddDevice(testPixels) .SetPriority(10); popOutVocalLong .AddDevice(lightNetRight) .AddDevice(lightGarlandRight) .AddDevice(lightHatsRight) .SetPriority(10); popOutEnd .AddDevice(lightIcicles) .AddDevice(lightReindeers) .AddDevice(lightHatsRight) .AddDevice(lightCeiling1) .AddDevice(lightCeiling2) .AddDevice(lightCeiling3) .AddDevice(lightGarlandRight) .AddDevice(lightGarlandLeft) .AddDevice(lightTreesRight) .AddDevice(lightNetRight) .AddDevice(lightNetLeft) .AddDevice(testPixels) .SetPriority(100); timeline.Add(0, "INIT"); timeline.PopulateFromCSV("Christmas Canon Rock All Labels.csv"); int state = 0; int halfSolo = 0; timeline.TimelineTrigger += (sender, e) => { switch (e.Step) { case 62: // First drum state = 1; testPixels.TurnOff(); break; case 69: state = 2; lightCeiling2.SetOnlyColor(Color.Green); lightCeiling3.SetOnlyColor(Color.Blue); break; case 136: // First solo state = 3; testPixels.TurnOff(); lightCeiling2.SetOnlyColor(Color.White); lightCeiling3.SetOnlyColor(Color.Red); break; case 265: // First choir testPixels.TurnOff(); state = 4; break; case 396: // Vocal 2 state = 5; testPixels.SetAllOnlyColor(Color.Blue); break; case 497: // Second solo state = 6; testPixels.TurnOff(); lightCeiling2.SetOnlyColor(Color.White); lightCeiling3.SetOnlyColor(Color.Red); break; case 561: // End second solo state = 7; testPixels.TurnOff(); break; case 585: // End third solo state = 8; testPixels.TurnOff(); break; case 721: // End third solo state = 9; testPixels.TurnOff(); break; } switch (e.Code) { case "INIT": state = 0; halfSolo = 0; lightCeiling1.SetColor(Color.White, 0); lightCeiling2.SetColor(Color.Blue, 0); lightCeiling3.SetColor(Color.Red, 0); break; case "N1": popOutPiano.Pop(0.4); if (state == 0) testPixels.Inject(Color.Red, 0.5); break; case "N2": popOutPiano.Pop(0.6); if (state == 0) testPixels.Inject(Color.White, 0.5); break; case "N3": popOutPiano.Pop(0.8); if (state == 0) testPixels.Inject(Color.Blue, 0.5); break; case "N4": popOutPiano.Pop(1.0); if (state == 0) testPixels.Inject(Color.Black, 0.0); break; case "Base": popOutDrums.Pop(1.0); if (state < 3) { testPixels.SetAllOnlyColor(Color.Purple); popOutDrumsFast.Pop(1.0); } break; case "Cymbal": popOutDrums.Pop(1.0); if (state < 3) { testPixels.SetAllOnlyColor(Color.Green); popOutDrumsFast.Pop(1.0); } break; case "Chord": popOutChord.Pop(1.0); break; case "Solo": popOutSolo.Pop(1.0); if ((halfSolo++ % 2) == 0) popOutSolo2.Pop(0.8); if (state == 3 || state == 6 || state == 8) { Color pixCol = Color.Black; switch (e.Step % 4) { case 0: pixCol = Color.Red; break; case 1: pixCol = Color.Yellow; break; case 2: pixCol = Color.Blue; break; case 3: pixCol = Color.Pink; break; } testPixels.Inject(pixCol, 1.0); } break; case "Choir": popOutChoir.Pop(1.0); break; case "Voice": popOutVoice.Pop(1.0); break; case "Vocal2": popOutVocal2.Pop(1.0); break; case "Long": popOutVocalLong.Pop(1.0); break; case "LongUp": // TODO break; case "Down": // TODO break; case "End": EverythingOff(); popOutEnd.Pop(1.0); break; default: Console.WriteLine("Unhandled code: " + e.Code); break; } }; audioPlayer = new Animatroller.Framework.PhysicalDevice.NetworkAudioPlayer( Properties.Settings.Default.NetworkAudioPlayerIP, Properties.Settings.Default.NetworkAudioPlayerPort); Executor.Current.Register(this); }