# Meter, key, tempo, and clef

## Opening settings and later changes

Set `meter`, `key`, and `tempo` in the score header. A setting stays in force
until another replaces it. For several changes, a compact map puts the
timeline together. The first unaddressed entry is the opening value; later
entries begin with their measure number.

```scorescript
scorescript 0.3
score "Changing meter" {
  meter {4/4, 2:3/4, 3:4/4}
  key {C, 3:G}
  tempo {Andante 80, 3:Allegro 120}
  parts { flute }
  flute { m1-3 { 4C5 D E F | 4G A B | 1C } }
}
```

An addressed block such as `at m2 { meter 3/4 }` states the same kind of
change. Inside a part, `[meter 3/4]`, `[key G]`, and `[tempo 120]` place
changes at a musical point. Score-wide changes should be stated once in the
score timeline, rather than repeated in every player's music.

`meter none` allows unmetered music. Compound meters such as `6/8` have their
own standard beam grouping. A key signature and the pitch-reading mode are
different settings; see [key-aware spelling](pitch.md).

## Tempo words and beat units

A tempo entry can contain a word, a metronome value, or both. Use quotes for
several words. An explicit metronome beat retains its printed unit:
`tempo 4.=88` gives dotted-quarter equals 88. `tempo 8=164` gives
eighth equals 164. Two note values instead of a metronome number express
metric modulation, such as `tempo 4=8` or `tempo 4=e.~s`.

```scorescript
scorescript 0.3
score "Compound pulse" {
  meter 6/8
  tempo 4.=88
  parts { flute }
  flute { m1 { 8C5 D E F G A } }
}
```

`*Andante` and `*"Molto Andante"` place tempo text above the music. A physical
line containing only tempo words is a preamble for the following musical row;
it does not create a silent measure.

```scorescript
*"Andante"
4C5 D E F
```

In a tempo map, prefix a direction with the comma down-mark to request
player-facing text below the staff, as in `tempo {80, 2:,"molto rit."}`.
Above-system directions remain visible to resting players; below directions
are omitted in a resting part.

## Clefs and instruments

Catalog instruments provide their normal clef. Use `clef bass`, `clef alto`,
or another supported clef where necessary, and `[clef bass]` for an inline
change. Numeric clefs `1` through `7` mean treble, soprano, mezzo-soprano,
alto, tenor, baritone, and bass respectively. An instrument change
is written `[instrument piccolo]`; inspect the resulting range and written
part when doubling instruments.

## Beams

Standard grouping follows the meter. An override such as `[beams 3+3+2/8]`
counts in eighths and fits a whole 4/4 measure. Without `/8`, the numbers
count in the current meter's denominator unit.

```scorescript
[beams 3+3+2/8] 8C5 D E F G A B C
```

`[beams none]` separates the notes; `[beams beat]` groups by beat;
`[beams standard]` restores the standard grouping. A custom grouping is
remembered for its meter when that meter returns. `standard` clears that
meter's remembered override.

## Rehearsal marks

**Default and recommended: boxed actual measure numbers, including inside
the measures themselves.** Choose the placement that suits your source:

| Placement | Source | Meaning |
| --- | --- | --- |
| Inside a continuous measure block | `... F \| [[5]] G ...` | A boxed 5 on the measure containing G |
| Inside an addressed measure | `m5: [[5]] 1G` | A boxed 5 on measure 5 |
| In a score-level map | `RH {5, 9, 13}` | Boxed 5, 9, and 13 at those measures across the score |

### Inside continuous measures

Place the box after the barline and before that measure's first note. It
takes no musical time and does not reset the inherited duration or octave.

```scorescript
scorescript 0.3
score "Measure-number landmarks" {
  meter 4/4
  piano {
    m1-16 {
      1C5 | D | E | F |
      [[5]] G | F | E | D |
      [[9]] C | D | E | F |
      [[13]] G | F | D | C
    }
  }
}
```

### Inside separately addressed measures

The same music and boxes can be written with explicit measure rows:

```scorescript
scorescript 0.3
score "Measure-number landmarks" {
  meter 4/4
  piano {
    m1-4 { 1C5 | D | E | F }
    m5: [[5]] 1G
    m6-8 { 1F | E | D }
    m9: [[9]] 1C
    m10-12 { 1D | E | F }
    m13: [[13]] 1G
    m14-16 { 1F | D | C }
  }
}
```

### In a map

These same landmarks can instead live in `RH {5, 9, 13}`. Each map entry
is both the address and displayed number; no repeated label or extra brackets
are needed. Include `1` only when an opening box is wanted:
`RH {1, 5, 9, 13}`. The equivalent inline opening is `m1: [[1]] 1C5`.

```scorescript
scorescript 0.3
score "Measure-number landmarks" {
  meter 4/4
  RH {5, 9, 13}
  piano {
    m1-16 {
      1C5 | D | E | F |
      G | F | E | D |
      C | D | E | F |
      G | F | D | C
    }
  }
}
```

An inline `[[5]]` is a **label on its containing measure**, not a jump to
measure 5 or an automatic current-measure placeholder. Keep that explicit
number aligned with its measure when inserting or renumbering bars.
The map is score-wide; an inline mark inside one part belongs to that part.
The three examples above are equivalent because they contain one part.

A custom boxed letter such as
`[[A]]` or `RH A`, and a circled `(A)`, are optional alternatives—not the
recommended default. In a map, `RH {5:[[A]], 9:(B)}` explicitly chooses
those alternate labels/shapes. Single `[A]` is a sounding pitch, not a box.

The default is manual placement: only requested marks are printed.
`rehearsal auto` is an optional, separate scheme that derives sequential
letter marks at structural seams; it is not needed for the recommended
numbered map. Written marks take precedence. Check the rendered rehearsal
sequence before extracting parts.
