Making Music With Code TI-Nspire Student
Making Music With Code TI-Nspire Student
Making Music With Code TI-Nspire Student
Find the sheet music for a simple song and write a • TI Nspire CX family calculator
• TI-Innovator Hub
program to play the song on the TI-Innovator Hub.
• Unit-to-unit cable
Frequencies (in Hertz...Hz) are listed below the white keys and above the black keys. For example, A0 is equal to 27.5 Hz while A4 is equal to 440 Hz.
Notes start from A0 and go to C8 from left to right. Notice that as you move from left to right, each frequency for a note (B for example) roughly
doubles. B0 is 30.50 Hz while B1 is 61.74 Hz and B2 is 123.74 Hz and so on.
Beats per minute/Tempo Have you ever noticed how some songs are slow while others are fast? Every song has its own “tempo” or
speed. The speed is determined by the number of “beats per minute”. A slow song may have 50 beats per
minute while a faster song may have 100 beats per minute.
Quarter, half, and whole notes • Notes can be shorter or longer depending on the song. One way for a musician to write a song with
notes of different durations is to use whole notes, half notes, quarter notes, eighth notes, and
sixteenth notes.
• One whole note equals four quarter notes or two half notes. One half note is equal to two quarter
notes and so on.
• For a song that has 4-4 measures, it means that each measure of the song has 4 beats. A whole note
would be equal to 4 beats (hence, one measure).
• How many half notes could fit into a 4-4 measure? If you said two, you are correct! Since each half
note is equal to two beats and there are four total beats per measure, two half notes are equal to
four beats.
So now you can see how a song with 100 beats per minute will have faster whole notes than a song with 50
beats per minute! Not all whole notes equal the same time duration!
Application of notes and beats per Twinkle, Twinkle, Little Star is a song that has multiple notes and uses 4-4 time. Try to code this song with
minute your calculator.
Projects Challenges
Challenge 1: Create a program called “c1”. Set the speaker on the Hub to play a tone of 440 Hz. Try several different tones. What is the lowest tone
you can hear? What is the highest tone that you can hear?
Challenge 2: Create a program called “c2”. Make a door bell using any key press on the calculator to ring the chime.
Challenge 3: Write a program called “c3” that plays the Major C scale from C4 to C5. Each note should be played for a variable length of time using
a variable named “duration”.
Challenge 4: Create a program called “c4”. Make a metronome that: plays 10 beats with a tone of middle C4 with a duration of a ¼ note at 100
Beats per minute. To do this you will need to determine the how long a quarter note is (in seconds) based on the information above. A rest of .1
seconds should be used between beats.
Try a double time tempo of 200 BPM.
Try using a 1/2 or whole note.
*Use the file “88 Piano Keys” utility found in 88 Piano Keys.tns file or create tables to convert notes to duration and frequency.
Challenge 5: Create a program called “c5”. Use the sheet music for Twinkle to play the first two bars of the song on your Hub.
*Use the file “88 Piano Keys” utility found in 88 Piano Keys.tns file or create tables to convert notes to duration and frequency.
Challenge 6: Create a program called “c6”. Use two lists with frequencies and durations and a loop to play the same Twinkle song.
Final Challenge: Find the sheet music for a simple song and play it on the Hub.