Pages: [1]   Go Down
Author Topic: Arduino : Portal - Still Alive  (Read 1961 times)
0 Members and 1 Guest are viewing this topic.
Oxford (England)
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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)

               -+++$*+-.           .=++*$=--.   $$.        
             -*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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pure Awesome!  smiley
Logged

Seattle
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
Haxorz? In MY Computerz? Its liklyr than you think
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats pure win  ;D ;D ;D ;D

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

Oxford (England)
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

LOL!  ;D Looks (and sounds) great!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

that's amazing! smiley-grin You should point it to Valve, they always like community projects like this smiley
Logged

Nowhere
Offline Offline
God Member
*****
Karma: 3
Posts: 852
|-\ |\|\
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-wink
I'd love to add the portal song to my collection.
« Last Edit: November 24, 2010, 10:16:03 pm by vickjr » Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Oxford (England)
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Norway
Offline Offline
Sr. Member
****
Karma: 4
Posts: 423
microscopic quantum convulsions of space-time
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'd love to see that.

Me too. All in the interest of learning some more C++, of course smiley
(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 smiley 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.
Logged

Oxford (England)
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: