Skip to content

Chapter 1 — Scales & Keys

Chapter 0 modeled pitch as integers mod 12. A scale is simply a subset of those 12 classes, selected by a fixed interval pattern — like a bitmask over the chromatic alphabet. A key then pins that subset to an absolute starting offset. Get these two ideas and chord progressions in Chapter 2 become trivial coordinate transforms.

A scale is a chosen subset

Of the 12 available pitch classes, most music uses only 7 at a time. Which 7, and the order of gaps between them, is the scale.

Scale

A scale is an ordered subset of the 12 pitch classes, defined by an interval pattern that repeats every octave. Picking a scale is like choosing the legal symbols for a melody: notes inside it sound "in", notes outside sound "out". The most common pop scale is the major scale.

Major / minor

Major and minor are the two dominant scale flavors (modes) in pop. Major uses the step pattern 2-2-1-2-2-2-1 semitones and reads as bright/happy; minor rearranges the gaps and reads as dark/sad. They are not different note sets so much as different gap orderings from a chosen home.

Major scaleC major scale: the do-re-mi pattern
A scale is a subset of the 12 semitones, chosen by a fixed interval pattern. The major scale takes steps of 2-2-1-2-2-2-1 semitones. Starting on C uses only white keys: C D E F G A B C.
scalemajorWhole-whole-half-whole-whole-whole-half: the interval pattern that defines "major".

The do-re-mi syllables are positional labels, not pitches. "Do" is wherever the scale starts; the pattern of whole and half steps is what your ear recognizes as "major", regardless of starting note.

Minor: same notes, different home

A striking consequence of the subset model: two scales can contain the identical 7 pitch classes yet feel completely different, purely because a different note is treated as home.

Relative minor

The relative minor of a major scale is the minor scale built from the same 7 notes, starting on the 6th degree. C major and A minor share all white keys; only the tonal center differs. They are the same set with a different distinguished element.

Minor scaleA natural minor: same notes, darker home
Start the same white keys on A and the mood turns melancholic: A B C D E F G A. This is the natural minor scale, the "relative minor" of C major. Which note feels like home changes everything.
scaleminorA minor uses the same white keys as C major, but the home note is A.

Computationally, switching C major to A minor changes no pitch classes at all — it only relabels which class is "degree 1". The emotional shift comes entirely from where the music resolves.

Scale degrees: relative coordinates

Naming notes absolutely (C, D, E…) couples a melody to one key. Music theory avoids that coupling by numbering the scale notes.

Scale degree

A scale degree is the index of a note within its scale, written 1 through 7 (degree 1 is the home note). Degrees are relative coordinates: "degree 5" means the fifth scale note whatever the key. This is the key-independent address space all chord and progression notation is built on.

DegreesScale degrees: relative coordinates
Instead of absolute note names, music theory numbers the scale notes 1 through 7 (degrees). "Degree 5 of C major" is G; "degree 5 of D major" is A. All chord progression notation (I, IV, V...) builds on this relative system.
degreeNumbering scale notes 1-7 gives a key-independent coordinate system.

Think of degrees as logical addresses and actual MIDI numbers as physical addresses. The Roman numerals (I, IV, V) you will meet in Chapter 2 are degree-based, which is exactly why a progression can be transposed to any key by changing one offset.

Key: the starting offset

The scale gives you a shape; the key chooses where on the 12-step number line that shape begins.

Key (tonic)

A key names the scale plus its home pitch, called the tonic — the note that feels like rest, degree 1. Choosing a key is choosing an additive offset: the same degree pattern starting on C versus G yields the same tune transposed up. In MidiSketch the key field is that offset, 011.

KeyThe same phrase in C and in G
The key names which note is "home" (degree 1). The same melodic shape starting from C and from G sounds like the same tune at a different height. In MidiSketch, `key: 0` is C and `key: 7` is G — just a transposition offset.
keyChanging the key shifts every note by the same offset — the shape is identical.

This is pure transposition: every pitch shifts by the same number of semitones (C → G is +7), so the melodic shape is byte-for-byte identical in degree space. Change key and nothing about the structure of your song changes — only its absolute height.

Intervals: distance between notes

The last primitive before chords is the gap between two notes, measured in scale steps.

Interval

An interval is the distance between two pitches. Counted in scale steps it gives names like second, third, fifth; counted in semitones it gives an exact integer. The third (skip one scale note) is the building block of pop harmony.

IntervalsStacked thirds: the seed of chords
An interval is the distance between two notes. The third (skip one scale note) is the friendliest interval in pop harmony. Play these pairs and notice they already sound "musical" — triads in the next chapter are just two thirds stacked.
interval3rdTwo scale notes a third apart already sound harmonic — chords stack more of these.

Notice each pair already sounds consonant on its own. Stacking thirds is the recipe for chords: in Chapter 2 a triad is nothing more than two thirds piled on a root — the harmonic primitive falls straight out of this interval.

Common pitfall — mood needs moodExplicit

Setting mood alone often appears to do nothing: by default the engine treats it as a hint and may override it. To make a mood value apply exactly, also set moodExplicit: true. (key, by contrast, always applies.)

MidiSketch mapping

ConceptConfig fieldRange / notes
Scale and tonickey011; selects which pitch class is degree 1 (0 = C major home, 7 = G)
Scale degree numbering(notation)Basis of Roman-numeral progressions — see Chapter 2 and Harmony

Continue with Chapter 2 — Chords & Triads.