0% found this document useful (0 votes)
28 views11 pages

5.3 Activity Guide

The Student Activity Guide outlines a coding activity using EarSketch to create song structures with custom functions. Students are instructed to fill out a Song Structure Plan, build their song using custom functions, and adjust parameters accordingly. The guide includes detailed steps for planning, coding, and finalizing their music project, along with helpful resources and a checklist for completion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views11 pages

5.3 Activity Guide

The Student Activity Guide outlines a coding activity using EarSketch to create song structures with custom functions. Students are instructed to fill out a Song Structure Plan, build their song using custom functions, and adjust parameters accordingly. The guide includes detailed steps for planning, coding, and finalizing their music project, along with helpful resources and a checklist for completion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Student activity guide

STEP 1: PREVIEW YOUR MISSION


In today’s coding activity, use custom functions to create different song structures in EarSketch.

Instructions Mission Checklist


Using what we just learned, we’ll do the ❏ I planned my song using the Song
following to complete our program: Structure Plan worksheet
❏ I used custom functions to create my
1. Fill out the Song Structure Plan
song structure
Worksheet to help us map out our
❏ I updated the start and end
song.
2. Call custom functions to build our parameters to reflect my song plan
song. ❏ I experimented with my song structure
3. Update the start and end parameters and order

in our custom functions to reflect our


song plan.

STEP 2: READY, SET…Go!


Fill out the Song Structure Plan Worksheet to map out your song, then use custom functions to
build a new song structure.

A — Open Your EarSketch Account


1. Go to EarSketch.gatech.edu.
2. Click “Start Coding”
3. Login to your EarSketch Account.
4. Go to “Scripts” and open: Song5.py

Your script should now be open in your Code Editor.

B — Plan Your Song


Let’s look at our Song5 Plan. Review and update the start and end measures for your intro section
if necessary:
2 Student Activity Guide

A. In Column A, write down each of your music sections in the order that you want. Don’t
forget to repeat sections to lengthen your song!
B. In Column B, write down the number of measures you want your section to be.
C. In Column C, write down what measure number you want the section to start on.
a. Tip: Start with 1 for your first section. For the remaining sections, always use the
same number as the previous section’s end measure (Column D).
D. In Column D, write down what measure number you want the section to end on.
a. Tip: To find your end measure, simply add the numbers in Column B and Column
C.

C — Review Your Code


Before diving into our code, let’s review our code so far!

You added your starting comments at the start of your script. You updated the text in brackets
[ ] with your details. Remember: Comments start with # and will not affect our program. Make
sure to review and update your # message comment. You can always keep updating this as you
build out your song and message(s)!

You added a comment to mark the start of your Setup section. You included your import
statement and setTempo() function in this section. Remember: Every EarSketch script needs to
include these.

LESSON 5.3 | stories in music


3 Student Activity Guide

You added a comment to mark the start of your print statements. You reviewed and modified
your print statements to reflect the message of your song. You reviewed or modified the
comments that explain your code.

You added comments to mark the start of your Soundbank. You organized your Soundbank for
each type of musical layer (beats, bass, melody, harmony, effects).

D — BUILD YOUR SOUNDBANK


Now, it’s time to keep finding and adding sounds!

1. Search for sounds in the EarSketch Sound Library.

Remember to use the vocals filter to help you find sounds that include vocal lines!

LESSON 5.3 | stories in music


4 Student Activity Guide

2. Once you find a sound you like, add it to your Soundbank.

3. Repeat steps 1-2 to add at least 2 sounds to your Soundbank.


a. Make sure you add at least one vocal clip to use in your intro!
4. Add comments underneath each vocal sound you added to help you remember the
lyrics.

When you have all your sounds, it’s time to assign them to variables. Let’s review how to assign
your sounds to variable names!

LESSON 5.3 | stories in music


5 Student Activity Guide

5. Assign variable names to your sounds in your Soundbank.

E — Review your music section


Now, let’s review our Music section. Earlier, you added comments to mark the start of your Music
section and for each section of your song: intro, verse, chorus, bridge, and outro.

You also defined a custom function for your intro section using fitMedia() functions and
variables.

Then, you added a comment to mark the space where you will call your functions.

You called your intro() function and set the start and end measures according to your Song5
Plan.

LESSON 5.3 | stories in music


6 Student Activity Guide

F — Add Your Intro


Now, let’s continue adding sounds to our intro section:
1. Update your intro section comments to show your start and end measures according to
your song structure plan.
2. Then, add at least 2 sounds to your intro section using the fitMedia() function and
variables (instead of sounds). Type:
fitMedia(sound,track,start,end)
Make sure to include at least one vocal clip!

3. Review your track parameters and make sure each sound has a different track number.

