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 two of the songs that won!
These are just a couple of many student songs on the EarSketch website. Scroll down to see more.
Here is your challenge this year!
Weren't those songs awesome?
These were the Canadian grand prize winners from the Spring 2022 Your Voice is Power Competition.
These songs were composed entirely through code on the EarSketch platform using audio clips from recording artists.
You can check out their code at this link as well.
Are you ready to try out your coding skills to compose some awesome beats just like you just heard?
- Go to the Your Voice is Power homepage at www.yourvoiceispower.ca
- 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.
- Go to the EarSketch website. (Use Chrome or Firefox.)
- On the Homepage, select START CODING.
- Select Skip, where it offers the Quick Tour. We'll do that later!
- In the top right corner, select Create/Reset Account.
- Select Register a New Account from the drop-down menu.
- 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.
- Select CREATE ACCOUNT.
- Write down your username and password.
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.
- Select the Information icon in the top right of your screen (right next to the bell).
- Select Start Quick Tour.
After the quick tour, you will explore the workspace in more detail.
- Select the API open book to view the EarSketch API.
- 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.
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?
- Tempo is the speed of a given piece of music or the number of beats per minute.
What is a beat?
- 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
from earsketch import *
In your Quick Tour script (quick_tour.py) you will see the function setTempo().
- 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.
- 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:
- Starting tempo: Run and listen to the song at 120 BPM.
- 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?
- Raise the tempo: Set the tempo to 220 BPM. Run then play.
How did speeding up the song change the mood?
- Try a tempo number smaller than 45 or bigger than 220.
Every EarSketch script must include a setTempo() function with a number in the parentheses. This tells the computer how fast to play the music.