Advertisement
Guest User

Untitled

a guest
Mar 20th, 2023
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.01 KB | None | 0 0
  1. #ifdef CONFIG_TOP
  2. #include "proffieboard_v2_config.h"
  3. #define NUM_BLADES 4
  4. #define NUM_BUTTONS 2
  5. #define VOLUME 1700
  6. const unsigned int maxLedsPerStrip = 177;
  7. #define CLASH_THRESHOLD_G 3.5
  8. #define ENABLE_AUDIO
  9. #define ENABLE_MOTION
  10. #define ENABLE_WS2811
  11. #define ENABLE_SD
  12. #define COLOR_CHANGE_DIRECT
  13. #define DISABLE_DIAGNOSTIC_COMMANDS
  14. #define BC_STAB_ON
  15. #define SA22C_STAB_ON
  16. #define SA22C_TWIST_ON
  17. #define SA22C_THRUST_ON
  18. #define SA22C_TWIST_OFF
  19. #define IDLE_OFF_TIME 60*5*1000
  20. #endif
  21.  
  22. #ifdef CONFIG_PROP
  23. #include "../props/saber_sa22c_buttons.h"
  24. #endif
  25.  
  26.  
  27. #ifdef CONFIG_PRESETS
  28. Preset presets[] = {
  29. { "ESB_Graflex", "tracks/ForceTheme.wav",
  30. StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Blue>,RotateColorsX<Variation,Rgb<0,0,128>>>,TransitionEffectL<TrConcat<TrFade<400>,StyleFire<Stripes<2500,-5000,BrownNoiseFlicker<Blue,Black,20>,Rgb<0,0,10>,BrownNoiseFlicker<Black,Rgb<25,25,255>,70>,Rgb<0,0,128>>,Rgb<0,0,80>,0,5,FireConfig<2,3000,0>,FireConfig<2,3000,0>,FireConfig<2,3000,0>,FireConfig<2,3000,0>>,TrDelay<1500>,StyleFire<Stripes<2500,-5000,BrownNoiseFlicker<Blue,Black,20>,Rgb<0,0,10>,BrownNoiseFlicker<Black,Rgb<25,25,255>,70>,Rgb<0,0,128>>,Rgb<0,0,80>,0,5,FireConfig<2,3000,0>,FireConfig<2,3000,0>,FireConfig<2,3000,0>,FireConfig<2,3000,0>>,TrFade<800>>,EFFECT_FORCE>,TransitionEffectL<TrConcat<TrInstant,BrownNoiseFlickerL<AlphaL<White,Int<16000>>,Int<50>>,TrSmoothFade<600>>,EFFECT_LOCKUP_END>,ResponsiveLockupL<Strobe<White,BrownNoiseFlicker<White,Red,300>,50,1>,TrConcat<TrInstant,White,TrFade<400>>,TrFade<100>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Scale<SwingSpeed<100>,Int<10000>,Int<14000>>>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Red,TrWipeIn<600>,TrWipe<600>>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,ResponsiveClashL<White,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<300>,TrWipeIn<500>,Black>>>(),
  31. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrWipe<1000>,RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>,TrWipe<1000>>>,InOutTrL<TrInstant,TrInstant,Black>>>(),
  32. StylePtr<Layers<AudioFlicker<Pulsing<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<16384>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,3000>,Mix<Int<10560>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<RgbArg<OFF_COLOR_ARG,Rgb<255,0,0>>,TrConcat<TrBoing<1200,2>,Mix<Int<1285>,Black,RgbArg<OFF_COLOR_ARG,Rgb<255,0,0>>>,TrFade<1200>>>>>>(),
  33. StylePtr<Layers<Mix<HoldPeakF<SwingSpeed<250>,Scale<SwingAcceleration<100>,Int<50>,Int<500>>,Scale<SwingAcceleration<>,Int<20000>,Int<10000>>>,RandomFlicker<StripesX<Int<15000>,Scale<HoldPeakF<SwingSpeed<200>,Scale<SwingAcceleration<100>,Int<50>,Int<300>>,Scale<SwingAcceleration<100>,Int<24000>,Int<16000>>>,Int<-3200>,Int<-200>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<7710>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<19276>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,InOutTrL<TrInstant,TrInstant,Pulsing<Black,RgbArg<OFF_COLOR_ARG,Rgb<0,0,255>>,8000>>>>(),
  34. },
  35. { "TheFallen", "tracks/ForceTheme.wav",
  36. StylePtr<Layers<ColorChange<TrColorCycle<1000>,Mix<HoldPeakF<SwingSpeed<250>,Scale<SwingAcceleration<100>,Int<50>,Int<500>>,Scale<SwingAcceleration<>,Int<20000>,Int<10000>>>,RandomFlicker<StripesX<Int<15000>,Scale<HoldPeakF<SwingSpeed<200>,Scale<SwingAcceleration<100>,Int<50>,Int<300>>,Scale<SwingAcceleration<100>,Int<24000>,Int<16000>>>,Int<-3200>,Int<-200>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<7710>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<19276>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,Stripes<3000,-3500,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>,RandomPerLEDFlicker<Mix<Int<7710>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>,Black>,BrownNoiseFlicker<RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<3855>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>,200>,RandomPerLEDFlicker<Mix<Int<10280>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>,Mix<Int<3855>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>>>>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<IgnitionTime<300>>,TrInstant>,Stripes<3000,-3500,RgbArg<IGNITION_COLOR_ARG,Rgb<255,0,0>>,RandomPerLEDFlicker<Mix<Int<7710>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,0,0>>>,Black>,BrownNoiseFlicker<RgbArg<IGNITION_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<3855>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,0,0>>>,200>,RandomPerLEDFlicker<Mix<Int<3137>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,0,0>>>,Mix<Int<3855>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,0,0>>>>>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Scale<EffectRandomF<EFFECT_BLAST>,Int<100>,Int<400>>,Int<100>,Scale<EffectPosition<EFFECT_BLAST>,Int<100>,Int<400>>,Scale<EffectPosition<EFFECT_BLAST>,Int<28000>,Int<8000>>>,EFFECT_BLAST>,Mix<IsLessThan<ClashImpactF<>,Int<26000>>,TransitionEffectL<TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<ClashImpactF<>,Int<12000>,Int<60000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,EFFECT_CLASH>,TransitionEffectL<TrWaveX<RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Int<100>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>>,EFFECT_CLASH>>,LockupTrL<TransitionEffect<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Int<200>>,StripesX<Int<1800>,Scale<NoisySoundLevel,Int<-3500>,Int<-5000>>,Mix<Int<6425>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<12850>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>>>,AlphaL<AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<10280>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Int<13000>>>,TrJoin<TrDelay<8000>,TrInstant>,TrFade<3000>,EFFECT_LOCKUP_BEGIN>,TrConcat<TrJoin<TrDelay<50>,TrInstant>,Mix<IsLessThan<ClashImpactF<>,Int<26000>>,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,AlphaL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<ClashImpactF<>,Int<20000>,Int<60000>>>>>,TrFade<300>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Int<16000>>,30>,TrSmoothFade<600>>>,LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrConcat<TrJoin<TrDelay<4000>,TrWipeIn<200>>,AlphaL<BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Remap<Scale<RampF,Int<65536>,Int<0>>,StaticFire<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,Mix<TwistAngle<>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>,RotateColorsX<Int<3000>,Mix<Int<12000>,Black,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>>,0,3,5,3000,10>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrJoin<TrDelay<4000>,TrFade<300>>,AlphaL<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeX<IgnitionTime<300>>,TrWipeInX<RetractionTime<0>>,Black>,TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<Trigger<EFFECT_PREON,Mult<Int<16384>,WavLen<EFFECT_PREON>>,Mult<Int<10922>,WavLen<EFFECT_PREON>>,Mult<Int<5462>,WavLen<EFFECT_PREON>>>,BrownNoiseFlicker<Black,RgbArg<PREON_COLOR_ARG,Rgb<255,0,0>>,100>,RandomPerLEDFlicker<RgbArg<PREON_COLOR_ARG,Rgb<255,0,0>>,Rgb<50,50,50>>,BrownNoiseFlicker<Mix<NoisySoundLevel,RgbArg<PREON_COLOR_ARG,Rgb<255,0,0>>,RotateColorsX<Int<4000>,RgbArg<PREON_COLOR_ARG,Rgb<255,0,0>>>>,White,50>>,SmoothStep<Scale<NoisySoundLevel,Int<-10000>,Int<36000>>,Int<-4000>>>,TrDelayX<WavLen<EFFECT_PREON>>>,EFFECT_PREON>>>(),
  37. },
  38. { "Crispity", "tracks/TheBoldOne.wav",
  39. StylePtr<Layers<
  40. StyleFire<BrownNoiseFlicker<RotateColorsX<Variation,Red>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb16<11805,0,1587>>,RotateColorsX<Variation,Rgb<60,0,0>>>,300>,RotateColorsX<Variation,Rgb<80,0,0>>,0,6,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>>,
  41. //Unstable red/pink
  42. TransitionEffectL<TrConcat<TrFade<200>,AlphaL<RotateColorsX<Variation,DeepPink>,SwingSpeed<400>>,TrDelay<30000>,AlphaL<RotateColorsX<Variation,DeepPink>,SwingSpeed<400>>,TrFade<800>>,EFFECT_FORCE>,
  43. //Force effect, temporarily allows color change based on swing speed
  44. AlphaL<AudioFlickerL<RotateColorsX<Variation,DeepPink>>,SwingSpeed<400>>,
  45. //Swing effect, audioflicker, Deep Pink connects the tip and emitter when swinging
  46. LockupTrL<Layers<
  47. AlphaL<AudioFlickerL<Rgb<255,225,0>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,
  48. AlphaL<NavajoWhite,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrInstant,AlphaL<White,Int<0>>,TrWaveX<TransitionEffect<NavajoWhite,Rgb<255,225,0>,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,Int<300>,Int<100>,Int<400>,Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>>>,SaberBase::LOCKUP_NORMAL>,
  49. //Responsive lockup
  50. ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,
  51. //Responsive lightning block
  52. AlphaL<RotateColorsX<Variation,DeepPink>,SmoothStep<Scale<SlowNoise<Int<2500>>,Int<1500>,Int<4500>>,Int<-6000>>>,
  53. //Sparking emitter flare
  54. ResponsiveStabL<Orange>,
  55. //Responsive stab
  56. EffectSequence<EFFECT_BLAST,TransitionEffectL<TrConcat<TrInstant,AlphaL<White,BlastF<200,200>>,TrFade<300>>,EFFECT_BLAST>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,ResponsiveBlastWaveL<White,Scale<SwingSpeed<400>,Int<500>,Int<200>>,Scale<SwingSpeed<400>,Int<100>,Int<400>>>,ResponsiveBlastFadeL<White,Scale<SwingSpeed<400>,Int<6000>,Int<12000>>,Scale<SwingSpeed<400>,Int<400>,Int<100>>>,ResponsiveBlastL<White,Scale<SwingSpeed<400>,Int<400>,Int<100>>,Scale<SwingSpeed<400>,Int<200>,Int<100>>,Scale<SwingSpeed<400>,Int<400>,Int<200>>>>,
  57. //Multi-blast, blaster reflect cycles through different responsive effects
  58. ResponsiveClashL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_CLASH>,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,
  59. //Responsive clash
  60. TransitionEffectL<TrConcat<TrInstant,Stripes<3000,-3500,RotateColorsX<Variation,Rgb<255,150,150>>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<60,0,0>>,Black>,BrownNoiseFlicker<RotateColorsX<Variation,DeepPink>,RotateColorsX<Variation,Rgb<60,0,0>>,200>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<128,0,0>>,RotateColorsX<Variation,Rgb<60,0,0>>>>,TrFade<1200>>,EFFECT_IGNITION>,
  61. //Unstable ignition effect
  62. AlphaL<RotateColorsX<Variation,DeepPink>,SmoothStep<Scale<SlowNoise<Int<2500>>,Int<28000>,Int<33000>>,Int<10000>>>,
  63. //Sparking tip flare
  64. LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  65. //Drag
  66. LockupTrL<AlphaL<Mix<TwistAngle<>,Rgb<255,200,0>,DarkOrange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
  67. //Responsive melt
  68. EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>,
  69. //Power save, if using fett263's prop file hold Aux and click PWR while ON (pointing up) to dim blade in 25% increments.
  70. InOutTrL<TrWipeSparkTip<White,100>,TrColorCycle<1065>>,
  71. //Spark tip ignition, cycle down retraction
  72. //TransitionEffectL<TrConcat<TrDelay<1500>,Black,TrFade<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_BOOT>,
  73. //TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_NEWFONT>,
  74. //Optional/alternate passive battery monitor, on boot (1st line) or font change (2nd line) you will get a visual indicator at the emitter of your current battery level. This also works without a blade if you have a lit emitter or blade plug. Green is Full, Red is Low (the color will blend from Green to Red as the battery is depleted), the indicator will fade out after 3000 ms and not display again until powered down and back up or fonts change.
  75. TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrFade<1000>>,EFFECT_BATTERY_LEVEL>,
  76. //On demand battery level, if using fett263's prop file Hold AUX and click PWR while OFF, the battery level is represented by the location on the blade; tip = full, hilt = low and color; green = full, yellow = half, red = low
  77. TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<Sin<Scale<Trigger<EFFECT_RETRACTION,Int<3000>,Int<1000>,Int<500>>,Int<70>,Int<550>>>,RotateColorsX<Variation,DeepPink>,RotateColorsX<Variation,Rgb16<65535,0,2716>>>,Bump<Scale<Trigger<EFFECT_PREON,Int<3000>,Int<1000>,Int<500>>,Int<41000>,Int<32768>>>>,TrDelay<3000>>,EFFECT_PREON>,
  78. TransitionEffectL<TrConcat<TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<520>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<520>,Int<550>,Int<520>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Bump<Int<0>,Int<4000>>>,TrFade<420>>,TrWaveX<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Int<420>,Int<450>,Int<420>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<340>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<340>,Int<430>,Int<340>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Bump<Int<0>,Int<4000>>>,TrFade<300>>,TrWaveX<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Int<300>,Int<400>,Int<300>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<240>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<240>,Int<380>,Int<240>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Bump<Int<0>,Int<4000>>>,TrFade<210>>,TrWaveX<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Int<210>,Int<360>,Int<210>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<190>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<190>,Int<340>,Int<190>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Bump<Int<0>,Int<4000>>>,TrFade<170>>,TrWaveX<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Int<170>,Int<320>,Int<170>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<160>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<160>,Int<300>,Int<160>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Bump<Int<0>,Int<4000>>>,TrFade<150>>,TrWaveX<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Int<150>,Int<250>,Int<150>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<130>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<130>,Int<150>,Int<130>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Bump<Int<0>,Int<4000>>>,TrFade<100>>,TrWaveX<RotateColorsX<Variation,Rgb16<65535,0,2716>>,Int<100>,Int<100>,Int<100>,Int<0>>>,AlphaL<Black,Int<0>>,TrJoin<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,DeepPink>,Bump<Int<0>,Int<4000>>>,TrFade<70>>,TrWaveX<RotateColorsX<Variation,DeepPink>,Int<70>,Int<500>,Int<70>,Int<0>>>,Black,TrInstant>,EFFECT_PREON>
  79. //Preon effect, HUGE thanks to /u/NoSloppy for this!
  80. >>()},
  81. { "Apocalypse", "tracks/TheBoldOne.wav",
  82. StylePtr<Layers<Mix<SmoothStep<Scale<SwingSpeed<400>,Int<6000>,Int<24000>>,Int<10000>>,Mix<Sin<Int<30>>,StyleFire<BrownNoiseFlicker<RotateColorsX<Variation,Red>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<128,0,0>>,RotateColorsX<Variation,Rgb<60,0,0>>>,300>,RotateColorsX<Variation,Rgb<30,0,0>>,0,6,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>>,StyleFire<BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<128,25,0>>,RotateColorsX<Variation,Rgb<60,15,0>>>,300>,RotateColorsX<Variation,Rgb<30,2,0>>,0,6,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>>>,HumpFlicker<RotateColorsX<Variation,Red>,RotateColorsX<Variation,Rgb<125,0,0>>,40>>,
  83. //Swing responsive humpflicker/rotating red/orange unstable base, unstable takes over the blade the harder you swing
  84. //HumpFlicker<RotateColorsX<Variation,Red>,RotateColorsX<Variation,Rgb<128,0,0>>,50>,
  85. //Alternate plain humpflicker
  86. AlphaL<AlphaL<AudioFlickerL<RotateColorsX<Variation,Rgb16<65535,8729,0>>>,SwingSpeed<350>>,SmoothStep<Scale<SwingSpeed<450>,Int<29000>,Int<9500>>,Int<16000>>>,
  87. //Responsive edge audioflicker swing - starts at the tip and takes over the blade the harder you swing
  88. LockupTrL<Layers<
  89. AlphaL<AudioFlickerL<Rgb<255,150,0>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,
  90. AlphaL<Moccasin,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<500>>,TrConcat<TrInstant,White,TrFade<600>,StyleFire<BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<128,25,0>>,RotateColorsX<Variation,Rgb<60,15,0>>>,300>,RotateColorsX<Variation,Rgb<30,2,0>>,0,6,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>>,TrFade<50>,RotateColorsX<Variation,Rgb16<65535,8729,0>>,TrFade<525>,StyleFire<BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<128,25,0>>,RotateColorsX<Variation,Rgb<60,15,0>>>,300>,RotateColorsX<Variation,Rgb<30,2,0>>,0,6,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>>,TrFade<50>,RotateColorsX<Variation,Rgb16<35913,7294,0>>,TrFade<250>,StyleFire<BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<128,25,0>>,RotateColorsX<Variation,Rgb<60,15,0>>>,300>,RotateColorsX<Variation,Rgb<30,2,0>>,0,6,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>,FireConfig<10,1000,2>>,TrFade<100>,RotateColorsX<Variation,Rgb16<20393,1818,0>>,TrBoing<950,3>>,SaberBase::LOCKUP_NORMAL>,
  91. //Responsive lockup with unstable cooldown
  92. //AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrJoinR<TrWipe<100>,TrWipeIn<100>>,White,TrFade<3000>>,SaberBase::LOCKUP_NORMAL>,
  93. //Alternate normal endlock effect
  94. ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,
  95. //Responsive lightning block
  96. ResponsiveStabL<RotateColorsX<Variation,Orange>>,
  97. //Responsive stab
  98. EffectSequence<EFFECT_BLAST,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,LocalizedClashL<White,80,30,EFFECT_BLAST>,ResponsiveBlastWaveL<White,Scale<SwingSpeed<400>,Int<500>,Int<200>>,Scale<SwingSpeed<400>,Int<100>,Int<400>>>,BlastL<White,200,200>,ResponsiveBlastFadeL<White,Scale<SwingSpeed<400>,Int<6000>,Int<12000>>,Scale<SwingSpeed<400>,Int<400>,Int<100>>>,ResponsiveBlastL<White,Scale<SwingSpeed<400>,Int<400>,Int<100>>,Scale<SwingSpeed<400>,Int<200>,Int<100>>,Scale<SwingSpeed<400>,Int<400>,Int<200>>>>,
  99. //Multi-blast, blaster reflect cycles through different responsive effects
  100. //ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,
  101. //Alternate responsive blast
  102. ResponsiveClashL<TransitionEffect<Rgb<255,150,0>,Moccasin,TrInstant,TrFade<100>,EFFECT_CLASH>,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,
  103. //Responsive Clash
  104. //ResponsiveClashL<White,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,
  105. //Alternate white clash
  106. TransitionEffectL<TrConcat<TrInstant,Stripes<3000,-3500,RotateColorsX<Variation,Orange>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<70,25,5>>,Black>,BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RotateColorsX<Variation,Rgb<75,20,5>>,200>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<155,25,0>>,RotateColorsX<Variation,Rgb<65,15,0>>>>,TrFade<2500>,Stripes<3000,-2250,RotateColorsX<Variation,DarkOrange>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<195,15,0>>,RotateColorsX<Variation,Rgb<50,15,0>>>,BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RotateColorsX<Variation,Rgb<85,15,0>>,200>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<155,25,0>>,RotateColorsX<Variation,Rgb<95,15,0>>>>,TrFade<1000>,Stripes<3000,-1500,RotateColorsX<Variation,Rgb16<65535,8729,0>>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<195,10,0>>,RotateColorsX<Variation,Rgb<55,5,0>>>,BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,RotateColorsX<Variation,Rgb<185,10,0>>,200>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<255,13,0>>,RotateColorsX<Variation,Rgb<105,3,0>>>>,TrFade<2500>>,EFFECT_IGNITION>,
  107. //Unstable ignition
  108. TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<RotateColorsX<Variation,Rgb<255,75,0>>,40>,TrFade<500>>,EFFECT_RETRACTION>,
  109. //Humpflicker retraction
  110. LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  111. //Drag
  112. LockupTrL<AlphaL<Mix<TwistAngle<>,Rgb<255,200,0>,DarkOrange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
  113. //Responsive melt
  114. EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>,
  115. //Power save, if using fett263's prop file hold Aux and click PWR while ON (pointing up) to dim blade in 25% increments.
  116. InOutTrL<TrWipeSparkTip<White,175,250>,TrColorCycle<500>>,
  117. //Spark tip ignition, cycle down retraction
  118. TransitionEffectL<TrConcat<TrInstant,AlphaL<BrownNoiseFlickerL<White,Int<30>>,SmoothStep<Scale<SlowNoise<Int<2000>>,Int<500>,Int<5500>>,Int<-4000>>>,TrFade<1100>>,EFFECT_RETRACTION>,
  119. //White flicker retraction effect
  120. TransitionEffectL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<10000>>>,TrFade<1600>,AlphaL<RotateColorsX<Variation,Orange>,Bump<Int<0>,Int<8000>>>,TrFade<1400>,AlphaL<RotateColorsX<Variation,Red>,Bump<Int<0>,Int<6000>>>,TrFade<1000>>,EFFECT_RETRACTION>,
  121. //Emitter cool off retraction effect
  122. //TransitionEffectL<TrConcat<TrDelay<1500>,Black,TrFade<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_BOOT>,
  123. //TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_NEWFONT>,
  124. //Optional/alternate passive battery monitor, on boot (1st line) or font change (2nd line) you will get a visual indicator at the emitter of your current battery level. This also works without a blade if you have a lit emitter or blade plug. Green is Full, Red is Low (the color will blend from Green to Red as the battery is depleted), the indicator will fade out after 3000 ms and not display again until powered down and back up or fonts change.
  125. TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrFade<1000>>,EFFECT_BATTERY_LEVEL>,
  126. //On demand battery level, if using fett263's prop file Hold AUX and click PWR while OFF, the battery level is represented by the location on the blade; tip = full, hilt = low and color; green = full, yellow = half, red = low
  127. TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<Trigger<EFFECT_PREON,Int<3000>,Int<2000>,Int<1000>>,BrownNoiseFlicker<Black,RotateColorsX<Variation,Red>,100>,RandomPerLEDFlicker<RotateColorsX<Variation,Red>,RotateColorsX<Variation,Rgb16<14386,0,0>>>,BrownNoiseFlicker<Mix<NoisySoundLevel,RotateColorsX<Variation,Red>,RotateColorsX<Int<4000>,RotateColorsX<Variation,Red>>>,DarkOrange,50>>,SmoothStep<Scale<NoisySoundLevel,Int<-1000>,Int<25000>>,Int<-4000>>>,TrDelay<6500>>,EFFECT_PREON>,
  128. //Noise responsive preon
  129. TransitionEffectL<TrConcat<TrDelay<3000>,TransitionLoopL<TrWaveX<RotateColorsX<Variation,Red>,Int<115>,Int<400>,Int<250>,Int<0>>>,TrDelay<1000>,TransitionLoopL<TrWaveX<RotateColorsX<Variation,Red>,Int<215>,Int<300>,Int<395>,Int<0>>>,TrDelay<1500>,TransitionLoopL<TrWaveX<RotateColorsX<Variation,Red>,Int<345>,Int<200>,Int<500>,Int<0>>>,TrDelay<1500>,AlphaL<RotateColorsX<Variation,Red>,Bump<Int<0>,Int<6000>>>,TrBoing<500,2>>,EFFECT_PREON>,
  130. //Charge up, wave out preon
  131. TransitionEffectL<TrConcat<TrFade<1500>,AlphaL<HumpFlickerL<RotateColorsX<Variation,Red>,10>,Bump<Int<0>,Int<4000>>>,TrFade<2000>,AlphaL<HumpFlickerL<RotateColorsX<Variation,Orange>,15>,Bump<Int<0>,Int<5000>>>,TrFade<2500>,AlphaL<HumpFlickerL<White,20>,Bump<Int<0>,Int<6000>>>,TrBoing<500,2>>,EFFECT_PREON>
  132. //Emitter heat up preon
  133. >>()},
  134. };
  135.  
  136. BladeConfig blades[] = {
  137. { 0, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  138. WS281XBladePtr<6, blade2Pin, Color8::GRBw, PowerPINS<bladePowerPin4, bladePowerPin5> >(),
  139. WS281XBladePtr<2, blade3Pin, Color8::GRBw, PowerPINS<bladePowerPin6> >(),
  140. WS281XBladePtr<2, blade4Pin, Color8::GRBw, PowerPINS<bladePowerPin6> >(),
  141. CONFIGARRAY(presets) },
  142. };
  143. #endif
  144.  
  145. #ifdef CONFIG_BUTTONS
  146. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  147. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  148. #endif
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement