Making music with Scratch Tutorial (Festive Edition)
Learn how to create festive music in Scratch.
Making music with Scratch:
The built-in music library in Scratch allows you to play music on your device through internal / external speakers or headphones.
To play a note we use the following command:
The built-in music library in Scratch allows you to play music on your device through internal / external speakers or headphones.
To play a note we use the following command:
Where 60 is the note (Middle C) and 0.5 is the duration.
Example
Try the following example:
Example
Try the following example:
Did you recognise the tune?
Music too slow?
By default, the tempo in Scratch is set to 60.bpm The most common tempo used in music is 120 bpm. To change the tempo, add the following block to the beginning of your code:
By default, the tempo in Scratch is set to 60.bpm The most common tempo used in music is 120 bpm. To change the tempo, add the following block to the beginning of your code:
Transcribing songs from sheet music
If we want to re-create our favourite songs in Scratch, we first need a basic understanding of sheet music.
Here’s a reminder of the most common notes used in a musical score:
The Treble Clef
If we want to re-create our favourite songs in Scratch, we first need a basic understanding of sheet music.
Here’s a reminder of the most common notes used in a musical score:
The Treble Clef
Below is the score for a very popular piece of music - Can you can guess what it is?
Answer: Grande Valse (You may know it as the ‘Nokia Ringtone’)
Did you notice the special # symbols at the start of the score. This shows that some of the notes are sharps. In this case, the sharp notes are:
F#, C#, and G#
In Scratch, sharp notes are selected by clicking on the ‘black notes’ in the drop-down keyboard:
Did you notice the special # symbols at the start of the score. This shows that some of the notes are sharps. In this case, the sharp notes are:
F#, C#, and G#
In Scratch, sharp notes are selected by clicking on the ‘black notes’ in the drop-down keyboard:
Below is the music score for the Nokia Ringtone (this time with notes underneath).
It’s all about the timing
If we look at the notes in a music score again, you will notice that they’re different shapes and colours. These different shapes and colours denote the timings. (See below)
Notice that some of the notes have a dot (or full stop) after them. For these notes, we need to multiply the duration by 1.5.
Below is the score again however, this time, with timings (duration).
Rests
Rests are natural pauses or breaks in a piece of music. Rests can be added to your code using the following command:
Rests are identified by the following symbols:
Challenge
- Create a program in Scratch to play the Nokia ringtone.
- Use a loop to repeat the ringtone 4 times (or forever if you want to be really annoying!)
- Modify your code so that it plays one of the classic Christmas songs below (Silent Night, Jingle Bells, We Wish You a Merry Christmas)
Resources
Sheet music:
Licence:
Unless otherwise specified, everything in this repository is covered by the following licence:
Making festive music with Scratch activity is licenced under a Creative Commons Attribution 4.0 International License.