BladeOut won't play after editing blade length

I’m a bit lost. What is the question?

@profezzorn I am not understanding where we missed something in the configs compared above. What should the two blade config say in order for it to work correctly as a 2 button?

You changed NUM_BLADES not NUM_BUTTONS, both show NUM_BUTTONS 2, when changing NUM_BLADES you need to match BladeConfig and number of styles per preset.

Hmmm looks like autocorrect put “buttons” in the reply instead of “blades”. Edited the reply.

I see what you mean now.

@profezzorn While pulling from an example listed in the POD for Blade Detect I got some error notices from Arduino.

With this section it wants “blade” not “blades”.

 BladesConfig blades[] = {
      { 0,
        WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        CONFIGARRAY(blade_in) },

      { NO_BLADE,
        WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        CONFIGARRAY(no_blade), "nbsave" }
    };

I am trying the following out, which compiles. Can someone please update the POD to reflect the correction?

BladeConfig blades[] = {

“Good news everyone!” [Insert Hubert Farnsworth voiceover.]

I can report that I do now have two working configs where the bladeout.wav plays consistently and also (which I need to figure out why and solve this new issue) only plays blade out when you tap aux. While this means I have blade detect properly coded I still need to get the “missing crystal” crackle sound to play.

For anyone interested here’s the initial solution to both the 1-Blade and 2-Blade configs. You’ll also need to goto OS 7.13 (when it releases) since the logging helped Fredrik find the other missing piece. @BK_Saber and @NoSloppy let me know if you guys get anywhere with this latest update and MTFBWY!

// This is a simplified config file template set up for Blade Detect.
//1 Blade, 2Button Config with BladeDetect using OS7.11
#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 2
const unsigned int maxLedsPerStrip = 144;
#define EXTRA_COLOR_BUFFER_SPACE 60
#define VOLUME 1350
#define CLASH_THRESHOLD_G 4
#define AUDIO_CLASH_SUPPRESSION_LEVEL 5
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define KILL_OLD_PLAYERS
#define MOTION_TIMEOUT 60 * 15 * 1000
#define IDLE_OFF_TIME 60 * 15 * 1000
#define DISABLE_BASIC_PARSER_STYLES
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ENABLE_ALL_EDIT_OPTIONS 
#define SAVE_PRESET
#define NO_REPEAT_RANDOM
#define COLOR_CHANGE_DIRECT
#define BLADE_DETECT_PIN 17
#define FETT263_EDIT_SETTINGS_MENU
#define FETT263_SPECIAL_ABILITIES 
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_BATTLE_MODE_START_ON
#define FETT263_LOCKUP_DELAY 200
#define FETT263_BM_CLASH_DETECT 6
#define FETT263_SWING_ON_SPEED 250
#define FETT263_SWING_ON
#define FETT263_TWIST_OFF
#endif

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


#ifdef CONFIG_PRESETS

Preset no_blade[] = {

{ "No_Blade;common","tracks/none.wav",
    StylePtr<Black>(),
   
    "no blade" }

};

//---------------------------------------------------------------

Preset blade_in[] = {

{ "BK_SurvivorBlue;common", "tracks/none.wav",
/* copyright Fett263 JediSurvivor (Primary Blade) OS7 Style
https://fett263.com/fett263-proffieOS7-style-library.html#JediSurvivor
OS7.11 v1.016-p
Single Style 
Base Style: Cal Kestis Survivor Blue
Base Color: BaseColorArg (0) 
--Effects Included--
Ignition Effect: Glitch On [Color: IgnitionColorArg]
Retraction Effect: Glitch Off [Color: RetractionColorArg]
Lockup Effect: Responsive Lockup, Begin Effect: Real Clash, End Effect: Full Blade Absorb [Color: LockupColorArg]
LightningBlock Effect: Responsive Lightning Block [Color: LBColorArg]
Drag Effect: Intensity Fire Drag [Color: DragColorArg]
Melt Effect: Responsive Melt [Color: StabColorArg]
Blast Effect (Randomly Selected): Blast Wave (Sound Based), Responsive Blast Wave (Sound Based) [Color: BlastColorArg]
Clash Effect: Responsive Clash with Wave [Color: ClashColorArg]
*/
StylePtr<Layers<StripesX<Scale<HoldPeakF<Sum<EffectPulseF<EFFECT_IGNITION>,EffectPulseF<EFFECT_ALT_SOUND>>,Int<3000>,Int<3000>>,Int<8000>,Int<3000>>,Scale<HoldPeakF<Sum<EffectPulseF<EFFECT_IGNITION>,EffectPulseF<EFFECT_ALT_SOUND>>,Int<3000>,Int<3000>>,Int<-2600>,Int<-3600>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<12000>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,Pulsing<RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<8000>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,1400>>,TransitionEffectL<TrRandom<TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Scale<WavLen<>,Int<100>,Int<400>>,Int<100>,Scale<WavLen<>,Int<100>,Int<400>>,Scale<EffectPosition<EFFECT_BLAST>,Int<28000>,Int<8000>>>,TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Scale<WavLen<>,Int<100>,Int<400>>,Int<100>,Scale<WavLen<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Int<28000>,Int<8000>>>>,EFFECT_BLAST>,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<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Int<200>>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,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<Stripes<2000,4000,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Mix<Sin<Int<50>>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<4096>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrConcat<TrJoin<TrDelay<4000>,TrWipeIn<200>>,AlphaL<Stripes<2000,3000,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Mix<Sin<Int<30>>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<8192>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrFade<300>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrConcat<TrJoin<TrDelayX<Mult<IgnitionTime<300>,Int<16384>>>,TrWipeX<Mult<IgnitionTime<300>,Int<16384>>>>,Mix<SmoothStep<NoisySoundLevel,Int<-1>>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>,TrWipeX<Mult<IgnitionTime<300>,Int<16384>>>>,TrConcat<TrJoin<TrDelayX<Mult<RetractionTime<0>,Int<16384>>>,TrWipeInX<Mult<RetractionTime<0>,Int<16384>>>>,Mix<SmoothStep<NoisySoundLevel,Int<-1>>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>,TrWipeInX<Mult<RetractionTime<0>,Int<16384>>>>,Black>>>(),
 
"survivor"}, 

};

BladeConfig blades[] = {
  { NO_BLADE,
    WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        CONFIGARRAY(no_blade), "nbsave" },
  
  { 0,
    WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        CONFIGARRAY(blade_in) },

};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow"); 
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif
// This is a simplified config file template set up for Blade Detect.
//2 Blade, 2Button Config with BladeDetect using OS7.11
#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 2
const unsigned int maxLedsPerStrip = 144;
#define EXTRA_COLOR_BUFFER_SPACE 60
#define VOLUME 1350
#define CLASH_THRESHOLD_G 4
#define AUDIO_CLASH_SUPPRESSION_LEVEL 5
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define KILL_OLD_PLAYERS
#define MOTION_TIMEOUT 60 * 15 * 1000
#define IDLE_OFF_TIME 60 * 15 * 1000
#define DISABLE_BASIC_PARSER_STYLES
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ENABLE_ALL_EDIT_OPTIONS 
#define SAVE_PRESET
#define NO_REPEAT_RANDOM
#define COLOR_CHANGE_DIRECT
#define BLADE_DETECT_PIN 17
#define FETT263_EDIT_SETTINGS_MENU
#define FETT263_SPECIAL_ABILITIES 
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_BATTLE_MODE_START_ON
#define FETT263_LOCKUP_DELAY 200
#define FETT263_BM_CLASH_DETECT 6
#define FETT263_SWING_ON_SPEED 250
#define FETT263_SWING_ON
#define FETT263_TWIST_OFF
#endif
 
#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif


#ifdef CONFIG_PRESETS

Preset no_blade[] = {

{ "No_Blade;common", "tracks/none.wav",
    ChargingStylePtr<Black>(),
    StylePtr<WHITE>(),
   
   "no blade" }

};

//---------------------------------------------------------------

Preset blade_in[] = {

{ "BK_SurvivorBlue;common", "tracks/none.wav",
/* copyright Fett263 JediSurvivor (Primary Blade) OS7 Style
https://fett263.com/fett263-proffieOS7-style-library.html#JediSurvivor
OS7.11 v1.016-p
Single Style 
Base Style: Cal Kestis Survivor Blue
Base Color: BaseColorArg (0) 
--Effects Included--
Ignition Effect: Glitch On [Color: IgnitionColorArg]
Retraction Effect: Glitch Off [Color: RetractionColorArg]
Lockup Effect: Responsive Lockup, Begin Effect: Real Clash, End Effect: Full Blade Absorb [Color: LockupColorArg]
LightningBlock Effect: Responsive Lightning Block [Color: LBColorArg]
Drag Effect: Intensity Fire Drag [Color: DragColorArg]
Melt Effect: Responsive Melt [Color: StabColorArg]
Blast Effect (Randomly Selected): Blast Wave (Sound Based), Responsive Blast Wave (Sound Based) [Color: BlastColorArg]
Clash Effect: Responsive Clash with Wave [Color: ClashColorArg]
*/
StylePtr<Layers<StripesX<Scale<HoldPeakF<Sum<EffectPulseF<EFFECT_IGNITION>,EffectPulseF<EFFECT_ALT_SOUND>>,Int<3000>,Int<3000>>,Int<8000>,Int<3000>>,Scale<HoldPeakF<Sum<EffectPulseF<EFFECT_IGNITION>,EffectPulseF<EFFECT_ALT_SOUND>>,Int<3000>,Int<3000>>,Int<-2600>,Int<-3600>>,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<12000>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,Pulsing<RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>,Mix<Int<8000>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>>,1400>>,TransitionEffectL<TrRandom<TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Scale<WavLen<>,Int<100>,Int<400>>,Int<100>,Scale<WavLen<>,Int<100>,Int<400>>,Scale<EffectPosition<EFFECT_BLAST>,Int<28000>,Int<8000>>>,TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Scale<WavLen<>,Int<100>,Int<400>>,Int<100>,Scale<WavLen<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Int<28000>,Int<8000>>>>,EFFECT_BLAST>,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<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Int<200>>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,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<Stripes<2000,4000,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Mix<Sin<Int<50>>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<4096>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrConcat<TrJoin<TrDelay<4000>,TrWipeIn<200>>,AlphaL<Stripes<2000,3000,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Mix<Sin<Int<30>>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<8192>,Black,RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrFade<300>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrConcat<TrJoin<TrDelayX<Mult<IgnitionTime<300>,Int<16384>>>,TrWipeX<Mult<IgnitionTime<300>,Int<16384>>>>,Mix<SmoothStep<NoisySoundLevel,Int<-1>>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>,TrWipeX<Mult<IgnitionTime<300>,Int<16384>>>>,TrConcat<TrJoin<TrDelayX<Mult<RetractionTime<0>,Int<16384>>>,TrWipeInX<Mult<RetractionTime<0>,Int<16384>>>>,Mix<SmoothStep<NoisySoundLevel,Int<-1>>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>,TrWipeInX<Mult<RetractionTime<0>,Int<16384>>>>,Black>>>(),
 
StylePtr<WHITE>(),  "survivor"},

};

BladeConfig blades[] = {
  { NO_BLADE,
    WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),
        CONFIGARRAY(no_blade), "nbsave" },
  
  { 0,
    WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),
        CONFIGARRAY(blade_in) },

};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow"); 
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

So let’s solve it.

I see fett263 prop. I see NUM_BUTTONS 2.
So when you remove the blade, if the font contains bladeout.wav, it will play that.
Then you are in your “No_Blade;common” preset from your “no blade” preset array, and the blade is off.
Fett263 controls say that when off, AUX will change preset.
Since you only have one preset to choose from, it’s going to use it again, and font.wav from the “No_Blade;common” folders should play.

@NoSloppy Hmmm, I didn’t even consider that and IIRC we used the bladeout.wav as the actual font in earlier testing and diagnostics since there wasn’t a correct sound available at the time. Now that the correct sound’s there things work perfect.

Anyone else wanting to do this here’s a Teaser Video. Of course you’ll need to setup the proper No_Blade font folder and appropriate sounds in there along with bladein.wav bladeout.wav and no_blade.wav for the integration. Definitely use the no_blade.wav also as the font and boot for good measure. Finally put all three sounds in common or the font folders so the functionality follows through all the presets.

SOLVED AS OF DECEMBER 2023 with ProffieOS 7.13 bug fix.