✅ **Here’s the exact process** to add any new multi-sample instrument (Piano, Violin, whatever).

### Step-by-step (takes ~2 minutes once your WAVs are ready)

1. Create the folder with wavs.
`Synthonico/Instruments/YourInstrumentName/`
(example: `Synthonico/Instruments/MyGrandPiano/grandpiano30.wav)

2. **Name your WAV files correctly**
They **must** be named:
`PREFIX` + `MIDI number` + `.wav`

Examples:
- `MyGrandPiano21.wav`
- `MyGrandPiano60.wav`
- `MyGrandPiano108.wav`

You only need to include the notes you actually have (gaps are now fine — the new nearest-sample code we added will automatically transpose the closest one).

3. **Add a button in the HTML**
Open `synthonico.html` and find this section (right under the Lute button):

<h2>Multi-Sample Instruments</h2>
<button id="LuteOfAgesToggle" ...>Lute</button>


Replace or add right after the Lute button with something like this:

<button id="MyGrandPianoToggle"
style="font-size: 1.2em; margin-bottom: 10px; width: 220px; background-color: #5E5E5E; color: #171717; border: none; border-radius: 4px; cursor: pointer;"
onclick="toggleInstrument('MyGrandPiano', 'Synthonico/Instruments/MyGrandPiano', 'MyGrandPiano', 21, 108)">
My Grand Piano
</button>

Change these 4 things only:
- `id="MyGrandPianoToggle"` (unique)
- `'MyGrandPiano'` (your internal key, just a note, keep it the same as the id and path)
- `'Synthonico/Instruments/MyGrandPiano'` (folder path)
- `'MyGrandPiano'` (the exact prefix you used in filenames)
- `21, 108` (your actual min/max MIDI notes — doesn’t have to be full range)

**Done!**

That’s literally it. No other code changes needed — the nearest-sample system handles everything.

When you’re ready, just drop the folder + updated button and you’re live. 🎹