Skip navigation
Coding the Sounds of Music (with TI-Nspire CXII Python)

Students will explore creating sounds and music with the TI-Innovator Hub while exploring introductory coding concepts and the science of speakers, microphones and human hearing.

Publisher: Texas Instruments Inc.

Område:  Datavetenskap  STEM

Labels  Kodning ,  Elektromagnetism ,  Frekvens ,  Programmering ,  Python ,  Sound ,  STEM ,  TI-Innovator

Coding the Sounds of Music

Students will code a Python program to play a song on the TI-Innnovator Hub.

Students will learn about music and the science concepts behind playing and hearing digital music.


Students will engage with the following concepts:

Science of sound and hearing

Science of speakers and microphones

Music concepts




Coding of sounds and musical notes 


Project Versions

See different versions of the project to fit your schedule.

[S] STEM and coding full version (~x hours of class time)  Copy-Paste links to make assignments)

[C] Coding focused version (~y hours of class time)  Copy-Paste links to make assignments)

[Q] Quick version (~1 hour of class time)   Copy-Paste links to make assignments)


Getting Ready

Download Student Files

Coding the Sounds of Music Student (download .tns file)

Student Handout: Coding the Sounds of Music (download .pdf file)

Python Syntax Quick Reference for Coding Music project (download .pdf file)


Doing the Project

Getting Started

1.[S][C][Q] Learn about the TI-Nspire CXII calculator (watch video ~6 min)

2.[S][C](optional) Write your first Python program on the TI-Nspire CXII (watch video ~12 min)


Interested in exploring more Python?

Check out the TI 10 Minutes of Code for Python lessons. (web link)


Coding the Sounds of Music

Getting Ready: Name that Tune (watch video ~11 min)

Science/Music Activity 1: How does a violin make sound? (watch video ~11 min)

Coding Challenge 1:  Coding Boop (watch video ~9 min)

(optional)  Explore More: How does a speaker work? (watch video ~16 min)

Coding Challenge 2: Range of human hearing (watch video ~11 min)

(optional)  Explore More: How does the human ear work? (watch video ~7 min)

(optional)  Explore More: How does a microphone work? (watch video ~ 10 min)

Science/Music Activity 2: The Metronome and Tempo (watch video ~10 min)

Coding Challenge 3: Calculating Tempo (watch video ~18 min)

Science/Music Activity 3: Duration of a Note (watch video ~8 min)

Coding Challenge 4: Coding Notes (watch video ~12 min)

Coding Challenge 5: Frequency of Notes (watch video ~11 min)

Coding Challenge 6: Reading Notes (watch video ~12 min)

Coding Challenge 7: Do-Re-Mi (watch video ~8 min)

Coding Challenge 8: Sound Effects (watch video ~5 min)

Science/Music Activity 4: Playing Twinkle (watch video ~4 min)

Coding Challenge 9: Coding Twinkle (watch video ~12 min)

(optional) Coding Challenge 10: Play it Again, Sam (watch video ~15 min)



All Teacher and Student files zipped (download .zip file)


Teacher Files 

Teacher TI-Nspire Files (with example solution programs)

Coding the Sounds of Music Teacher TI-Nspire (download .tns file)


Student Files

Coding the Sounds of Music  Student TI-Nspire (download .tns file)



Need project equipment

See equipment recommendations for remote and in-person projects (download .pdf file)


Borrow project equipment

Texas Instruments will lend you the technology - including a TI-Innovator HubTM and other materials for the project.

Fill out the request form at this link to begin work with the TI STEM Team.


Own project equipment

Here is information for budget requests and grant proposals.

Download a PDF listing the equipment needs for each TI-Innovator Hub Project  (download .pdf)

See a list of TI Instructional Product Dealers and request a quote  (web link)


See other projects at

Contact with questions or comments about the project.

Publisher specific license