# Factory `.bddpreset` Library

Source-of-truth for the factory presets shipped with the Black Diamond Distortion installer.

The installer copies everything in this directory (recursively, `*.bddpreset` only) to the system-level factory location at install time:

| Platform | Install path |
|----------|--------------|
| macOS    | `/Library/Audio/Presets/Aspen Instruments/Black Diamond Distortion/` |
| Windows  | `%PROGRAMDATA%\Aspen Instruments\Black Diamond Distortion\` |
| Linux    | `/opt/Aspen Instruments/Black Diamond Distortion/` (system) or `~/.config/...` (user) |

The plugin reads this same path at runtime via `PluginAudioProcessor::getFactoryBDDPresetsDirectory()` and surfaces the contents as the "Factory" branch of the preset browser.

## How presets get here

Presets are authored in the plugin and saved to the **user** library at `~/Library/Audio/Presets/Aspen Instruments/Black Diamond Distortion/` (macOS sound-designer machine). When ready to ship, run:

```
scripts/promote_user_presets.sh --dry-run    # preview
scripts/promote_user_presets.sh              # mirror user library into /presets/
git status presets/                          # review
git add presets/ && git commit               # commit deliberately
```

The script mirrors the user library, skipping `Downloads/` (community-fetched presets — not ours to ship) and dotfiles. Anything in `/presets/` that isn't in the source is removed.

## Why this isn't in a separate repo

`.tfunc` was extracted to its own repo because it's reused across multiple plugins (BD Distortion, BD Filter, future synths). `.bddpreset` is plugin-specific by definition — it captures BDD's APVTS state and lane mixer config, which has no meaning in another plugin. Keeping the library in-repo keeps the iteration cost low; revisit if external sound designers contribute or paid expansion packs need independent release cadence.
