Arduino, Music, LED..

27 views
Skip to first unread message

ChrisH

unread,
Sep 18, 2016, 7:11:11 PM9/18/16
to milwaukeemakerspace
So I'm using an Uno and an Adafruit WaveShield (https://www.adafruit.com/products/94) to play back a simple heartbeat track as part of a Halloween prop.  I'd love to be able to flash an LED in sync with the audio.  Has anyone ever done anything like this, and if so, how did you accomplish it?

Thanks!

Royce Pipkins

unread,
Sep 18, 2016, 8:41:24 PM9/18/16
to milwaukeemakerspace

The singing pumpkins are synchronized by time. There is a list of animation modes for the servos and the number of milliseconds into the song they are to activate. The list was made using label tracks in Audacity. I exported the label track as text and then massaged the text in to a literal C array initializer which is compiled into the sketch. When the Arduino starts it plays the song right away and then starts comparing the return value of millis() to the entries in the array.

This might be more than you need. Some sort of function that looks at the amplitude of the track might be enough for a heartbeat.


On Sun, Sep 18, 2016, 6:11 PM ChrisH <hemm...@gmail.com> wrote:
So I'm using an Uno and an Adafruit WaveShield (https://www.adafruit.com/products/94) to play back a simple heartbeat track as part of a Halloween prop.  I'd love to be able to flash an LED in sync with the audio.  Has anyone ever done anything like this, and if so, how did you accomplish it?

Thanks!

--

---
You received this message because you are subscribed to the Google Groups "milwaukeemakerspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ChrisH

unread,
Sep 18, 2016, 9:20:55 PM9/18/16
to milwaukeemakerspace
That sounds like something I could fairly easily replicate. Would you be willing to share more details, maybe off-list?
To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakerspace+unsub...@googlegroups.com.

Royce Pipkins

unread,
Sep 18, 2016, 9:29:16 PM9/18/16
to milwaukeemakerspace
The original code is here: https://github.com/roycepipkins/SingingPumpkins Thriller.h is where I put the list.

Of course, that is just the result. I don't have the clicks and the grunts of the Audacity procedure documentation. See if you can just feel you way through the label track export/massage thing. If it gives you trouble we can meet up at the space sometime.



To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakers...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "milwaukeemakerspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakers...@googlegroups.com.

Eric Berna

unread,
Sep 20, 2016, 11:03:18 AM9/20/16
to milwaukee...@googlegroups.com
When I checked out the product page for the Adafruit WaveShield I found this linked at the bottom of the page:


This almost exactly matches the description of your project, and includes wiring and coding instructions.

Eric Berna

On Sep 18, 2016, at 6:11 PM, ChrisH <hemm...@gmail.com> wrote:

So I'm using an Uno and an Adafruit WaveShield (https://www.adafruit.com/products/94) to play back a simple heartbeat track as part of a Halloween prop.  I'd love to be able to flash an LED in sync with the audio.  Has anyone ever done anything like this, and if so, how did you accomplish it?

Thanks!

Jim Rawson

unread,
Sep 20, 2016, 11:09:43 AM9/20/16
to milwaukee...@googlegroups.com
I may try that for the small anonymous santa.

To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakerspace+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "milwaukeemakerspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakerspace+unsub...@googlegroups.com.
hooded 3.jpg

ChrisH

unread,
Sep 20, 2016, 12:22:36 PM9/20/16
to milwaukeemakerspace
Eric, you win the internet!
This picture:
Shows exactly how they did it..  They tied the output of the speaker (perhaps before running it through the op-amp) into an analog input on the arduino, then sample it for volume level, and blink the LED's based on the volume. Brilliant!

Thank you VERY much!!

-Chris
To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakerspace+unsub...@googlegroups.com.

Jerry HM

unread,
Sep 20, 2016, 7:53:59 PM9/20/16
to milwaukee...@googlegroups.com

I've built a few of these before..

 

FYI.. you may be disappointed with the 'volume'.

 

I believe I read about a volume hack for it before  (might have to google it)..

 

The Waveshield is actually what my 'custom' (go-to) Arduino board is based off of.

 

Its more or less an Uno and Waveshield all-in-one hybrid...

 

http://dmstudios.net/misc/scab_assembly/all-in-one_2.jpg

 

its just all SMD parts, and is a bit wider that a stick of gum.  (you can see the comparison in the pics)

 

Uses the same libraries (slightly modified library/pins files)..  but is much louder.

 

There might be some waveshields as the space..  or maybe give Pete P. a 'poke' and see if has an extra to sell perhaps?

To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--


---
You received this message because you are subscribed to the Google Groups "milwaukeemakerspace" group.

To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakers...@googlegroups.com.

ChrisH

unread,
Sep 21, 2016, 11:50:35 AM9/21/16
to milwaukeemakerspace
I've got a waveshield already, so I'll use that for testing. :)
Nice board, JD! What chips are on it?

To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakerspace+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "milwaukeemakerspace" group.

To unsubscribe from this group and stop receiving emails from it, send an email to milwaukeemakerspace+unsub...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages