Skip to Content

Action: Intro to Earsketch

Activity 2: Intro to Coding! (10 minutes)

It is possible to be both a programmer and a rock star. So, let's get started coding and composing. You will be using a platform called EarSketch to get started on this journey.

What is EarSketch? What is code?

In the past few years, students have remixed the songs of current music artists! This year, you can remix songs from an Indigenous artist, plus many more! 

To get an idea of what you'll create, let's listen to one of the songs that won!

This is just one of many student songs on the EarSketch website. Scroll down to see more.

Here is your challenge this year!

Wasn't that song awesome? This was the Canadian grand prize winner from the 2021 Your Voice is Power Competition. The song was composed entirely through code on the EarSketch platform using audio clips from recording artists.

You can check out the code here.

To display the code on SoundCloud, do one of the following:

  1. On the SoundCloud page for Jasmine’s winning song, select Show more in the description section.

Are you ready to try out your coding skills to compose some awesome beats just like you just heard?

NEXT STEPS:

  1. Go to the Your Voice is Power homepage at www.yourvoiceispower.ca
  2. Select the Introduction Video on the homepage to learn about the program.

Extension B provides an optional unplugged introduction for coding if you choose.

Activity 3: Creating an Account (5 minutes)

Hopefully, you are inspired by listening to some great songs created by students just like you. An EarSketch account allows you to log in from any computer and always access your code. All your work is automatically saved in EarSketch. 

Follow these directions to create your account; if you already have an account, please login.

NEXT STEPS: 

  1. Go to the EarSketch website. (Use Chrome or Firefox.)
  2. On the Homepage, select START CODING.
  3. Select Skip, where it offers the Quick Tour. We'll do that later!
  4. In the top right corner, select Create/Reset Account.
  5. Select Register a New Account from the drop-down menu.
  6. Choose a username and password.
    You have the option to enter an email address. Email addresses are used to retrieve passwords. If you have a school email address, use it.
  7. Select CREATE ACCOUNT
  8. Write down your username and password.
Screenshoot of Earsketch website, with the "create account" form open

Activity 4: EarSketch DAW (20 minutes)

You will learn all about the connections between code and music, and as you explore EarSketch, you will learn more. 

EarSketch is a Digital Audio Workstation (DAW) with special tools that allow audio clips to be placed on a timeline using code. 

  • A DAW is often the main tool for producing music on a computer.
  • Most recording studios use a DAW. 
  • A DAW is specialized computer software for recording, editing, and playing digital audio files. 
  • Musicians use DAW Pro Tools in their studios. 
  • You may have heard of Garage Band or Logic Pro. These are examples of other DAWs.

Extension C provides an optional video called Producing from Your Laptop which shows how a top music producer uses a DAW and his laptop to mix and record songs from some of the most popular musical artists.

Optional Video: Audio Engineering and DAWs with Oji-Cree Producer CJAY GRiZ

Quick Tour of the EarSketch DAW

A laptop is a pretty powerful tool to produce music. Let's look at the EarSketch DAW and see how you can apply your creativity to be the next great music producer.

NEXT STEPS:

  1. Select the gear icon in the top right of your screen (right next to the bell).
  2. Select Start Quick Tour
    After the quick tour, you will explore the workspace in more detail.
  3. Select the API open book to view the EarSketch API. 
  4. In addition to the API folder, if you need any help coding in EarSketch, you can select the Curriculum tab on the right of the code editor. The Curriculum tab will open the curriculum where you search by topic to watch videos and tutorials on EarSketch content.
Screenshot of Earsketch website, showing the API button in the top left corner, and the curriculum icon in the top right corner.

Activity 5: Let's Play with Tempo (10 minutes)

While we are here with the script in the Quick Tour, let's do some playing with an important function called setTempo()

We will experiment with it first; then we'll briefly explain what functions are and how we will use them throughout Your Voice Is Power! In the next module, we'll dive more deeply into functions. Then, in a later module, you will write your own function! That's real coding!

What is tempo?

  1. Tempo is the speed of a given piece of music or the number of beats per minute. 

What is a beat?

  1. A beat is the basic unit of musical time. Beats give your song rhythm and let you move and dance to the feel of the music! The faster the beat, the higher the tempo!  Slower beats have a slower tempo. Beats and tempo determine the mood of a song! 

Extension D provides an optional unplugged tempo activity.

Watch the video: Set Your Own Tempo with Oji-Cree Producer CJAY GRiZ

Different music genres often have different tempo ranges.

Hip-Hop: 85-95 bpm

Pop: 118 bpm

Techno: 120-125 bpm

Electro: 128 bpm

House: 115-130 bpm

Dubstep and Trap: 140 bpm

Drum & Bass: 160-180 bpm

Code Your Own Tempo

init( )

setTempo(120)

In your Quick Tour script (quick_tour.py) you will see the function setTempo(). 

  1. setTempo() is an example of a function with a parameter. You will see the number 120 in parentheses after the setTempo() function. This tells the computer the number of beats per minute.  
  2. Every EarSketch script opens with a baseline tempo of 120 beats per minute—a fast walk or marching speed, but you can set a tempo anywhere between 45-220 BPM.

Explore different tempos:

  1. Starting tempo: Run and listen to the song at 120 BPM. 
  2. Lower your tempo: Click or tap inside the setTempo() parentheses and set your tempo in EarSketch to 45 BPM.  Run then play.
    How did slowing down the song change the mood?
  3. Raise the tempo: Set the tempo to 220 BPM.  Run then play.
    How did speeding up the song change the mood?
  4. Try a tempo number smaller than 45 or bigger than 220.
    What happened?

Every EarSketch script must include a setTempo() function with a number in the parentheses. This tells the computer how fast to play the music.