Sorry for bothering again,

Sorry for bothering again, but did I already mention that this animation really has potential? And it’s just 8 lines of code. Imagine this light on the front of a DJ table.
Okay, I should shut up and go to the bed.
http://www.youtube.com/watch?v=il5wc79k8LA

I think that I have a great use for it. Can you share? Thanks for showing it.

This is basically all. I kid you not.

void animation22()
{
leds[120] = CRGB(bands[6], bands[5] / 8, bands[1] / 2);
leds[120].fadeToBlackBy(bands[3] / 12);
//move to the left
for (int i = NUM_LEDS - 1; i > 120; i–) {
leds[i] = leds[i - 1];
}
// move to the right
for (int i = 0; i < 120; i++) {
leds[i] = leds[i + 1];
}
FastLED.show();
fade_down(2);
}

void fade_down(uint8_t value){
for (int i = 0; i < NUM_LEDS; i++)
{
leds[i].fadeToBlackBy(value);
}
}

and the bands[x] is data directly off the MSGEQ7 ??

Yes, the band values scaled down to 8 Bit. But it could be FFT data, too.
Okay, there is a little data smoothing going on but it´s not essential for the effect.

Here in detail:

// some audio data smoothing
void soften_spectrum_data()
{
for (byte i = 0; i < 7; i++)
{
uint8_t old = bands[i];
uint16_t data = left[i] + right[i] + old + old;
data = data / 4;
bands[i] = data;
}
}

It’s not bad and is a fine routine for the arsenal. I’d really like to see something that:

  • is sound reactive
  • uses palettes
  • uses something like noise16
  • is time based aka beatsin8 (because I hate loops)
  • has similarly short code
  • is still 1 dimensional

Mr. picky over here, I know.

I tryed to combine audio+noise on a one dimensional setup but except shifting and scaling there is not much you can do. Same thing with multiple layers maybe. But I got the impression it adds unnecessary chaos. If you find a cool way to combine it i´d love to see that!

My favorite programs are the ones that look very very simple but when they run have a lot of depth to them :slight_smile:

I can’t wait to try this out, thanks for sharing!

You’re welcome, @Jason_Coon !

So, what I would likely do to mix noise and audio is I’d figure out which contributes what. For example, maybe audio modulates brightness where noise selects color and whether or not a pixel is on/off. Or maybe audio modulates the speed with which we move through the noise space, or some such.

This is really making me want to finally crack out and dig into audio responsive code. (Every time I think about doing that, someone looks at a piece of mine and says “how do you get it to match so well with the music!” - and I realize the brain is a better pattern matcher/finder than I could be :slight_smile:

Indeed, @Daniel_Garcia ! If the frame rate is high enough it gives the space to SEE every little interference and associate something completely unique and new inside the brain.
I’d really love to see your audio responsive art!

Impressive! :slight_smile:

So groovy with so little code = totally awesome.

Everything you need is comment #2, really. Beside this you need one more function to get the audio data - so that depends on your hardware setup.
The full sketch is 40kB and requires some specific hardware…

Thanks for sharing. Just ordered a MSGEQ7 last week and can’t wait to give this a try.

Had it running at 270 fps on 100 leds today. That means that sounds as short as 4ms become visible… What an amount of detail! Can’t wait to set some APA102s on fire!

@Stefan_Petrick you can fadeToBlackBy(leds, 2) on the whole array of leds to save more lines

For my light suit project. We are using a microphone with an opamp and then a envelop detector to get only 50 or 100hz (the bass) with a potmeter as analog input. Will this still work with this code?