Lesson 3 +10 XP

Your First Sounds

Your First Sounds

To make a sound, use the sound function with the name of a sound inside quotes.

The sound function

casio is one of many standard sounds. Try a few others:

Sounds to explore

You might hear a little pause the first time while a sound loads.

Pick a sample with :

A single sound can contain multiple samples (audio files). Select one by appending : and a number:

Try different sound / sample-number combinations. Not adding a number is the same as :0.

Sounds are patterns

A sound name is a value. Pass several names separated by spaces and Strudel plays them in sequence:

Notice how the currently playing sound is highlighted in the code and visualized below.

TL;DR

  • sound("name") plays a sound.
  • name:0, name:1, name:2 pick different samples.
  • :0 is the default if you don't write a number.
  • Spaces in the string make a sequence.