Course Level
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type

In this tutorial, students will learn how to navigate the EarSketch environment, and begin to use Python commands through the exploration of a song. Students are then invited to create their own song(s). After this tutorial, students will be able to use EarSketch's full curriculum and acquire deeper knowledge about Python and music composition and remixing.

This exercise is appropriate for high school-level AP CS Principles courses and well as CS0 courses at the collegiate level. This exercise is derived from a tutorial developed for the Hour of Code. It can be completed by following the instructions in the attached documents and working in the EarSketch environment (

EarSketch is a free and online learning environment. No prior knowledge in music or Python are necessary to teach this exercise. With EarSketch, students code in Python to place samples from a vast sound library into musical tracks, arrange them, and add effects.

The EarSketch team was awarded a 2017 NCWIT Engagement Excellence Award for this assignment. Learn more about the award at


The EarSketch web-based environment works best with Chrome, Safari, and Mozilla Firefox.

This is an individual exercise, but students are welcome to share their musical creations for feedback and discussions. You are welcome to join the Facebook EarSketch teachers group, to ask questions to other teachers about teaching with EarSketch and provide feedback.

To access more curriculum from EarSketch, visit Click Contact Us, and then select Request Access to Teacher Materials.

Engagement Highlights

This exercise makes Interdisciplinary Connections to engage students via music creation. The environment is both very personal and creative because students compose their own music with short sound clips from popular genres such as dubstep or hip hop. Students can select sounds from a library of over 4,000 samples, and they can add effects and modify parameters to really customize their music. In this way, this assignment allows for Student Choice, another key engagement practice. Students have shown great improvements in both content knowledge and interest in computer science from using EarSketch. This is especially true for students traditionally underrepresented in computing.

Computer Science Details

Programming Language

Material Format and Licensing Information

Creative Commons License