Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

CDNievas/playArduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play Arduino

Using an arduino and a buzzer to play differents songs with a tutorial to create yours!

Circuit

circuit

List of songs actually supported

  • Mario Main Theme and Underworld Theme
  • Christmas Song 1, 2 and 3
  • URSS Anthem
  • Evangelion Opening
Working on
  • Still Alive (needs fix)
  • Shooting Stars
  • Zelda
  • SAO II Opening 2
  • Darude - Sandstorm

How can I create songs?

Well its pretty easy, the system that uses to identify the notes is similar that the used by the composer of nokia 3000 series, so if a song is already do it there and you get the code of the composer you can translate it. For example

Composer representation

This are notes of the composer 16a4, 8#f5, 4- where:

  1. The first number represents the duration of the note, in the examples are 16, 8 and 4
  2. The letters represents the note: a and #f. In this case - represents the muted note
  3. The last number represents the scale to use for that note: 4 and 5
Arduino representation

So to translate it to the arduino we use a structure like this {NOTE,DURATION}

  • Duration: Is the same number that the composer uses, so {NOTE,16} and {NOTE,8}
  • Note: The note are constants that represents different frecuencies on Arduino and depends of the note, and the scale.

So all the constants starts with "NOTE_?" and ? represents the note and scale:

0 => Muted note
NOTE_A4 => Note A in scale 4
NOTE_AS4 => Note A# in scale 4
NOTE_B5 => Note B in scale 5

The scales are between [1,7], being 4 and 5 the most normal or "sweet"

Result of example

To finish the example...

16a4 => {NOTE_A4,16}
8#f5 => {NOTE_FS5,8}
4- => {0,4}

🎵❤️🎵 If you want to collab adding more songs please be free to do it! 🎵❤️🎵