# commonsmusic.piece/1

The browser and the print engine read the same piece file. The print engine lives in a separate tree and is not imported here. Drop a new file in `pieces/` and add its name to `pieces/index.json`.

A tick is named by `tick`. `ticks_per_bar` is 0 when the piece is grouped by `phrase_at` instead of meter bars.

```json
{
  "schema": "commonsmusic.piece/1",
  "id": "kebab-name",
  "title": "Title",
  "composer": "Name",
  "year": 1818,
  "meter": "6/8",
  "key": "C",
  "ticks_per_bar": 24,
  "tick": "32nd",
  "keyboard": "white keys from C4 to C6",
  "pd_basis": "Why this melody may be engraved.",
  "source": "https://the-page-that-was-actually-read",
  "edition": "Original engraving. CC0.",
  "phrases": ["line under a pair of bars"],
  "notes": [{"n": "G4", "d": 6, "syl": "Si"}]
}
```

Rules the player enforces:

- `n` is a natural note from C4 through C6. No sharps or flats.
- `d` is a positive number of ticks.
- When `ticks_per_bar` is greater than 0, the notes partition into bars of that length.
- The site does not load images of someone else's score.
- A piece with no `pd_basis` or no `source` is not linked.
