Code a Song

Is learning to code a critical skill for everyone? Why or why not?


Using EarSketch, you'll learn a little Python programming while you code a song.

  • Open EarSketch & delete the code there.
  • Open samplemusic.txt, select all the code (Ctrl+A) and copy (Ctrl+C)
  • Go back to EarSketch and paste the code (Ctrl+V)
  • Click Run (you will need to click Run every time you make a change to the code)
  • Click play button and listen to your beautiful music
  • Try replacing an instrument for the variable synth1. Delete TECHNO_SYNTHPLUCK_001 and paste in new instrument, eg. synth1 = HOUSE_ACOUSTIC_PIANO_004
  • Try creating a new variable.

Learning goals:

  • Syntax of coding
  • Using variables