Arduino : Portal - Still Alive

I've been playing with a TellyMate shield, some polygons and a speaker...

http://www.youtube.com/watch?v=a_RKKbkprx0

The sketch is available on the TellyMate Examples page. The speaker is connected as per the Arduino tone() tutorial. It's easy to convert it to a standard serial stream (instructions are in the sketch), and it plays nicely with the Arduino IDE's Serial Monitor (at 57600 baud)

                -+++$*+-.           .=++*$=--.   $.        
             -*H########H*-       =*##########$= -=.        
           .+H#H*=----=+$##*     $##H*+=----=$##*-          
           $#$-          .*#$. -H#$-          .$#H          
          .H$              +#H*##*      $       H#-         
          =#+     $$=     =###+     -*H$     +#*         
          -#$              =H#H##+      $       *H.         
           H#*.          -*#H= =H#$.          .$#H          
           .$##$=.  ---+H##$.    *##H*=-..--+$##$           
             =*##########$=       =$##########H+            
                ==+$*++-            -=+*$++-

I think that it should run on any Arduino with 2kb SRAM. I'm running it on a 328-base Duemilanove clone.

Pure Awesome! :slight_smile:

Thats pure win ;D ;D ;D ;D

The pauses are a little weird in the middle, but great job!

Quick update: I've replaced the 'tone()' music with some two-channel, wavetable driven, ADSR envelope shaped music instead... http://www.youtube.com/watch?v=3cFXxY7K6wo

The updated sketch will be available shortly from the batsocks website...

LOL! ;D Looks (and sounds) great!

that's amazing! :D You should point it to Valve, they always like community projects like this :)

Hmmm, portal 2 is coming out in a couple months...

Does this mean that you have the portal song in the form of note frequencies (or better yet, a program that converts regular songs to frequencies)? If so could you post it?

I'm trying to make a c++ program to play songs as system beeps. I can already Rick-Roll people's computers without them being able to turn off the volume. ;) I'd love to add the portal song to my collection.

I’m trying to make a c++ program to play songs as system beeps. I can already Rick-Roll people’s computers without them being able to turn off the volume.
I’d love to add the portal song to my collection.

Ha!

I’d love to see that.

I'm afraid there was nothing automated here.

I took a sheet-music version I found and encoded each note by hand into the internal format that I use.

This internal format is essentially an array of 'duration' + 'note' values. The 'note' value is an index into a separate lookup table for the frequency.

Thats actually exactly what i need. Could you post your array and lookup table?

I'd love to see that.

Me too. All in the interest of learning some more C++, of course :) (and to clarify, that was sincere, I don't intend to write a bunch of nonstop BIOS beep music virii)

Btw, awesome portal song! Makes me wanna play Portal again :) I'd also love to take a peek at that code, I'm usually not a sound guy. Hm... didn't sound too good (ah the puns..). I think I'll attribute that to language trouble right away.

The sketch is already available; see the TellyMate Shield Examples page. However, be warned: It's very large and not particularly easy to read. (i.e. I'm not overly proud of the code quality!) I might spend some time and put together a simpler 'tune only' demonstration...

Makes me wanna play Portal again

I can recommend the flash map pack levels.