G — Define and Call your Intro Function


Next, let’s define and call our custom function for our intro section.

1. Review your custom function for your intro section. Type:


def intro(start,end):
2. Then, indent each of the fitMedia() lines that are part of your intro section.

LESSON 5.3 | stories in music


7 Student Activity Guide

If you want your sounds to start and end on different measures, you can use “hard-coded”
functions.

3. Call the function for your intro section. Type:


intro(start,end)
4. Be sure to update the start and end measures based on your Song5 Plan.

If you defined a hard-coded function earlier, here’s how we can use it:

When you’re finished, your code should look something like this:

# STARTING COMMENTS
# title: [a title]
# author: [your name]
# description: [a descriptive note]
# message: [a mood or message I will try to convey in my song]
# SETUP
from earsketch import *
setTempo(120)
# PRINT STATEMENTS

LESSON 5.3 | stories in music


8 Student Activity Guide

print("I’m getting started with my Song5 intro today!")


# This line is going to print a sentence to my console window.

# MY SOUNDBANK
# This is where I will keep my variable ‘nicknames’ for my sounds

# vocals
vox1 = RBIRD_VOX_BANGING_THE_DRUM
# I'm still marching along banging the drum in the big parade
# beats

# bass
bass1 = YG_TECHNO_SYNTH_BASS_1
bass2 = YG_TECHNO_SYNTH_BASS_2
# melody

# harmony

# effects
sfx1 = HOUSE_BREAKBEAT_018
sfx2 = CIARA_HWR_PERC_SIZZLE
# MUSIC
# This is a song where I use vocals to tell a story
# intro (starts M1, ends M5):
def intro(start, end):
fitMedia(vox1, 1, start, end)
fitMedia(bass1, 2, start, end)
fitMedia(bass2, 3, start, end)
fitMedia(sfx1, 4, start, end)
fitMedia(sfx2, 5, start, end)
# verse-section-A:

# chorus-section-B:

# bridge-section-C:

# outro:

# volume-adjustments:

LESSON 5.3 | stories in music


9 Student Activity Guide

setEffect(1, VOLUME, GAIN, -18)


setEffect(4, VOLUME, GAIN, -10)
setEffect(5, VOLUME, GAIN, 1)

# CALLING FUNCTIONS:
intro(1,5)
# END

H — ADJUST VOLUME AND TEMPO


Remember to set a unique tempo for your song using the setTempo() function. Let’s review:

A. Try setting a slower or faster tempo


● Reminder: EarSketch lets you choose any tempo between 45 to 220 beats per
minute.
○ Standard: 120 BPM
○ Slow: 45 BPM
○ Fast: 220 BPM
B. Run and play your song.

If you want to experiment with adjusting volume on one or more of your sounds in your song,
review the steps below:

A. Add comments to mark the start of the volume adjustment section.


B. Use the setEffect() function to adjust the volume of a track. Type:
setEffect(track, VOLUME, GAIN, value)
C. Change the track parameter to the number of the track you’d like to adjust the volume
of.
D. Change the value parameter to adjust the volume. Remember:
a. Positive numbers (0-12) make the volume of the track louder
b. Negative numbers (-60-0) make the volume of the track quieter
Keep running, playing and experimenting to select the volume change you want to make!

i — Run and Play your Music


Now, it’s time to run and play your song!
1. Click the “Run” button to execute your code.
○ Pressing RUN tells the computer to execute your code, which causes your music to
appear in the DAW.
2. Watch the console to check for bugs or print statements!
○ If you receive any error messages, review your code to debug your error!

LESSON 5.3 | stories in music


10 Student Activity Guide

3. Finally, click the green play button to play your music!

J — FINALIZE YOUR PROJECT


Before completing your project, did you:

K — review your checklist


❏ I added at least two sounds to my Soundbank and assigned them to variables.

❏ I added at least two sounds to my intro section using fitMedia() functions and
variables.

❏ I defined and called a custom function for my intro section.

LESSON 5.3 | stories in music


11 Student Activity Guide

❏ I created a new intro section for my Song5 using at least one vocals clip.

If you need help while working on your activity, you


Need Help?
can watch the video walkthrough by clicking the
button here. Pause the video at any time and
return to your activity to try out each step for
yourself!

Appendix: VOCABULARY
Find this lesson's vocabulary below.

n/a

Appendix: Helpful Links


Use the links in this section if you are stuck or simply want to know more about a concept.

Project Links Additional Links


● EarSketch ● n/a
● Song Structure Plan Worksheet
● Coding Activity Walkthrough Video

My cse3 journal
Extra space for notes, thoughts, and other things!

Notes

LESSON 5.3 | stories in music

You might also like