HOW TO PLAY JINGLE BELLS MELODY ON THE ARDUINO

Samuel Adesola

Samuel Adesola

Bauchi, Bauchi

0 0
  • 0 Collaborators

Playing songs using a development such as the arduino is really an interesting projects among engineers and hobbyist. In this project I give a full step by step detailed explanation on how you can play the songs on the arduino using the jingle bells as a case study ...learn more

Project status: Under Development

Robotics, Artificial Intelligence, Graphics and Media

Code Samples [1]Links [1]

Overview / Usage

Making sound on the arduino is an interesting project, this con be accomplish using different modules and devices depending on your project and choices. In this project, we’ll be looking at the way you can make sound with a buzzer. Buzzer used by hobbyist come in two types: The active buzzer and the passive buzzer. For this project, we are going to be using a passive buzzer. This project is targeted playing songs on the arduino

Methodology / Approach

A passive buzzer requires an AC signal to make a sound. It is like an electromagnetic speaker, where a changing input signal produces the sound, rather than producing a tone automatically. Unlike the active buzzer that only requires a one-shot DC, the passive buzzer needs some technicality in producing note. Note that trying to use the passive buzzer without setting the output frequency will lead to production of no sound by the passive buzzer.

The Major Musical notes includes A, B, C, D, E, F, G. Each of these notes has its own frequency. These frequencies depend on the octave in which the note is played. The frequencies 440Hz and 880Hz both correspond to the musical note A, but one octave apart. The next higher A in the musical scale would have the frequency 1760Hz, twice 880Hz. In the western musical scale, there are 12 notes in every octave. These notes are evenly distributed (geometrically), so the next note above A, which is B flat, has frequency 440 × β where β is the twelfth root of two, or approximately 1.0595. The next note above B flat, which is B, has frequency 440 × β 2.

Some Notes frequencies are shown below. To play an octave higher, you simply multiply the current octave by 2

A 440

B flat 466

B 494

C 523

C sharp 554

D 587

D sharp 622

E 659

F 698

F sharp 740

G 784

A flat 831

A 880

The notes in jingle bells include:

NOTE_E5, NOTE_E5, NOTE_E5,NOTE_E5, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_G5, NOTE_C5,NOTE_D5, NOTE_E5,

NOTE_F5, NOTE_F5, NOTE_F5,NOTE_F5, NOTE_F5, NOTE_E5,NOTE_E5, NOTE_E5,NOTE_E5, NOTE_D5, NOTE_D5,NOTE_E5, NOTE_D5, NOTE_G5,

NOTE_E5, NOTE_E5, NOTE_E5,NOTE_E5, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_G5, NOTE_C5,NOTE_D5, NOTE_E5,

NOTE_F5, NOTE_F5, NOTE_F5,NOTE_F5, NOTE_F5, NOTE_E5,NOTE_E5, NOTE_E5,NOTE_G5, NOTE_G5, NOTE_F5,NOTE_D5, NOTE_C5

Each of these notes has its own frequency. On arduino, you can simply include the pitches library to use these pitches as it is written above without having to look for their frequencies. Check the code

What will I need?

Arduino

Passive Buzzer (1)

Jumper Wires

Technologies Used

Arduino

Repository

https://github.com/adesolasamuel/Arduino-Development/blob/main/jinglebells.ino

Comments (0)