Skip to Content

Shape Sounds With Code! 

Sometimes you might want to change the type of sound you use when creating or performing music.

You can change the characteristics of a sound with code.

Think about

How can we shape sounds or music with code? (coding ADSR)

Get Ready

[listen to how sound can be changed – video of ADSR changes]

Now let’s do this by coding and programming music. 

Get Started

Code the sound you want in Sonic Pi

Check out this video on shaping sound by coding ADSR:

1) Open Sonic Pi  [if the help section isn’t already open, click on “help”]

2) Try tutorial 2.4 “Duration with Envelopes”





3) Try tutorial 3.4 “Enveloped Samples”



Challenge: Can you make your music sound. . .

  • like a drum?
  • like a guitar?
  • like a bassline?
  • like something someone would rap over?
  • relaxing?
  • annoying?
  • like something you could dance to?
  • scary?
  • like it’s underwater?
  • like a robot?

 Go Further

Build your skills and learn more about shaping sound with code!

Share What you Learned

  1. Post sample code from Sonic Pi
  2. Explain what you learned about customizing sound or music by using Sonic Pi.