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 the new code below the setTempo() function block.

Activity 1

  1. Find the purple fitMedia() block on the left side of the code editor.
  2. Drag the fitMedia() block to insert it below the setTempo block.
  3. 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.

Your code should now look something like this:

Make sure the function blocks and text are placed correctly.

  1. 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!

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.