Im still working on my suit. I’m now almost finished with my print. I get analog readings from 50hz (bass) 0-1023. So I want to use that to create some music effects.
At first I have a question, I want to create the same effect the guy in this movies uses at 6:30, that the led has 1 color and another color is growing inside it. I maybe want to make that active to music with my analog readings. So if analog value is increasing also increase led strip growing or detect growing speed or so.
Some thoughts on how I might try it. I’m also assuming that the center of your body is where pixel zero is located and the pixels count outward toward hands and feet.
Since you always want some sort of secondary background color, first fill the whole strip with that bg color, lets say red.
fill_solid(leds, NUM_LEDS, CRGB::Red);
Don’t call show() yet though.
Then read the analog value (0-1024) and use the map function to map that from zero (center of body) to the number of pixels out to the end of the longest arm/leg. Let’s call this “target”. Say from the center of the body out to the end of hand is 50 pixels, so something like:
Now fill your inner pixels from center outward based on the target value. This overwrites the background color (red) with the inner color (blue).
for (i=0, i < target, i++) {
fill_solid(leds, NUM_LEDS, CHSV(160,255,255); // fill with blue
}
Now call FastLED.show()
Try to get something like this working for just one strip on one arm first and see how it looks. It maybe nice and responsive, or the inner color going in/out may turn out to have a jerky/stuttery feel. If it’s jerky/stuttery then I’d experiment with polling the analog value more or less frequently, or try to add some dampening so the current inner color expansion chases the target value in/out. But leave that for later. Get basics working first.