Audio Lag in Color Change Menu

I’ve just come across this in my recent builds. When in the color change menu, the audio lags behind the color. The saber will change color quickly, but the audio is behind it. For example, I would go from red to green, and the audio for the color is 2-3 colors behind but eventually catches up. Has anyone else experienced this? It has never happened before. Recent builds are running the latest OS on a 3.9

Have you checked SD card speed with ‘sdtest’ in Serial Monitor?

If it’s using sound_library queueing, sounds will play to completion.
Without some code in place to bypass queueing up another sound if one is currently still playing, you essentially get a long line of sounds that need to, and will finish.
So if you are rotating faster than the colors are spoken, you will experience what you are saying.

Yes, SD card speed seems normal. No other sounds lag in any other effects

Where can I find the code, because I’ve never experienced this before on any 2.2s or earlier 3.9s? Is queueing sounds normal because I’ve only just run into it now.

If it’s different than the way it performs on other setups, then it’s not a code thing.

Ok, which OS version, prop and color change type are you using?

I am using OS 7.14, your prop, and clicking pwr and aux simultaneously and rotating the hilt to change color. Using one of Brian’s voice packs

Post your config, is it all presets or certain presets?

It happens on all presets. Here is my config

Hmm, ok let’s run ‘sdtest’ on the SD card. Those styles are using Edit Mode arguments with Color List; the Color List and other Menu items ignore the turn while the current prompt is playing, so it may be the files are corrupt or there’s a speed issue with the SD that is causing this, because the color shouldn’t change to the next until the current voice prompt file completes.

ProffieOS7 requires SD card preformance to be 1200kbps read speed with 12 simulatenous audio streams. Subpar or poor performing SD cards will cause the saber to lag or freeze.
If you experience lag or slow response you need to run ‘sdtest’ in Serial Monitor. Even if SD is labeled as high performance you should run sdtest to be sure.

  • First, remove DISABLE_DIAGNOSTIC_COMMANDS define from your config.
  • Upload new config (you may temporatily need to remove some presets if exceeding FLASH memory)
  • With saber connected go to Arduino > Tools > Serial Monitor
  • Type ‘sdtest’
  • If you do not have 1200kbps read speed and 12 simulatenous audio streams you will want to replace your SD with a better performing card.

You can also improve SD performance via formatting and file structure, also be sure to ALWAYS ‘Eject’ the SD card anytime it’s mounted to your computer to prevent file corruption.

1 Like

Thank you, Fernando, for your insight and guidance! I will do all of these steps.

You’re welcome, post the results of the sdtest, this way we can see what comes up, in case there’s overflows etc.

Okay, I completed all the steps, even reformatted the SD card, and ejected it normally.

Avg speed: 1844.74 kbs, 20.92 simultaneous audio streams

Voice is still lagging a bit, but it’s faster than it was.

If it improved, I think it’s something with the sounds. Maybe try a different Voice Pack for common, see if there’s something in the sound files causing.

Okay, I’ll try different voice packs

If you’re able to, try testing while connected to Serial Monitor and see what’s being output while the sounds are playing, it may give us some insight.