Repository Public
1<!--2ORIX Sonata3File: Documentation/manual/library.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Library89The Library space is the catalogue of what a composition can use. Its content is read from10the same sources the compiler and the runtime use, so it cannot describe a parameter, a range11or a preset that does not exist.1213| Section | Source of truth |14|---|---|15| Instruments | `StandardLibrary/std/instruments.sonata`, the file embedded in the compiler: each named instrument binds an engine to one of its presets. |16| Engines | The runtime registry: model, synthesis method, playable range, articulations, parameters with units, ranges and defaults, presets. |17| Effects | The runtime registry: parameters, presets, default mix. |18| Patch nodes | The runtime registry: ports with units, ranges and defaults, output rate. |19| Examples | The `.sonata` files bundled with the application (the ones the tests compile). |20| Snippets | A short list written for this space; each one is compiled by the tests. |2122The counts in the toolbar are the real counts of these sources. A named instrument is a23binding of an engine and a preset, not a separate sound engine: the engines number is the24number of distinct synthesis models.2526## Search2728Type any words; an item matches when every word is found in its name, description, parameter29or preset names, or (for examples and snippets) its code.3031## Actions3233- **Insert** places the code where it belongs in the main source: a track at the end of the34 composition (adding `import std.instruments` when missing and choosing an unused track35 name), an instrument definition before the composition, an effect or a track snippet at the36 end of the last track. The result is compiled first; if the compiler reports more errors37 than before, **the source is left unchanged** and the code is copied to the clipboard38 instead. An insertion is one undo step.39- **Copy** puts the code on the clipboard.40- **Open a Copy** opens an example as a new document from a copy; the bundled file is never41 modified. An example that imports a module of its own folder says so: opened alone, that42 import cannot be resolved.4344Patch nodes can only be copied: they belong inside the `graph { }` of an instrument, which45this space does not edit (see the Instruments space).46