Spice Up Your Mix

Reverb For The People!

Transcript

It's time to jump into the wonderful world of effects. Effects can completely change the way your song sounds so I'm sure you're gonna like them. Best of all they are easy to use in Sonic Pi. Here's a small melody I was working on earlier. I've added some drums to the mix as well. Okay, sounds pretty good but I want to make it sound even better with some effects! You use effects with the command with_fx. When I type that and hit spacebar I get a drop-down menu of all the effects in Sonic Pi. Looks pretty familiar right? I'm gonna use the :reverb effect here. It makes the sound feel like it's played in some larger space and the effect works when I wrap my melody or whatever I want to put inside it, inside a code block. so I'll start it with a do here and I will place an end here after the melody. Let's hear the result Well that sounds pretty good. You can give options to effects as well. Look into the help file of the effect to see the available options. Once again you can use the shortcut ctrl+i or look under the Fx tab in the help panel. And you can see all the options available. The option room: adjusts the size of the space where I play the sound and the value should be between 0 & 1. And the bigger the number, the bigger the space. I want it to sound pretty big so I'll use a value like 0.9. Okay let's hear it. Nice, sounds pretty cool and you can use the reverb: effect pretty much everywhere to make things sounds better. But watch out: if you use big room: values when you have a lot going on it can get really muddy and hard to make sense of what you have around there.

Do this
Test at least three different effects with your song! Don’t forget to check out the help files to see what kind of options the effects have and what they actually do.

with_fx :bitcrusher, bits: 9, sample_rate: 5000
  play 60
end
What is wrong with this code?

Educator notes

Not all effects have an obvious impact on the sound. Some learners might be confused by effects such as eq: or level: as they don’t affect the sound without options. Although it might start to sound old, the helpfiles really do have all the information you need. 

Here is a list of some effects that have an immediate effect on the sound!

:bitcrusher

:distortion

:echo

:flanger

:ixi_techno

:reverb

:panslicer


Effectception


About mix:

All the effects have a mix: option so it's worth taking a closer look into it. You can think of it as a balance between the original sound going into the effect and the effected sound. Take a look at the picture below. The top image shows mix: 0 or just the original sound and the bottom shows mix: 1 or just the effected sound. All the pictures are taken from the :slicer effect. If you look at the intermediate values you can see that the closer mix is to 0, the more of the original sound will be present and vice versa.

waveform picture of slicer effect with mix values 0, 0.25, 0.5 and 1

Do this
Place an effect inside another effect! What happens when you switch the effects around?

Look at the following code:

with_fx :reverb, room: 1 do
  with_fx :bitcrusher do
    play 72, release: 0.5
  end
end
In what order are the effects applied to play 72?

Educator notes

The order in which you place your effects plays a big role in the end result. The innermost effect is always applied first. The next effect is applied in addition to the previous effect. To really hear the compounding effect, try the following: Put a sound inside a bitcrusher fx and a reverb fx. Switch them around. When the bitcrusher is applied to the reverb the resulting sound will be very noisy.

Here is an example:

#bitcrusher before reverb
with_fx :reverb, room: 1 do
  with_fx :bitcrusher, bits: 6 do
    sample :elec_blip
    sleep 4
  end
end
#reverb before bitcrusher
with_fx :bitcrusher, bits: 6 do
  with_fx :reverb, room: 1 do
    sample :elec_blip
    sleep 4
  end
end