Sunday, November 30, 2014

Baby, I've Started Coding My LilyPad!

Today, I sat down and started coding the song "Baby, It's Cold Outside," to get myself in the holiday spirit! I matched the notes on the sheet music with those on this frequency chart.  I struggled a bit with the length of the notes and rests, so I'd like to try to find a tool for that as well.

Ideally, I'd like to create a scarf that plays this song and flashes multicolored lights when the temperature dips.

I haven't yet figured out how to program lights to flash in sync with my music, but that is next on my list.  (It looks like Lucie has figured it out, though).

The video is less than thrilling, but you can hear how my song is progressing.

1 comment:

  1. I'm not musical enough to do it from sheet music. I can't read music. So when I created my first arduino code to music when I took Caleb's class, I wanted Jeopardy music to play during my 'game buzzer' so I did what anybody who can't read music would do -I reached out to my musical children. Hey kiddos.. can anyone write out the notes to Jeopardy for me. When I tried it it sucked. I then reached out again and got a quick lesson on how to read the charts that convert notes to frequencies. It helped, but not sure I remember how. So for my musical hat, I used the sketch that came with the Sweater you posted. The LED's just flash back and forth at different beats for the 3 songs. I going to trust that others who know more about music than I coded knew the right beat and coded it correctly.

    I started with the musical sweater code

    And realized the Switch song part did not work. But it has some code it in that I understood.. so with LOTS of trial and error I pulled out ONE song and added it segment by segment to a simple sketch of BASIC Switch. Let me find it and post it as a blog post.