Blaster Pixel Styles

I wanted to share the finalized code for the blaster blade styles. I will also attach a video at the bottom. I hope everyone finds this useful! Thank you again to NoSloppy!!! My Hero.

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 2
#define VOLUME 2000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_WS2811
#define ENABLE_SD
#define DELAYED_OFF
#define ENABLE_BLASTER_AUTO
#endif

#ifdef CONFIG_PROP
#include "../props/blaster.h"
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {

// Custom Wipe to tip blast

{ "A180", "tracks/medley1.wav",
StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Red,TrFade<300>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrDelay<100>,DeepSkyBlue,TrFade<200>,Blinking<Black,Blue,100,500>,TrFade<300>>,EFFECT_STUN>>>(),

StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Red,TrWipe<200>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrWipe<100>,DeepSkyBlue,TrWipe<100>,Blinking<Black,Blue,100,500>,TrWipe<200>>,EFFECT_STUN>>>(),
},

{ "DL44", "tracks/medley1.wav",

StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Red>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),

StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Red>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>()},

{ "Westar", "tracks/medley1.wav",
StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrDelay<100>,DarkOrange,TrFade<200>,Black,TrFade<300>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrDelay<100>,Green,TrFade<200>,Blinking<Black,Yellow,100,500>,TrFade<300>>,EFFECT_STUN>>>(),

StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrWipe<100>,DarkOrange,TrWipe<100>,Black,TrWipe<200>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrWipe<100>,Green,TrWipe<100>,Blinking<Black,Yellow,100,500>,TrWipe<200>>,EFFECT_STUN>>>(),
},};

BladeConfig blades[] = {
{ 0, WS281XBladePtr<1, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<13, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin3> >()
, CONFIGARRAY(presets) },
};

#endif

#ifdef CONFIG_BUTTONS
Button FireButton(BUTTON_FIRE, powerButtonPin, "fire");
Button ModeButton(BUTTON_MODE_SELECT, auxPin, "modeselect");

#endif

Blaster Demo Video

1 Like

Okay, next inevitable question. Can we add full auto to the config? Im assuming that is the 3rd mode that I don’t have a style or audio for which is why it does nothing.

I can make the audio files but is there a list of all the audio the blaster mod looks for?

Is the audio file for auto just
Auto01
Auto02 etc…?

add #define ENABLE_BLASTER_AUTO to the CONFIG_TOP.

Files used are:
bgnauto
auto
endauto
blast (not blst)
clipin
clipout
empty
full
jam
unjam
mode
plioff
plion
range
stun
reload
As of OS6:
mdkill
mdstun
mdauto

I assume having multiples like auto01 auto02 etc… would work just like any other sounds like that, I just never personally tried yet.

I tried adding in the effect for the auto fire. lol wont compile.

is there a way to get the pixels to animate after the bgnauto file plays?

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 2
#define VOLUME 2000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_WS2811
#define ENABLE_SD
#define DELAYED_OFF
#define ENABLE_BLASTER_AUTO
#endif

#ifdef CONFIG_PROP
#include "../props/blaster.h"
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {

// Custom Wipe to tip blast

{ "A180", "tracks/medley1.wav",
StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Red,TrFade<300>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Red,TrFade<300>>,EFFECT_AUTO>,
TransitionEffectL<TrConcat<TrDelay<100>,DeepSkyBlue,TrFade<200>,Blinking<Black,Blue,100,500>,TrFade<300>>,EFFECT_STUN>>>(),


StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Red,TrWipe<200>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Red,TrWipe<200>>,EFFECT_AUTO>,
TransitionEffectL<TrConcat<TrWipe<100>,DeepSkyBlue,TrWipe<100>,Blinking<Black,Blue,100,500>,TrWipe<200>>,EFFECT_STUN>>>(),
},

{ "DL44", "tracks/medley1.wav",

StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrDelay<100>,Red,TrFade<200>,Black,TrFade<300>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Blinking<Black,Red,100,500>,TrFade<300>>,EFFECT_STUN>>>(),

StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrWipe<100>,Red,TrWipe<100>,Black,TrWipe<200>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Blinking<Black,Red,100,500>,TrWipe<200>>,EFFECT_STUN>>>(),
},

{ "Westar", "tracks/medley1.wav",
StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrDelay<100>,DarkOrange,TrFade<200>,Black,TrFade<300>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrDelay<100>,Green,TrFade<200>,Blinking<Black,Yellow,100,500>,TrFade<300>>,EFFECT_STUN>>>(),

StylePtr<Layers<
Black,
TransitionEffectL<TrConcat<TrWipe<100>,DarkOrange,TrWipe<100>,Black,TrWipe<200>>,EFFECT_FIRE>,
TransitionEffectL<TrConcat<TrWipe<100>,Green,TrWipe<100>,Blinking<Black,Yellow,100,500>,TrWipe<200>>,EFFECT_STUN>>>(),
},};

