Activity 3 - Add effects to your song
Effects in EarSketch
Effects allows the producer to alter the sound of the audio clip into its own unique sound. Similar to how we used fitMedia()
to add new audio clips, we must use the setEffect()
function to define specific effects for each audio clip. It is important to note that multiple effects can be placed on the same track. This allows for the producer to combine multiple effects together. Earsketch has many effects built-in. To reference all the effects, visit this link
and make sure Curriculum pane is selected in the navigation bar.
Before we start adding effects to our song, let’s breakdown the pieces of the two setEffect
functions:
track
: The track number to which the effect is applied to. Note: To apply an effect to the Master track, use 0 as the value for track. The master track is where all the audio is collectively played together. This is an easy way to apply an effect to all the sounds being processed.effectType
: The specific effect being usedeffectParameter
: The setting for the effect being usedeffectValue
: The value applied to the effectParameter
Add setEffect function to your song
Now that we are more familiar with using effects, let’s add an effect to our song.
- Find the
setEffect
function block. There are twosetEffect
block; choose the topmost one. Drag the block into the script below your existing code blocks. - We need to replace the parameters with our own values. Use the dropdown to replace
track
with 2 (or any number you wish). - Use the dropdown to see the various different effects that can be selected for the
effectType
parameter. Let’s select DELAY aseffectType
. - Now that we have chosen our
effectType
, we need aparameter
. Let’s select DELAY_FEEDBACK forparameter
. - For the final parameter, input a valid value. Since we have chosen DELAY_FEEDBACK, we must specify a number between -120.0 and -1.0. Example: Use -6.0 as your effect value for DELAY_FEEDBACK.
Your code should now look something like this: