Expand description
The sound resolver: turns an instrument name (piano, strings, plugin:"Surge XT",
sf2:/path/gm.sf2) into a concrete sound, in the PRD’s order:
- an explicit source (
plugin:,sf2:,sfz:,ir:), - an alias from
<config>/sounds/aliases.toml([aliases] piano = "<id or source>"), - an installed or scanned sound whose name, id, or tags match.
General MIDI program names (gm:48) are left to the caller (ferraus-synth), which
gets Ok(None) when nothing here matches. Sounds come from the installed sounds folder,
--sound-path folders (CLAP/VST3 bundles, .sf2, .sfz libraries, impulse responses),
and the plugin scan cache.
Structs§
- Installed
Record - A record in
installed.json. - Resolved
- How a query was resolved.
- Sound
- One usable sound.
- Sounds
Env - Where the resolver and the sounds registry keep their files.
SoundsEnv::from_envuses the standard ferraus folders; tests build one on a temp dir.
Enums§
- Sound
Kind - Kind of sound source.
Functions§
- discover
- Every sound ferraus can use without a download: installed sounds (with their registry
tags),
sound_pathsfolders, and plugins in the scan cache. - discover_
files - Files (not plugins) under
root:.sf2,.sfz, and IR audio files. Samples inside a folder that holds.sfzfiles belong to that library and are not listed as IRs. - discover_
files_ with - Like
discover_files; withall_ir, every audio file outside SFZ libraries is an impulse response (used for installed IR packs). - discover_
folder - Everything in one folder: sound files plus plugins (probed in a host subprocess, cached).
- discover_
sounds discoverwith the standard ferraus folders and the default watchdog.- infer_
category - The category ferraus infers from a name, tags, or path text (first match wins in the order drums, keys, guitar, bass, strings, brass, winds, vocal, pad, synth, fx).
- read_
aliases [aliases]from<config>/sounds/aliases.toml.- read_
installed - resolve_
instrument resolve_soundwith the standard ferraus folders and the default watchdog: the entry point forrender --instrument <name>(passctx.globals.sound_paths).- resolve_
sound - Resolve an instrument (or IR) name.
Ok(None)when nothing matches, so callers can fall back to General MIDI names; an ambiguous name is an error listing candidates. - write_
aliases - write_
installed