Lesson 11 +10 XP

Notes with Numbers & Letters

Time to play actual notes - not just drums!

Play notes with numbers

note sets the pitch. Numbers are the simplest way:


strudel
note("48 52 55 59").sound("piano")

Try different numbers - even decimal ones like 55.5 for microtones.

Play notes with letters

You can also use letter names:


strudel
note("c e g b").sound("piano")

Try different letters (a - g). Can you find melodies that spell actual words? Hint: ☕ 😉 ⚪

Black keys with sharps and flats

Add flats (b) or sharps (#) to play the black keys:


strudel
note("db eb gb ab bb").sound("piano")

Play in different octaves

A number after the letter sets the octave:


strudel
note("c2 e3 g4 b5").sound("piano")

Try octaves from 1 to

8.

If the letter system feels tricky, numbers are easier. Most examples use numbers for that reason.

TL;DR

  • note("48 52 55 59") plays pitches by number.
  • note("c e g b") plays pitches by letter.
  • b = flat, # = sharp (black keys).
  • c2 e3 = letters plus octave numbers.