music and lighting for newbie

I am new to arduino. I have an idea for a project and need to know if its feasible and possibly what I need to get it done. Basically I want to play a song and during parts of the song certain lights come on and others go off. For example and simplicity. The ABC song. during the song when the music is playing and it says A, a light on A comes on, then B, light comes on B but A turns off, etc.. through alphabet.

Thanks for help!

You can play music, and light up lights with an Arduino, but you won't be able to recognize words like that and light lights when the Arduino "hears" them.

There are voice recognition shields / libraries out there, but they need to be trained to a single orator and will most likely never work the way you are hoping they will.

Shorter answer: sorry, no.

well it wouldn't need to recognize the voice. its more of a timing issue. You can use the arduino with the vixen program to control lights to music. however, you need to be plugged to a computer. I want to do it while not plugged into a computer.

My new thought is to use a SD card with at particular .wav file. The arduino's code would cause the .wav file to play then in the code have it trigger different lights to go on and off based off the song. Is that possible?

That would s a n effect what this does. Arduino Voice - YouTube

Seadog - Yes, that's VERY possible. There are a lot of music shields out there, some are easier to use than others. You could create a menu to select a song and trigger different light animations.

(Grumpy_Mike - that's a cool video.)

ok thanks, that's a start. now to find the code and learn how to do that. :slight_smile: Like I said I'm a newbie. Don't even own the equipment. Not sure what to get.

Ok but you do not find code you write it, unless you just want to blindly copy what some one has done before.

I could write it, however, I'm not familiar with this coding. Been a LONG time since I coded in basic and fortran, which is all i've ever done, besides HTML.

seadog852:
I could write it, however, I'm not familiar with this coding. Been a LONG time since I coded in basic and fortran, which is all i've ever done, besides HTML.

Perhaps you can give it a try and do a better description of " I want to play a song "? What is it?

Do you want to play musical notes (frequencies) using the Arduino "tone() function for playing simple beeps in different frequencies to create a melody?

Or do you want to play a recorded .WAV or .MP3 file from SD card, including orchestra, guitar, bass and vocals as audio playback mix of sounds?

I could write it, however, I'm not familiar with this coding. Been a LONG time since I coded in basic and fortran, which is all i've ever done, besides HTML.

Hi seadog,

It sounds like you are looking to pay for someone to make a small jukebox with synchronized lighting animations.

Do you have the music? Most music shields/chips accept MP3 or WAV files.

You'll also need a way to select the song (buttons, keypad) and a series of LEDs or other lights. Maybe a display too?

Pat

Not looking for to pay anyone to do this, I can do it. just looking for the open source coding to do what I want it to do. . Looking for guidance.

Not sure what a better description of what I want, other than what i posted. as a song plays for 10 seconds I want light 1 to go on. and from 11-20 seconds light 2 comes on, light 1 goes off from 21-30 seconds, light 3 comes on and light 2 goes off. This time is based on the song that will play. The arduino will start the song and the light sequence when activated. The song can and is in .wav form from what I found.

I just need help in what arduino should i get, what I need to make it play a wav file, etc. Thanks for help, but again, not looking to pay anybody to do this.

Get a Uno and an Adafruit wav shield. You will be able to use the outputs to drive the LEDs but you should not use an addressable strip as the interrupts will interfere with it / the sound production.

Break the code down into small steps. I suggest you start by studying the blink without delay sketch and write your flashing light sequence as a state machine driven by the data in an array. The array will contain the delay period and what lights are on during that period. In that way it is easy to change the song because all you have to do is to change the file name and the data array.

You may want to consider the MP3 player. It's easier to put together if you're not a solderer.

The challenging part of the project will be to synchronize the lighting effects with the music.

seadog852:
The song can and is in .wav form from what I found.

So use an "MP3 player module" or "MP3 player audio shield for Arduino.

All or almost all MP3 players also can play WAV files from SD card.

Typically an earphone amplifier is provided to drive earphone output.

If you need to drive big speakers, in most cases you will have to use a power amplifier in addition.

For controlling MP3 player modules you need either I2C, SPI or Serial programming, look up the datasheet! For many of the MP3 player chipsets there should be Arduino code available which can show you how to control them and start files playing from SD card.

Thanks for the help all. I'll give it a go and see what happens