Lesson 1 of 12
Let the editor teach you
In VS Code, in an empty .lys file: type lesson, press Ctrl+Space and pick lesson-01-completion.
STEP 0 — SEE THE MUSIC. The score opens beside this file by itself and redraws as you type. Not there? Press Ctrl+K, release, then press V (or click the preview icon at the top right of this editor). Click the score, then ▶ to hear it.
Then these keys do most of the work:
Ctrl+Space lists what you can write there
Ctrl+Shift+Up / Down a note to the next note of the key
Ctrl+Shift+PageUp / PageDown a note an octave up / down
Each change sounds. Red circles in the score show where a step happens. Step done? Delete its @todo(…) (or Ctrl+. on it).
The lesson as it opens: the red rings mark where a step happens.
Steps
- STEP 1 — Ctrl+Space on the empty line below. Pick
key, theng, thenmajor. - STEP 2 — Ctrl+Space on the empty line below. Pick
instrument, thencello. The bass clef appears by itself, and the tune now sits high above it, on ledger lines: an instrument changes how the music is shown and played, never which notes you wrote. Step 3 brings the tune down to where a cello plays it. - STEP 3 — Put the caret on the first note, the ringed
e'. Ctrl+Shift+Up: it moves to the next note of the key (fis'in G major) and sounds; Ctrl+Shift+Down brings it back. Now Ctrl+Shift+PageDown: an octave down (e) — the notes after it follow, and the whole tune moves into the cello's staff. Press ▶. Then delete its@todo("STEP 3: …"): its red circle goes away. - STEP 4 — Replace
@todo("STEP 4")with@mf: delete it, type@with the caret on thee, and pickmffrom the list. Then, with the caret onmf, press Ctrl+Shift+Up: it becomesf. Ctrl+Shift+Down twice:mp. The same keys move a note, the key, the clef. - STEP 5 — Delete
r1@todo("STEP 5"), press Ctrl+Space there, pickCmaj7. On a cello it writes two of the chord's notes,<c e>: a bow sounds two strings at once. - STEP 6 — Change the line below to: form { |: ~A :| } — now it plays twice.
The whole lesson
// Lesson 1 of 12 — Let the editor teach you
//
// STEP 0 — SEE THE MUSIC. The score opens beside this file by itself and
// redraws as you type. Not there? Press Ctrl+K, release, then press V
// (or click the preview icon at the top right of this editor).
// Click the score, then ▶ to hear it.
//
// Then these keys do most of the work:
// Ctrl+Space lists what you can write there
// Ctrl+Shift+Up / Down a note to the next note of the key
// Ctrl+Shift+PageUp / PageDown a note an octave up / down
// Each change sounds. Red circles in the score show where a step happens.
// Step done? Delete its `@todo(…)` (or Ctrl+. on it).
title "Mary Had a Little Lamb"
composer "Traditional"
// STEP 1 — Ctrl+Space on the empty line below. Pick `key`, then `g`, then `major`.
part melody {
// STEP 2 — Ctrl+Space on the empty line below. Pick `instrument`, then `cello`.
// The bass clef appears by itself, and the tune now sits high above it, on ledger
// lines: an instrument changes how the music is shown and played, never which notes
// you wrote. Step 3 brings the tune down to where a cello plays it.
// STEP 3 — Put the caret on the first note, the ringed `e'`. Ctrl+Shift+Up: it moves to
// the next note of the key (`fis'` in G major) and sounds; Ctrl+Shift+Down brings it back.
// Now Ctrl+Shift+PageDown: an octave down (`e`) — the notes after it follow, and the
// whole tune moves into the cello's staff. Press ▶. Then delete its `@todo("STEP 3: …")`:
// its red circle goes away.
// STEP 4 — Replace `@todo("STEP 4")` with `@mf`: delete it, type `@` with the caret on the `e`,
// and pick `mf` from the list. Then, with the caret on `mf`, press Ctrl+Shift+Up: it
// becomes `f`. Ctrl+Shift+Down twice: `mp`. The same keys move a note, the key, the clef.
section A {
e'4@todo("STEP 3: Ctrl+Shift+Up, PgDn") d c d | e@todo("STEP 4") e e2 |
d4 d d2 | e4 g g2 |
e4 d c d | e e e e | d d e d | c1 |
// STEP 5 — Delete `r1@todo("STEP 5")`, press Ctrl+Space there, pick `Cmaj7`. On a cello it
// writes two of the chord's notes, `<c e>`: a bow sounds two strings at once.
r1@todo("STEP 5") |.
}
}
// STEP 6 — Change the line below to: form { |: ~A :| } — now it plays twice.
form { ~A }
score {
staff melody
}
// NEXT — type `lesson` on a new line and pick `lesson-02-notes`.