# Movements, exercises, and books

## Several movements in one file

Each movement has its own music and settings, an authored identity, and a
title. The outer `movements` block selects numbering style.

```scorescript
scorescript 0.3
score "Little suite" {
  movements roman {
    movement =prelude {
      number 1
      title "Prelude"
      meter 4/4
      parts { flute }
      flute { m1 { 1C5 } }
    }
    movement =dance {
      number 2
      title "Dance"
      meter 3/4
      parts { flute }
      flute { m1 { 4C5 D E } }
    }
  }
}
```

The movement IDs `prelude` and `dance` select movements independently of
their current display order. A single score can also use `movement-title`
for a heading; that alone does not create multiple movement programs.

```text
scorescript pdf suite.scorescript --movement dance -o dance.pdf
```

## Exercises as an index of existing music

An exercise gives an existing range a title and optional concert-key label.
It does not contain a duplicate copy of the music. Exercise collections and
their numbering/layout behavior are provisional.

```scorescript
scorescript 0.3
score "Long tones" {
  exercises {
    exercise =tones {
      number 1
      title "Long tones"
      systems 2
      section m1-4 { concert C }
    }
  }
  parts { flute }
  flute { m1-4 { 1C5 | 1D | 1E | 1C } }
}
```

`systems 2` means two measures per system within this exercise, not two
systems in total. Several `section` lines create variants. A section may
omit its concert key for an unpitched or atonal exercise. `may-split` opts
out of the one-page rule. Numbering styles include `arabic`, `roman`,
`roman-lower`, `alpha`, and `alpha-lower`.

An exercise can specify `reading P5 { hn } as "at the 5th"` for selected
readers and `sticking "Pattern name"` for a declared rudiment. Use the
[shared passages](reuse.md) and [percussion](percussion.md) chapters for
those musical operations.

## Exercises that contain their music

An exercise can instead own a body, with local measure numbers starting at
m1. This is another supported arrangement, not a duplicate score to keep in
sync with a separate index.

```scorescript
scorescript 0.3
score "Practice set" {
  parts { fl tpt }
  exercise "Long Tones" =tones {
    fl5, tpt4 { m1-2 { 1F4 | E } }
  }
  exercise "Articulation" =articulation {
    fl5, tpt4 { m1-2 { 4C4 D E F | 1G } }
  }
}
```

The two exercises each start locally at m1. `exercises=top` converts
containers to an index and continuous timeline; `exercises=inline`
converts back. Plain formatting preserves the selected arrangement.

A [named range](reuse.md), such as `m1-16=primary { ... }`, is the compact
way to identify music for transposed reuse. A container is useful when an
exercise should be edited as its own locally numbered unit. An index describes
exercise divisions over an already numbered score. Choose the organization
you need instead of copying the notes into all three forms.

## Sections group exercises into a book

`sections` groups exercise identities, not instrument keys. Here `band-exercises`
contains `primary` and `articulation`; `flow-warm-ups` contains `divided`.

```scorescript
scorescript 0.3
score "Warm-up book" {
  book { }
  numbering per-section
  sections {
    band-exercises { primary, articulation }
    flow-warm-ups { divided }
  }
  exercises {
    1:"Primary" =primary,
    3:"Articulation" =articulation,
    5:"Divided" =divided
  }
  parts { fl tpt }
  fl5, tpt4 {
    m1-2 { 1F4 | E }
    m3-4 { 4C4 D E F | 1C }
    m5-6 { 1G4 | A }
  }
}
```

`numbering per-section` gives A1, A2, B1 here. `numbering continuous` gives
1, 2, 3 across the book instead. Section names supply headings such as
“Band Exercises.” The contents and exercise headings use the same numbering.

The inline arrangement places `exercise` containers inside
`section band-exercises { ... }`. Convert with
`exercises=inline,sections=inline`; reverse with both set to `top`.

Three meanings must not be confused: a book section groups exercises; an
exercise's `section m1-4 { concert C }` describes a variant's range; an
instrument section shares a line through [reader selection](reuse.md), such
as `fl5` addressing both declared flutes. They do not use the same declaration.

## Link an exercise from another file

The provisional linked-source form is:

```text
exercises {
  exercise from "studies.scorescript" =tones
}
```

The referenced file must declare `exercise =tones`. Paths are relative to
the file containing the reference, not the terminal's working directory.
This requires a filesystem-aware reader. A text-only compile endpoint cannot
fetch an arbitrary local path. The optional `concert` override on a linked
exercise is reserved in v0 and must not be relied on to transpose the pull.

## Book furniture

`book { cover, contents, folios, running-heads }` opts into the named pieces
of page furniture. A bare `book { }` requests all four. This is provisional
and concerns exported pages: it does not create another score container.
Check contents-page numbers against the actual final pagination.

```text
scorescript pdf studies.scorescript --book -o studies.pdf
```
