Rewrite the documentation and add runnable examples

- Bring the README up to date with editing, Apply, the model tags, validation
  codes, errors, limits, concurrency and development.
- Fix the typed-model link and wording in docs/opcodes.md.
- Add examples to the package documentation.
- Describe the regeneration steps for the registry, and the licence status of
  the Splendid Grand Piano fixture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 19:15:55 +00:00
co-authored by Claude Sonnet 5.5
parent e08f3a5d0b
commit 04419062f3
6 changed files with 248 additions and 18 deletions
+6 -2
View File
@@ -150,8 +150,12 @@ func TestOpcodeDoc(t *testing.T) {
var b strings.Builder
b.WriteString("# Opcodes\n\n" +
"Every opcode the library knows, from [sfzformat.com](https://sfzformat.com/)'s data. " +
"**Typed** opcodes are read into the [`Instrument`](../instrument.go) model; the rest are known, so the " +
"library validates them, and reads and writes them as text. This file is generated by `go test -update`.\n\n" +
"**Version** is the first SFZ version or player that has the opcode. " +
"**Typed** opcodes are read into the typed model, [`Instrument`](../model.go). " +
"The rest are known, so `Validate` checks their values against the type, range and options listed here, " +
"and the library reads and writes them as text.\n\n" +
"A name with N, X or Y in it stands for a number, as in `loccN`, and one with `*` for any name. " +
"This file is generated by `go test -update`.\n\n" +
"| Opcode | Version | Value | Typed |\n|---|---|---|---|\n")
for info := range KnownOpcodes() {
value := info.Type.String()