Go Down

Topic: Arduino : Portal - Still Alive (Read 2591 times) previous topic - next topic

condemned

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

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

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)

[size=8]                -+++$*+-.           .=++*$=--.   $$.        
            -*H########H*-       =*##########$= -=.        
          .+H#H*=----=+$##*     $##H*+=----=$##*-          
          $#$-          .*#$. -H#$-          .$#H          
         .H$              +#H*##*      $       H#-        
         =#+     $$$$=     =###+     -*H$$     +#*        
         -#$              =H#H##+      $       *H.        
          H#*.          -*#H= =H#$.          .$#H          
          .$##$=.  ---+H##$.    *##H*=-..--+$##$          
            =*##########$=       =$##########H+            
               ==+$$*++-            -=+*$$++-              
[/size]

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


KnuttyD

Thats pure win  ;D ;D ;D ;D

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

condemned

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

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

wyager

LOL!  ;D Looks (and sounds) great!

AndyboyH

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

sciguy

Hmmm, portal 2 is coming out in a couple months...
Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

Vick Jr

#7
Nov 25, 2010, 04:15 am Last Edit: Nov 25, 2010, 04:16 am by vickjr Reason: 1
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.

mowcius

Quote
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.

condemned

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.

Vick Jr

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

raron

Quote
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.

condemned

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...

Quote
Makes me wanna play Portal again

I can recommend the flash map pack levels.

Go Up