Create a theme
1
Copy a built-in theme
audx/themes/brand.json with every sound from mechanical. Without --from, it copies your current theme. Pass --overwrite to replace an existing file.2
Edit the sounds
Open the file and change any sound. The file points at the theme JSON schema in See Designing sounds for how definitions work.
node_modules, so your editor autocompletes and validates every field.audx/themes/brand.json
3
Apply it
audx.json now points at it. Run the same command again after each edit.theme leaves that file unchanged and prints a warning.
Share a theme
A theme can be loaded from any URL that serves the JSON:--theme flag accepts a built-in theme name, a URL, or a path to a .json file, on every command that takes it.
Load a theme at runtime
You don’t have to generate files from a theme.loadPatch and usePatch load a theme JSON in the browser and play sounds by name:
usePatch returns an empty, silent patch with ready: false while the file loads. Its play respects <SoundProvider> and reduced motion.
Theme file format
The published schema is at
https://audx.site/schemas/theme.schema.json.