1
MAKE BEATS. LEARN CODE. PROMOTE EQUITY.
v3.1
2
CODE TO COMPETE
v3.1
{
}
3
How are music, computer science, �activism and entrepreneurship �pathways to promote racial equity?
Creating a Soundbank, Variables, & Tracks,
v3.1
Learn about Canadian and Indigenous history, focusing on the effects of colonization as well as racism today. ��
AGENDA
4
OBJECTIVE
MODULE 4 - CREATING A SOUNDBANK, VARIABLES, & TRACKS
v3.1
5
1. LAYERS OF MUSIC
v3.1
6
Watch this video on layering music
Afterwards, listen to Samian “Peuple Invincible”, as you listen list all the instruments/sounds (layers) that you hear in your Student Writing Activity Workbook, then compare notes as a class to see how many tracks you think were needed to create the song.
v3.1
BUILD YOUR VOCABULARY TO MAKE BEATS
7
Term | Definition |
| �A part of a song that is recorded separately as a musical clip and added to a piece of music. In a Digital Audio Workstation (DAW), tracks are arranged in rows and labeled with numbers.� |
TRACK
v3.1
8
2. CREATING SOUNDBANK & VARIABLES
v3.1
9
Follow the instructions on the slides or in your Student Coding Activity Workbook.
v3.1
10
Add a drum and a vocal sound to your #SOUNDBANK
Note: You can use comments to create sections in your #SOUNDBANK for each category of sound
For example:
#drums�#vocals
#strings
Etc.
v3.1
11
Do I have to write the whole sound name each time?
No! We can assign “nicknames” (VARIABLES) to selected sounds to make it easier to keep track of our favourite beats.
v3.1
BUILD YOUR VOCABULARY TO LEARN CODE
12
Term | Definition |
| �A unit of storage that creates a space in the computer’s memory to store data.� |
VARIABLE
#SOUNDBANK VARIABLES �drums = SAMIAN_PEUP_BEAT_FULL vocal1 = JWOLF_COTG_VOX_MISC_SHOUT |
v3.1
13
CREATE VARIABLES TO STORE YOUR SOUNDS
Follow the instructions on the slides or in your Student Coding Activity Workbook.
drums = SAMIAN_PEUP_BEAT_FULL
vocal1 = JWOLF_COTG_VOX_MISC_SHOUT
bass = TFLAMES_OC_BASS_CHOR
flute = SAMIAN_PEUP_THEME_FLUTE
strings = SAMIAN_PEUP_THEME_STRINGS_3
v3.1
14
YOUR FINISHED CODE WILL RESEMBLE THE FOLLOWING:
# description:
from earsketch import *
setTempo(120)
# SOUNDBANK
#drums
drums = SAMIAN_PEUP_BEAT_FULL
#vocals
vocal1 = JWOLF_COTG_VOX_MISC_SHOUT
#bass
bass = TFLAMES_OC_BASS_CHOR
#flute
flute = SAMIAN_PEUP_THEME_FLUTE
#strings
strings = SAMIAN_PEUP_THEME_STRINGS_3
v3.1
BUILD YOUR VOCABULARY TO LEARN CODE
15
Term | Definition |
| The function that adds audio clips to the DAW and uses four arguments/parameters - (sound clip, track, starting measure, and ending measure). |
fitMedia()
v3.1
BUILD YOUR VOCABULARY TO LEARN CODE
16
Term | Definition |
| �A piece of code that performs a task. fitMedia() setTempo() makeBeat()� |
FUNCTION
v3.1
17
CODE YOUR INTRO!
Follow the instructions on the slide or in your Coding Activity Workbook
5. Enter “1” as your Starting measure.
6. Enter “5” as your Ending measure.
7. Run and play your code to hear the song you are creating
8. Repeat this process for the remaining four sound clips using a different track number for each.
v3.1
18
YOUR FINISHED CODE WILL RESEMBLE THE FOLLOWING:
# description:
from earsketch import *
setTempo(120)
# SOUNDBANK
#drums
drums = SAMIAN_PEUP_BEAT_FULL
#vocals
vocal1 = JWOLF_COTG_VOX_MISC_SHOUT
#bass
bass = TFLAMES_OC_BASS_CHOR
v3.1
#flute
flute = SAMIAN_PEUP_THEME_FLUTE
#strings
strings = SAMIAN_PEUP_THEME_STRINGS_3
#intro
fitMedia(drums,1,1,5)
fitMedia(bass,2,1,5)
fitMedia(flute,3,1,5)
fitMedia(strings,4,1,5)
fitMedia(vocal1,5,1,5)
19
OPTIONAL BONUS CODING CHALLENGE
This is a tricky one. If you are new to coding you may want to come back to it later after you have mastered fitMedia().
The setEffect() function allows you to add effects such as echo, pitch change or volume changes to your tracks. For example:
(increases volume on track 2)
(decreases volume on track 3)
Extension B lists other functions you can try!
v3.1
20
Follow the instructions on the slides or in your Student Coding Activity Workbook.
v3.1
21
Activity 5: cont'd
v3.1
TIP: You can record a maximum of 8 measures.
At 120 bpm one measure is 2 seconds long.
22
v3.1
Activity 5: cont'd
23
v3.1
Activity 5: cont'd
24
v3.1
Activity 5: cont'd
25
3. CONSOLIDATION / REFLECTION
v3.1
In your Student Writing Activity Workbook, match these terms with their definitions:
26
v3.1
27
v3.1
In your Student Writing Activity Workbook, answer the following questions:
28
Optional Extensions
v3.1
29
v3.1
30
Bonus Skill | What You Will Learn | Link for Curriculum Resources |
Uploading sounds (adding lyrics, community sounds) | Go beyond the sounds in the sound browser. Upload a new sound, find a clip on FreeSound from community sounds, or record a new sound to add your voice to the song by singing or rapping. | |
setEffect() | Adjust track volume, fade sounds in or out, create echos, distort sounds, change the pitch, or add a reverb . | |
makeBeat() | Compose music note by note instead of at the measure level. This is great for drum beats. In music production, this approach is referred to as step sequencing. | |
Loops | Use loops to code repetition in your music more efficiently. |
v3.1
31
THANK YOU!
v3.1