loading

I am not a big fan of programming. I may like it, but I try to keep it down to a 555 timer, like in this ible. However, when it comes to synthesizers, I kinda NEED programming. One day, while exploring Synthesizers, I came across something known as chiptunes.

I decided to listen and found the music really awesome. So I tried to make it with Arduino. Didn't work. The code was not in the Arduino language. Some browsing of the internet forums led me to find that an Arduino forum user by the name of Stimmer had ported Linus Åkesson's Hardware Chiptune Project to the Arduino.

And now, here is that project.

Step 1: Gains and Losses.

You will gain:

A machine capable of playing a tune every time you push a button to activate it.


You will lose: (Materials)

An Arduino
A speaker+possibly an amp
2 jumper wires (If your speaker doesn't already have them)

Could someone please explain adding LEDs and creating a loop as well. thanks
<p>Step one: Visit Arduino website. </p><p>Step two: Rejoice</p>
<p>Very cool project! This was my first project to utilize a speaker...</p>
<p>I like it!</p>
<p>Stumbled on this project today, didn't know it was possible to do this :-)</p><p>These questions arise quickly: </p><p>- Are there other tunes available?</p><p>- Is there an easy way to add songs?</p><p>Thx,</p><p>Joost</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>In terms of making a tune or adding songs, you have to &quot;compose&quot; them yourself. You need to be able to use something called a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">tracker</a>. Once you know how to use them, there is a tutorial with a link to the software to generate the array <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html" style="">here</a>. So if you were looking for a very quick way to load songs on this, no it's not very possible. I may upload an 'ible soon discussing a thing that can play more easily loadable songs, but as of right now I am super busy.</p>
<p>Super freakn awesome!</p>
<p>thanks super easy and fun. need some mega man 2 up in here!!</p>
<p>blinkyblinky, is there any way that i can play a previously recorded sound? Instead of the song, its awesome by the way.</p>
can I get all this as pdf?
Don't see it. Maybe its cuz I'm using mobile
<p>There is a download as PDF function right below the title.</p>
<p>This is soo funny. Would you post please more info on coding and a link to some basic description how those sound are generated? Just frequency and timing? </p>
<p>Sorry for the late response. The songdata is really the most vital part of the code, as well as these three lines:<br><br>#define TRACKLEN 32</p><p>#define MAXTRACK 0x92</p><p>#define SONGLEN 0x37</p><p>In order to generate your own tunes (which is not that easy) you need to know how to use a <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html">tracker</a>, if you already know it, <a href="http://bearborne.blogspot.com/2012/02/lft-tracker-howto.html">here</a> is a guide to generating your own music. This tracker operates in the Linux terminal (or a Windows program that is not the command line and can run Linux files), so you will likely need to know your way around the Linux terminal as well.</p>
<p>Cool! I liked the music!</p><p>just songdata[] has to be const</p>
<p>I love Chiptune Music - so i made this project - Thanks very nice</p>
sir can I have a downloadable file for second code
sir can I have a downloadable file for second code
<p>It sounds like the mid of giana sisters ;-) A game on commodore C-64!!</p>
i'm new to arduino. <br> <br>i received this error in compiling: <br> <br>Arduino: 1.6.5 (Windows 8.1), Board: &quot;Arduino Uno&quot; <br> <br>In file included from ChiptunesLightsLinus.ino:9:0: <br>ChiptunesLightsLinus:19: error: variable 'songdata' must be const in order to be put into read-only section by means of '__attribute__((progmem))' <br>variable 'songdata' must be const in order to be put into read-only section by means of '__attribute__((progmem))' <br> <br> This report would have more information with <br> &quot;Show verbose output during compilation&quot; <br> enabled in File &gt; Preferences. <br>
<p>I got the same error, and got it to compile by adding the keyword &quot;const&quot; at the beginning of the line so it looks like this: const byte songdata[] PROGMEM = {</p><p>I have to hunt down a speaker, though, so I don't know if the code actually works, just that it compiles.</p>
<p>That worked for me!</p><p>Thanks!</p>
<p>A wee bit quiet through the tiny speaker I used. Works thanks to that code correction. The beat box code only seems to produce a few glitchy noises and a high pitched whine though.</p>
<p>Used an earphone and a small speaker, both with an amplifier. Nice sound and easily done.</p>
It's so funny
<p>Thank you, <a href="http://www.instructables.com/member/blinkyblinky/" rel="nofollow">blinkyblinky</a></p><p>On 1.6.4 I changed &quot;byte songdata[] PROGMEM = {&quot;</p><p>to &quot;const PROGMEM byte songdata[] = {&quot;</p><p>and it compiled for me.</p><p><a href="http://www.arduino.cc/en/Reference/PROGMEM" rel="nofollow">http://www.arduino.cc/en/Reference/PROGMEM</a></p>
<p>Making this change allowed it to <em>compile </em>on mine, but the code seems to do absolutely nothing.</p>
<p>First of all, thank you very much for guide.</p><p>Is there a way to add a loop, so that the music repeats itself when it's over?</p><p>Thanks </p>
<p>i got:<br>In file included from chiptune.ino:10:0:</p><p>chiptune.ino:20:17: error: variable 'songdata' must be const in order to be put into read-only section by means of '__attribute__((progmem))'</p>
<p>Error compiling is what my arduino says</p>
Arduino 1.6.0 and beyond has problems with older code because some variable declarations have changed; revert back to Arduino 1.0.6 or something older and it should work but not before arduino 1.0 though.<br><br>Just the other day I was trying to compile some other code and found out that instead of just byte [variable name] I have to declare byte PROGMEM [variable name] in order to make it work; something similar may have happened with the Octosynth code so try an older build of Arduino such as Arduino 1.0.6 or prior.
<p>How i can do it with LEONARDO?????<br>Can you help me in Code?</p>
<p>It should work without problems. If so, try an older version of Arduino such as 1.0.6 as I have been finding out that Arduino 1.6.1 has some issues with older code.</p>
<p>oh and if u cant make the code can you give me the web address to stimmers website thanks</p>
<p>could you please update your code it does not work. thanks!</p>
<p>Genius! It works finely. THX very much. Please more songs like this one!</p>
<p>Very cool :D</p>
<p>Thanks for posting this. Is there a library somewhere of other tunes?</p>
I want the entire song to start over. Thanks.
I am absolutely astounded! I cannot believe this amazing Instructable. One question though, is there a way to add a &quot;void loop() {&quot; Function? If so, can you please tell me how?
Do you want the song to loop itself or do you just want a void loop? <br>

About This Instructable

61,051views

267favorites

License:

Bio: I love building things and taking pictures. If you want me to build something...I'm open to ideas. My motto? "If you want something ... More »
More by blinkyblinky:Keeping Up Appearances with Chindogu A Complete Beginner's Guide to Raw Files And Raw Processing Hypercard - An Impossible Paper Object 
Add instructable to: