# Sampled instrument audio — licensing & provenance

This directory ships per-note MP3 samples for 5 instruments (`acoustic_grand_piano`,
`violin`, `flute`, `trumpet`, `clarinet`), used by StaffWeaver's Web Audio playback
engine (`src/app/playback/sample-bank.ts`).

## Source

Downloaded from the **FluidR3_GM** soundfont distribution in the
[`gleitz/midi-js-soundfonts`](https://github.com/gleitz/midi-js-soundfonts) repository
(the `gh-pages` branch, which is what GitHub Pages serves at
https://gleitz.github.io/midi-js-soundfonts/).

- Repository: https://github.com/gleitz/midi-js-soundfonts
- Files fetched from: `FluidR3_GM/<instrument>-mp3/<Note>.mp3` on the `gh-pages` branch,
  e.g. https://raw.githubusercontent.com/gleitz/midi-js-soundfonts/gh-pages/FluidR3_GM/acoustic_grand_piano-mp3/A0.mp3
- Retrieved via the GitHub Contents API + `raw.githubusercontent.com` download URLs
  (direct GitHub raw access was reachable; no mirror fallback was needed).
- Each instrument folder contains all 88 notes in the standard piano range A0–C8.
- The underlying soundfont: `FluidR3_GM.sf2` (originally by Frank Wen /
  the FluidR3 project), rendered to per-note MP3s by this distribution's
  soundfont-generator tooling.

## Licenses (two, covering different things)

**1. The `midi-js-soundfonts` repository itself (tooling/distribution code)** is MIT
licensed — see `LICENSE.txt` at the repo root
(https://github.com/gleitz/midi-js-soundfonts/blob/gh-pages/LICENSE.txt):

```
Copyright (C) 2012 Benjamin Gleitzman (gleitz@mit.edu)

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```

**2. The FluidR3_GM audio content itself** (the actual `.mp3` sample files in this
directory) is documented by the distribution's own README as released under the
**Creative Commons Attribution 3.0** license
(https://creativecommons.org/licenses/by/3.0/us/), per
https://github.com/gleitz/midi-js-soundfonts/blob/gh-pages/README.md:

> Fluid Soundfont — Generated from FluidR3_GM.sf2 (148 MB uncompressed) — Released
> under Creative Commons Attribution 3.0 license.

Attribution: FluidR3_GM soundfont, redistributed as pre-rendered per-note MP3s via
`gleitz/midi-js-soundfonts` (Benjamin Gleitzman). Per CC BY 3.0, redistribution
requires attribution to the original work and license — this file serves as that
attribution and links back to the source, license, and distribution.

## What's included here

| Instrument              | Files | Size (bytes) |
|--------------------------|------:|--------------:|
| `acoustic_grand_piano`   | 88    | 1,971,564 |
| `violin`                 | 88    | 2,150,808 |
| `flute`                  | 88    | 2,224,778 |
| `trumpet`                | 88    | 2,200,910 |
| `clarinet`               | 88    | 2,210,426 |
| **Total**                | **440** | **10,758,486 (~10.3 MB)** |

Note names follow the soundfont's own naming convention — naturals as `<Letter><Octave>`
(e.g. `C4.mp3`) and flats as `<Letter>b<Octave>` (e.g. `Db4.mp3`, `Bb3.mp3`) — no sharps.
`src/app/playback/sample-bank.ts`'s `noteKeyFor` maps StaffWeaver's internal `Pitch`
model (which can carry sharps) onto this flat-only naming scheme.
