How to program LED strip to sync with music.

I want to program led strip to turn on and off at certain parts in my music. I also want to use led diodes and have those turn on and, or off at certain times while music plays.

The music is an hour long. So I want the complete hour to be an automated light show that turns on and off by it self.

I also want to be able to bypass this automated light show.

Any suggestions how this can be done? I've never used arduino.

Is the change of status of your LED display based purely on time or is it based on properties of the music you are playing like frequency, amplitude, pitch, genre, artist etc.

It's only based on time! Any suggestions would be great.

Here, you just populate the array intervals[] with the times you want:

// yet another blink sketch by aarg, Arduino forum
//
// circular list of intervals, alternating off and on
unsigned long intervals[] = {500, 500};
const byte NUM_OF_INTERVALS = sizeof(intervals) / sizeof(unsigned long);
byte currentInterval = 0;

unsigned long previousMillis = 0;
void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
  unsigned long currentMillis = millis();          //get current value of millisecond counter
  if (currentMillis - previousMillis >= intervals[currentInterval])  //if the time interval has elapsed
  {
    currentInterval = currentInterval + 1;     // select the next interval in the list
    if (currentInterval >= NUM_OF_INTERVALS)
      currentInterval = 0;
    digitalWrite(LED_BUILTIN, not digitalRead(LED_BUILTIN));    //change state of the LED
    previousMillis = currentMillis;                //save the time of change
  }
}

Note that it must have an even number of entries, to repeat properly.

Thanks Aarg. Here's more detail of what I'm trying to do. I have two led strips (strip 1 and 2), and five led diodes (red, green, blue, yellow, white).

Will I be able to at specific times in the 60 minutes, turn on and off each led strip and, or any of the led diodes? Here's an example.

start with led strip #1 on (all other lights off).

Then 6 minutes later turn off led strip #1, and turn on led strip #2, and the red diode.

After 12 minutes, turn off led strip #2, and red diode. Now turn on the yellow diode and the blue one.

At 16 minutes, turn all those lights off, and just turn on the green led diode.

So if that's possible, and me being new to Arduino, what circuit board would I need, and what articles should I read? I don't have any programming experience...is this led switching a few hours to do, or will this project take a week? Thanks!

I don't have any programming experience...is this led switching a few hours to do, or will this project take a week?

With no programming experience it will take nearer a month. An hour is a long time to test and you need to get your head round the concepts. Depending on how complex are the light on / off changes you might not be able to fit an hour into the available memory.

what circuit board would I need

Use a Uno to begin with.

I have two led strips (strip 1 and 2),

What sort? What current? What voltage?

The led strips are 5 volts. I also have step-down circuits if needed to use with Uno (I could use 12, 9, 5 etc).

Would anyone on this forum be willing to take this on? How much would they charge? Also, once the programming is done, would it be easy enough to tweak as needed to go with my audio?

Well, I would take your money. But I already gave you the goods for free. The only thing is, it only runs one strip. Modifying it for multiple strips isn't that hard. So that would be foolish on your part, and unethical on my part...

A crude method would be to duplicate two more of my sequence code and throw it into loop(). Inelegant, but it would probably work. Just rename a few variables, also.

The sketch I posted doesn't need any additional hardware to run, since it's a demo. It just flashes the onboard LED. But that's the beauty of it. You can experiment with it, the instant you get your hands on an Arduino.

Then it can be easily extended to control different LEDs.

Which article would be best to find out how to get code on uno? Do I just connect sub, then drop code onto uno?

Which article would be best to find out how to get code on uno? Do I just connect sub, then drop code onto uno?

[u]Getting Started With The Arduino[/u].

Once you've downloaded and installed the IDE software and plugged your Arduino into your USB port, you should have the Blink LED program running in about 5 minutes (or maybe less than 5 minutes).