BladeConfig blades[] = {
{ 0, WS281XBladePtr<1, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<13, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin3> >()
, CONFIGARRAY(presets) },
};

#endif

#ifdef CONFIG_BUTTONS
Button FireButton(BUTTON_FIRE, powerButtonPin, "fire");
Button ModeButton(BUTTON_MODE_SELECT, auxPin, "modeselect");

#endif

EFFECT_AUTO isn’t a thing. It just does blast repeatedly.

Not sure what you mean here. Again, it should do the blast animation repeatedly.

i guess one problem at a time.

video demo of auto fire

1 Like

That’s the same blade style for all presets?

Yes. With the exception of color, all the styles are the same.

No idea why it wouldn’t be playing same thing if the only change is font.

Ok duh. Auto is lockup. Playing now, I’ll be back.
There’s a first time for everything!

Wonderful! That’s great news :grin:

Ok. How about this?

// muzzle
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Red,TrFade<300>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrDelay<100>,DeepSkyBlue,TrFade<200>,Blinking<Black,Blue,100,500>,TrFade<300>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrInstant,White,TrFade<50>,Red,TrFade<150>>>>,TrInstant,TrConcat<TrInstant,Rgb<50,0,0>,TrFade<400>>,SaberBase::LOCKUP_AUTOFIRE>
  >>()

// barrel
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Red,TrWipe<200>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrWipe<100>,DeepSkyBlue,TrWipe<100>,Blinking<Black,Blue,100,500>,TrWipe<200>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrWipe<50>,Red,TrWipe<150>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<200>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<200>>>>,TrConcat<TrInstant,Rgb<255,100,100>,TrFade<200>>,TrJoin<TrConcat<TrInstant,AlphaL<Rgb<50,0,0>,Bump<Int<32768>,Int<60000>>>,TrFade<400>>,TrWipeX<Int<400>>,TrWaveX<Rgb<50,0,0>,Int<1800>,Int<40>,Int<400>,Int<5000>>>,SaberBase::LOCKUP_AUTOFIRE>
  >>()

Wonderful! here is the code and a video demo of how they look IRL!

I altered the timing of the jynn font for auto fire to match a little better. Thank you SO much for all the help!! do you want these audio files?

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 2
#define VOLUME 2000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_WS2811
#define ENABLE_SD
#define DELAYED_OFF
#define ENABLE_BLASTER_AUTO
#endif

