Skip to content

Poliphonic chiptune music player. An arduino, a speaker and you're done! Play the presets or make your own.

License

Notifications You must be signed in to change notification settings

Gloix/arduitunes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduitunes

Poliphonic chiptune music player. An arduino, a speaker and you're done! Play the presets or make your own.

You will need

  • An arduino UNO board

    I haven't tested this on other arduino boards, but it is most unlikely to work, say, on a Mega since the program edits directly some registers that have different meanings depending on the board you're using.

  • A speaker or an audio jack connector

    If you choose to use a speaker, choose a little one, like a piezo speaker, one from old headphones, those you can take apart from toys, etc.

    If you want to play the music on your subwoofer, headphones, or other, you can use an audio jack connector, wich is basicly this stuff:

    chassis.gif
  • Some resistors

    One 330 Ω resistor for each voice, two 330 Ω resistors for current limiting on the leds and one resistor of at least 1 kΩ for volume limiting. You can use different but similar values of resistors if you want.

  • 2 potentiometers

    I reccomend 2 10kΩ pots.

  • Two leds

============

Setup

Speaker version

arduitunes_speaker.png




Audio jack connector version

arduitunes_jack.png


============

How to use

  1. Download the project (arduitunes.ino)
  2. Set things up in your protoboard. If you're using the audio jack connector, please, be sure to turn your speaker's volume and the volume potentiometer all the way down before connecting the arduino to the computer. This is to avoid blowing up your speakers
  3. Connect your arduino Uno and load the program
  4. (Gently) Adjust volume and... Enjoy the pokemon battle song theme!

Making your own music

In order to play musical notes, Arduitunes parses strings in real time. These strings must fit some protocol I came up with while programming. Directly writting the music into the program would be a pain in the bottom.

This is why I made an ugly but functional web app wich is a graphical user interface where you can make Arduitune-compatible tunes. This is what I used to create the song you just heard. Check it out! (I'm aware of my lack of web designing skills).

When you're ready editing your song, click "Generar". Go to Arduitunes.ino. In the beggining you'll see three preset tunes: Mario Bros, Pokemon Battle and Shingeki. To select a preset melody simply uncomment the whole thing. Make sure there's only one melody selected, i.e. comment the ones you're not using.

To play your custom made music, comment any uncommented melody, copy the code generated by the web app and paste it somewhere between the

/*##################### PRESET MELODYS ####################*/
and the
/*################### END PRESET MELODYS ##################*/
Compile, load to the arduino and enjoy.

The webpage's source is also available for editing. Feel free to make it prettier.

=============

This was made entirely for fun and for supporting my learning process. Please don't expect much.

Thanks for checking my arduino project!

About

Poliphonic chiptune music player. An arduino, a speaker and you're done! Play the presets or make your own.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published