Activity 1 - Set tempo & add sounds
Let’s take a closer look at the pre-existing code and understand what it means.
The setTempo()
function allows you to set the overall project tempo. Tempo is the speed at which a piece of music is played. Changing a project’s tempo allows for different styles of music to be created. Try changing the tempo of your setTempo
function by changing the number in the block and see what happens! Please make sure it is a number between 45-220. Below are some suggestions for tempos you can use.
Now that our tempo is set, it is time to add sounds. To do so, we must utilize the fitMedia()
function. We will be placing new code below the setTempo()
function block.
Activity 1
- Find the purple
fitMedia()
block on the left side of the code editor. - Drag the
fitMedia()
block to insert it below thesetTempo
block. - You may notice that when the block is added, Earsketch produces some placeholder texts that we will need to replaced later. These placeholder texts are also known as
parameters
.
We will be replacing each of these texts with a valid value.
sound
- Navigate to the “Sounds” pane and find a sound you like. Click on “sound” in thefitMedia()
function block, then press the “Paste” button beside the sound you wish to add. The name of the sound should now appear inside of thefitMedia()
block.trackNumber
- Use the dropdown to select any positive integer as the track number. For this example, select1
.start/end
- These parameters are positive integers quantified in measures. A measure is a segment of time which correlates to a specific number of beats. Try settingstart
to1
andend
to9
.
Your code should now look something like this:
Make sure the function blocks and text are placed correctly.
Once you have input your own parameters, press run, then click on play to listen to your audio clip!
- If you see any red text, you have encountered some errors! Please ask for help. The
fitMedia()
function is the backbone to making music in Earsketch. We will be using this function a lot, so if you have any questions regarding its usage, please ask!
- If you see any red text, you have encountered some errors! Please ask for help. The
The Digital Audio Workstation (DAW) is the area which the sounds appear in. It is at the center top of your EarSketch window. The following is an example of how different sections of a song may look in the DAW.