#ifdef CONFIG_PROP
#include "../props/blaster.h"
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {

// Custom Wipe to tip blast

{ "A180", "tracks/medley1.wav",
// muzzle
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Red,TrFade<300>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrDelay<100>,DeepSkyBlue,TrFade<200>,Blinking<Black,Blue,100,500>,TrFade<300>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrInstant,White,TrFade<50>,Red,TrFade<150>>>>,TrInstant,TrConcat<TrInstant,Rgb<50,0,0>,TrFade<400>>,SaberBase::LOCKUP_AUTOFIRE>>>(),

// barrel
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Red,TrWipe<200>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrWipe<100>,DeepSkyBlue,TrWipe<100>,Blinking<Black,Blue,100,500>,TrWipe<200>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrWipe<50>,Red,TrWipe<100>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<150>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<150>>>>,TrConcat<TrInstant,Rgb<255,100,100>,TrFade<150>>,TrJoin<TrConcat<TrInstant,AlphaL<Rgb<50,0,0>,Bump<Int<32768>,Int<60000>>>,TrFade<400>>,TrWipeX<Int<400>>,TrWaveX<Rgb<50,0,0>,Int<1800>,Int<40>,Int<400>,Int<5000>>>,SaberBase::LOCKUP_AUTOFIRE>>>(),
},

{ "DL44", "tracks/medley1.wav",
// muzzle
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrDelay<100>,Red,TrFade<200>,Black,TrFade<300>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrDelay<100>,White,TrFade<200>,Blinking<Black,Red,100,500>,TrFade<300>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrInstant,White,TrFade<50>,Red,TrFade<150>>>>,TrInstant,TrConcat<TrInstant,Rgb<50,0,0>,TrFade<400>>,SaberBase::LOCKUP_AUTOFIRE>>>(),

// barrel
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrWipe<100>,Red,TrWipe<100>,Black,TrWipe<200>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrWipe<100>,White,TrWipe<100>,Blinking<Black,Red,100,500>,TrWipe<200>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrWipe<50>,Red,TrWipe<150>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<200>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<200>>>>,TrConcat<TrInstant,Rgb<255,100,100>,TrFade<200>>,TrJoin<TrConcat<TrInstant,AlphaL<Rgb<50,0,0>,Bump<Int<32768>,Int<60000>>>,TrFade<400>>,TrWipeX<Int<400>>,TrWaveX<Rgb<50,0,0>,Int<1800>,Int<40>,Int<400>,Int<5000>>>,SaberBase::LOCKUP_AUTOFIRE>>>(),
},

{ "Westar", "tracks/medley1.wav",
// muzzle
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrDelay<100>,DarkOrange,TrFade<200>,Black,TrFade<300>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrDelay<100>,Green,TrFade<200>,Blinking<Black,Yellow,100,500>,TrFade<300>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrInstant,DeepSkyBlue,TrFade<50>,DarkOrange,TrFade<150>>>>,TrInstant,TrConcat<TrInstant,Rgb<50,0,0>,TrFade<400>>,SaberBase::LOCKUP_AUTOFIRE>>>(),

// barrel
  StylePtr<Layers<
    Black,
    TransitionEffectL<TrConcat<TrWipe<100>,DarkOrange,TrWipe<100>,Black,TrWipe<200>>,EFFECT_FIRE>,
    TransitionEffectL<TrConcat<TrWipe<100>,Green,TrWipe<100>,Blinking<Black,Yellow,100,500>,TrWipe<200>>,EFFECT_STUN>,
    LockupTrL<Layers<
      TransitionLoopL<TrConcat<TrWipe<50>,DarkOrange,TrWipe<150>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<DeepSkyBlue,Bump<Int<0>,Int<25000>>>,TrFade<200>>>,
      TransitionLoopL<TrConcat<TrInstant,AlphaL<White,Bump<Int<0>,Int<25000>>>,TrFade<200>>>>,TrConcat<TrInstant,Rgb<255,100,100>,TrFade<200>>,TrJoin<TrConcat<TrInstant,AlphaL<Rgb<50,25,0>,Bump<Int<32768>,Int<60000>>>,TrFade<400>>,TrWipeX<Int<400>>,TrWaveX<Rgb<50,0,0>,Int<1800>,Int<40>,Int<400>,Int<5000>>>,SaberBase::LOCKUP_AUTOFIRE>>>(),
},};

BladeConfig blades[] = {
{ 0, WS281XBladePtr<1, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<13, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin3> >()
, CONFIGARRAY(presets) },
};

#endif

#ifdef CONFIG_BUTTONS
Button FireButton(BUTTON_FIRE, powerButtonPin, "fire");
Button ModeButton(BUTTON_MODE_SELECT, auxPin, "modeselect");

#endif
1 Like

Came out great!

1 Like

Thank you again! I’ll be sure to tag you and give appropriate recognition for your help when I post about this blaster :grin: