# Third-party code shipped in app/

## Pyodide 314.0.8 (vendor/pyodide-314.0.8-clef1/)

- Files: `pyodide.mjs`, `pyodide.asm.mjs`, `pyodide.asm.wasm`, `pyodide-lock.json`.
- Licence: Mozilla Public License 2.0 (MPL-2.0). The licence text is at https://www.mozilla.org/MPL/2.0/.
- Source: https://github.com/pyodide/pyodide (the files are also published on the jsDelivr CDN, from which
  build/fetch_vendor.py downloads them and checks them against pinned SHA-256 values).
- Copyright: the Pyodide contributors.

## CPython 3.14.2 standard library (vendor/pyodide-314.0.8-clef1/python_stdlib.zip)

- Licence: Python Software Foundation License (PSF-2.0). Source: https://github.com/python/cpython
- Bundled inside Pyodide's stdlib zip.

## Score Alchemy converter (py/musx2musicxml.py)

- Written by the Score Alchemy contributors, MIT licence (see the LICENSE file at the project root).

## OpenSheetMusicDisplay 1.9.9 (vendor/osmd-1.9.9/)

- Files: `opensheetmusicdisplay.min.js` (SRI in index.html), `LICENSE.txt` (the upstream licence text, kept as the
  copyright notice; the minified bundle has no banner of its own).
- SHA-256: `opensheetmusicdisplay.min.js` 658ed444554d43ec66bfb54c72d6833d369e5f93a3a2c06095187cd09a401034;
  `LICENSE.txt` 261655f10cf6b90bd062fbe3c7fa4dd03e0324fdfc4b53a3c7d626e3aec694a8.
- Licence: BSD-3-Clause. Source: https://github.com/opensheetmusicdisplay/opensheetmusicdisplay (npm: opensheetmusicdisplay).
- Copyright: the OpenSheetMusicDisplay contributors.
- Bundles: VexFlow 1.2.93 (MIT, the notation drawing engine), JSZip 3.10.1 (dual licence "MIT OR GPL-3.0-or-later";
  Score Alchemy uses it under the MIT option), loglevel 1.8.x (MIT), typescript-collections 1.3.x (MIT).
- Version note: 1.9.9 is the newest 1.x release, as the build spec asked. The npm `latest` tag is 2.3.1; moving to
  2.x is a separate decision (its licence is also BSD-3-Clause, but it has a different API and bundle).

## jsPDF 4.2.1 (vendor/jspdf-4.2.1/)

- Files: `jspdf.umd.min.js` (SRI in index.html), `LICENSE.txt`.
- SHA-256: `jspdf.umd.min.js` e6551fcdc32f09d6853b2c5126d18d01d9447e0da618a41a11ebeee0f6c20d54;
  `LICENSE.txt` dc388ec35ff463288cdde3588a36fd4ed12a45deff053243b37309acc9ef583b.
- Licence: MIT (the banner in the bundle reproduces the copyright notices of jsPDF and of the code it includes).
- Source: https://github.com/parallax/jsPDF (npm: jspdf).
- Bundles: fflate 0.8 (MIT), fast-png 6 (MIT), @babel/runtime 7 (MIT).

## svg2pdf.js 2.9.0 (vendor/svg2pdf-2.9.0/)

- Files: `svg2pdf.umd.min.js` (SRI in index.html), `LICENSE.txt`. It needs jsPDF loaded first (it extends jsPDF.API).
- SHA-256: `svg2pdf.umd.min.js` 84d81b1e15641abd5249c311eccaed4c51ab4f4083915889be5d279f52bab3bf;
  `LICENSE.txt` 04db7fb792d065c8c9a0e3a7a8255cd36e32b263ca023cbea10daee4a45132b8.
- Licence: MIT. Source: https://github.com/yWorks/svg2pdf.js (npm: svg2pdf.js).
- Bundles: cssesc 3, font-family-papandreou 0.2, specificity 0.4, svgpath 2.x (all MIT).

All three bundles were downloaded from the jsDelivr npm mirror by build/fetch_vendor.py; each SHA-256 was also
checked against the file inside the npm tarball of that version (npm pack, 2026-11-17).

## OMR beta (page images, step 5a): oemer engine, models, onnxruntime-web and Pyodide packages

Status: OMR is a beta. The licence points below are open and must be decided before the beta is published (see
the last section). Licences here were read from the files themselves (wheel and tarball), not from memory.

### oemer 0.1.8 (vendor/oemer-0.1.8-clef2/oemer, matplotlib/)
- Upstream: https://github.com/BreezeWhite/oemer, PyPI wheel `oemer-0.1.8-py3-none-any.whl`, SHA-256
  713b9c06e1ade3fa0c5f9fa2c396cbb1492ce6be30d0bd25d57601af1eb32917 (PyPI has no sdist for 0.1.8).
- Licence: MIT (`oemer-0.1.8.dist-info/LICENSE` in the wheel; the GitHub repository reports MIT).
- Changes: build/patches/oemer/0001..0011 (browser bundle, C clefs, exact dewarp, barline fixes, the v5 fixes:
  clef at staff start, key by naturals, binarised SVM crops, whole-bar rests and rest dots, floating notes). They are
  part of this project and carry the project's MIT licence. build/patches/oemer/README.md lists them.
- Files are pinned in app/vendor.lock.json (each file) and app/omr-index.js (what the workers load).

### OMR models and SVMs: omr-train v5 (vendor/oemer-0.1.8-clef2/assets/)
- Ours. Trained by the project's omr-train code (MIT) in release v5-2026-11-21; the files are copied from
  build/assets/omr-v5/ and pinned in build/fetch_vendor.py (SHA-256 and bytes), with their SHA256SUMS there.
- `unet_big.<sha256>.onnx.part01of03` to `.part03of03`: model 1, width 1.0, 70581836 bytes, sha256 8201bc3da55a5810174e5e4b7e81ec280467fa635f37c2a63de5933c2ab7cd82.
  Stored in three pieces of at most 24 MiB (the static host's per-file limit is 25 MiB); the browser joins them and checks the whole file.
- `seg_net.<sha256>.onnx`: model 2, width 0.5, 9634327 bytes, sha256 8845da621fe73de6173518687fc9bfb0240103ad33ee9de2e82593f9980a9091.
  Both opset 17, input uint8 NHWC (256x256x3 and 288x288x3), output float32. No longer taken from oemer's GitHub release.
- `sfn.<sha>.npz`, `rests.<sha>.npz`, `rests_above8.<sha>.npz`: the three SVMs of the same release, in the svc_np.py
  layout (the .npz files are used as they are; no pickle, no re-save).
- Training data: CC0 renders of OpenScore Lieder and String Quartets, made with MuseScore 4.6.5. The SVM training
  images also use the glyphs of Leland, Bravura and Petaluma (SIL OFL 1.1); the font files are not shipped, only the
  images made from them. No non-commercial data is in the release (omr-train handover, 2026-11-21).
- `clef3.<sha256>.npz`: the 3-class clef SVC of this project (build/assets/README.md). Trained on the maintainer's own
  scores.

### onnxruntime-web 1.31.1 (vendor/onnxruntime-web-1.31.1-clef1/)
- Licence: MIT (`package.json` of the npm tarball `onnxruntime-web-1.31.1.tgz`, SHA-256 bdccdb9fbb9ab537247c0c734e9b1d2b1b338b4f2a09faa58f0dc1cfa27c312c).
  The tarball has no LICENSE file.
- Files used: `ort.webgpu.min.mjs` and `ort.wasm.min.mjs` (loaders), `ort-wasm-simd-threaded.asyncify.mjs` and the
  asyncify wasm (the glue the WebGPU loader imports; the wasm is 28.7 MB, over the 25 MiB deploy limit, so it is kept in
  two pieces `ort-wasm-simd-threaded.asyncify.<sha256>.wasm.part01of02` and `.part02of02`, joined and checked by the
  browser before ORT gets it), `ort-wasm-simd-threaded.{mjs,wasm}` (single-thread WASM, the glue the WASM
  loader imports). Threads are not used (numThreads 1; no
  cross-origin isolation), so the threaded glue patch is not shipped. The .wasm files are hash-checked before use.
- Source: https://github.com/microsoft/onnxruntime

### Pyodide packages (vendor/pyodide-314.0.8-clef1/, official Pyodide 314.0.8 build except opencv-python, checked against pyodide-lock.json)
- numpy 2.4.6: BSD-3-Clause (`numpy-2.4.6.dist-info/licenses/LICENSE.txt`, "Copyright (c) 2005-2025, NumPy
  Developers"). The wheel also carries the licences of the bundled parts (MIT, BSD, Apache-2.0, Intel); all of them
  are permissive.
- scipy 1.18.0: BSD-style (`scipy-1.18.0.dist-info/LICENSE.txt`, "Copyright (c) 2001-2002 Enthought, Inc. 2003,
  SciPy Developers").
- pillow 12.2.0: the PIL licence (`pillow-12.2.0.dist-info/licenses/LICENSE`, permissive).
- typing-extensions 4.15.0: PSF licence (`typing_extensions-4.15.0.dist-info/licenses/LICENSE`).
- opencv-python 4.11.0.86 (`cv2`, WASM): this is NOT the Pyodide CDN wheel. It is OpenCV 4.11.0 built without FFmpeg
  (the videoio module is off: `cv2.getBuildInformation()` shows `Video I/O:` with no FFMPEG or avcodec line). The project
  rebuilt it from the opencv-python 4.11.0.86 recipe on 2026-11-22 (Xbuildenv 314.0.8, Python 3.14.2, Emscripten 5.0.3).
  Shipped file: `build/assets/opencv-noffmpeg/opencv_python-4.11.0.86-cp314-cp314-pyemscripten_2026_0_wasm32.whl`,
  5,715,286 bytes, SHA-256 `d0ee1bb64e701736ec3aff5baa42af6feab116bb419557f5ed8542f8d37be425` (the CDN wheel was 10,675,764 bytes).
  Its licence files are opencv-python's and ship unchanged inside the wheel: `LICENSE.txt` (MIT, opencv-python packaging)
  and `LICENSE-3RD-PARTY.txt` (the OpenCV code is Apache-2.0). That second file is opencv-python's single notice for all
  its builds, so it still names FFmpeg (LGPL-2.1), libmp3lame (LGPL) and x264 (GPL-2.0). This binary contains none of
  them. Proof, in Stave's release folder `omr-train/release/opencv-noffmpeg-2026-11-22/`: `gate/gate.txt` (3,135 cv2 outputs
  over 19 pages, identical to the CDN build), `gate/noffmpeg_new.txt` (no FFmpeg, avcodec, libavformat, x264 or lame strings
  or symbols in `cv2.so`), `recipe/` (the patch and build log). The other libraries named in that notice (libjpeg-turbo,
  libpng, zlib, libwebp, protobuf, libtiff, OpenEXR, Intel IPP under the Intel Simplified Software License) are not
  re-checked by this build.
- Pyodide core (above, MPL-2.0) and the Python standard library (PSF-2.0) are unchanged.

### Open decisions (for Score Alchemy and the user)
1. (closed 2026-11-22) The LGPL/GPL codec pieces of the opencv-python WASM wheel: the shipped wheel is the no-FFmpeg
   build above, so no codec piece is in the core path. The Intel IPP licence (see the opencv entry) is not re-checked.
The earlier model question (CVC-MUSCIMA, non-commercial terms, from oemer's release weights) no longer applies to
the shipped files: the v5 models and SVMs above are our own. The oemer code is MIT.

## pdf.js 6.5.438 (vendor/pdfjs-dist-6.5.438-clef1/): PDF input for the OMR beta (web, OMR switch only)
- Licence: Apache-2.0 (`LICENSE` in the npm tarball, copied to this folder as `LICENSE`).
- Decoders: OpenJPEG (JPEG 2000) under the BSD 2-clause licence (`wasm/LICENSE_OPENJPEG`, `wasm/LICENSE_PDFJS_OPENJPEG`: the Mozilla build's notice). JBIG2 under the PDFium BSD-style notice and the Apache-2.0 notices of the Mozilla build (`wasm/LICENSE_JBIG2`, `wasm/LICENSE_PDFJS_JBIG2`). All are permissive: the core stays MIT/BSD/Apache/MPL.
- Source and pin: npm `pdfjs-dist` 6.5.438 (published 2026-11-01, two weeks before the pin), `https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-6.5.438.tgz`, sha256 `7461aefcd27c4ef0dd76f9ca5760f09466eb6b3f934432670c12132e7b3d6faa`, 9,144,013 bytes. Upstream: https://github.com/mozilla/pdf.js.
- One patch, `build/patches/pdfjs/0001-no-static-init.patch` (sha256 1759191f87615c3dfaafdc8bb893f4ead661dbbb2d2f529b50fb5843510bd11c): `pdf.worker.mjs` no longer calls `initializeFromPort(self)` when it is loaded in a worker (the render worker is not a pdf.js worker; the fake-worker path needs only `globalThis.pdfjsWorker`). Its README is in the same folder.
- Shipped files (sha256 and size, after the patch; checked by `build/fetch_vendor.py --verify`):

| file | sha256 | bytes |
|---|---|---|
| `build/pdf.mjs` | cbabeebf4df66f3fe736f2fa2792d332e019a878b0aa88d5e2be17d439079de4 | 891540 |
| `build/pdf.worker.mjs` | 882d334883ce022f0080a5437a688200b574d3f596dd7c91407382e7bcfd7927 | 2248622 |
| `wasm/openjpeg.wasm` | 7ea4b2b04613370ad4e9c1162da750cc88b4b176eac0d0c164b3caff23fc0a46 | 220817 |
| `wasm/jbig2.wasm` | 466f45c2a61a698152fb5400c27e56ff2ceb73dcb71fde3fc366a502308eaab0 | 103671 |
| `LICENSE` | 0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594 | 10174 |
| `wasm/LICENSE_OPENJPEG` | a6af136f3e15038a666b61f376612a07d9a4e48cb7c01adbf3e33b3f14ab49b6 | 2112 |
| `wasm/LICENSE_PDFJS_OPENJPEG` | 717fc62da03292dbb4dd0c8280bd4ce7bb8550dcf31d772bc93455fb50313425 | 1285 |
| `wasm/LICENSE_JBIG2` | 9e66b7f1b934a28b37f3bc4dac97915de1674271e79a0a88182a18ed9731b4d1 | 12862 |
| `wasm/LICENSE_PDFJS_JBIG2` | aad3cce09842e00e9e11ad5e8fef8cc02fbc3a3768fe2f007443b9cee37aaee5 | 555 |

- Not shipped: the cMaps and standard fonts (text that is not embedded in the PDF is drawn with pdf.js's fallback glyphs; music symbols are embedded in the scores this beta reads), the scripting sandbox and quickjs (`quickjs-eval.*`: scripting is off), the viewer, the renderer and the `*_nowasm_fallback.js` files (a decoder that cannot load refuses the page with `err.pdfWasm`), and `qcms_bg.wasm` (colour management is not used with `useWorkerFetch` false).
- Scope: the render worker (`app/workers/pdf.worker.js`) runs the library with `disableFontFace`, no scripting, no XFA, no annotations, the PDF as bytes, and the two decoders through `fetchVerified`.

## webmscore 1.2.1 (vendor/webmscore-1.2.1/): MuseScore 3 engine, web only (step 3b)

- What: webmscore 1.2.1, the MuseScore 3 core compiled to WebAssembly by LibreScore. Used for .mscz, .mscx, Guitar Pro,
  MIDI and MusicXML input, and for .mscz output. Runs only in workers/mscore.worker.js, through its raw API in src/.
- Files shipped: `webmscore.lib.js` (patched glue), `webmscore.lib.wasm`, `webmscore.lib.data`, `webmscore.lib.mem.wasm`,
  `src/index.js`, `src/helper.js` (patched), `src/utils.js`. Pinned in app/vendor.lock.json (upstream record "webmscore",
  with the patched and the original hashes) and app/mscore-index.js.
- Source: upstream tarball https://registry.npmjs.org/webmscore/-/webmscore-1.2.1.tgz (SHA-256
  692184fc737e63509c6ebfc5a58413ec9caa5d77f3b76969267d76016532e12c); upstream source https://github.com/LibreScore/webmscore/tree/v1.2.1
  (linked from the app page as "Source code of the MuseScore engine"). Score Alchemy's patches: build/patches/webmscore/
  (README.md, 0001 and 0002). They are part of this project, and they are under the same licence as the engine.
- Licence: GPL-3.0 (GNU General Public License, version 3), with a GNU FreeFont font exception. Read by Score Alchemy on
  2026-11-19 from the upstream file https://raw.githubusercontent.com/LibreScore/webmscore/v1.2.1/LICENSE.GPL, which says:
  "under the terms of the GNU General Public License version 3 as published by the Free Software Foundation". The same
  file says that the fonts are under the GNU FreeFont licence and gives the font exception (a document that embeds
  unaltered fonts from MuseScore is not covered by the GPL only because of that).
  The npm package.json (the 1.2.1 tarball) says only `"license": "GPL",`, and the tarball has no LICENSE file, so the
  version comes from the upstream file, not from the package. Earlier notes in this project said GPL-2.0; that was an
  unverified guess and is wrong.
- Consequence: the engine is GPL. It is web-only and loaded by the web app. It is not imported by any core code path that
  a future app store build would use (Score Alchemy's own code stays MIT). Source must be offered (the link above and the patches).
- OPEN, for legal review before the site earns money: the GPL engine is linked into a web page that carries ads (the
  ads live on the site, outside the app iframe; the app itself has none). Score Alchemy's own code is MIT. Review: what "source
  offer" a hosted web page needs under GPL-3.0 (the source link above, the patches, the font exception), and whether the
  site's ads and the app's hosting change that. (The licence version is no longer open: see above.)

## FluidR3Mono_GM.sf3 soundfont, MuseScore 3.6.2 tag (vendor/soundfont-fluidr3mono-3.6.2/): audio export, web only

- Files shipped: `FluidR3Mono_GM.sf3` (the General MIDI sound bank, SoundFont 3, 23,712,790 bytes) and
  `FluidR3Mono_License.md` (the notice, shipped unchanged next to the bank: the notice travels with the file).
  The worker (workers/mscore.worker.js) loads the bank on the first audio request (lazy, about 22.6 MB), from this origin,
  after the SHA-256 check in mscore-index.js ("soundfont"). The engine (webmscore, above) plays it.
- Source: https://raw.githubusercontent.com/musescore/MuseScore/3.6.2/share/sound/FluidR3Mono_GM.sf3 and
  .../FluidR3Mono_License.md (the MuseScore repository at tag 3.6.2). The pins were checked against the git blob SHA-1 that
  the GitHub contents API gives for the same ref.
- SHA-256 (pinned in build/fetch_vendor.py, recorded in app/vendor.lock.json): `FluidR3Mono_GM.sf3`
  2aacd036d7058d40a371846ef2f5dc5f130d648ab3837fe2626591ba49a71254; `FluidR3Mono_License.md`
  cf1889febeafd2b0a20c2c82359245524fc7dba29ded336cc3b51e0bcfdc8b84.
- Licence: MIT. The notice (FluidR3Mono_License.md) says that the FluidR3 and FluidR3Mono sounds are MIT, and that "the
  acknowledgements and copyright notices above must be included in any derivative work".
- Credits, as the notice gives them: FluidR3 (original version) by Frank Wen, copyright 2000-2002; mono conversion
  (FluidR3Mono) by Michael Cowgill, copyright 2014-17; Temple Blocks instrument by Ethan Winer, copyright 2002; percussion
  (Drumline) by Michael Schorsch, copyright 2016.
- Note on the notice: the file is MuseScore's MS_General notice. Its header describes the MS_General.sf2 bank (a fork
  with an adaptation credit to S. Christian Collins, and a licence "under discussion"). We do not ship MS_General. The
  FluidR3Mono sections, which cover the file we ship, are MIT. The notice is kept unchanged on purpose.
- Size: under Cloudflare's 25 MiB per-file limit (23.7 MB). build/stage_deploy.py refuses any staged file over 25 MiB.
- Status: Clef's default pending the user's veto (site/content/soundfont-research.md, "Verification by Clef").

## Live synth, Practice Panel (vendor/spessasynth-4.4.8-clef1/): the live player, flag ClefFlags.practiceLive (2026-11-27, step 10)

Loaded only when the Practice Panel's live player is on (the flag is OFF in the shipped app). Pinned in build/fetch_vendor.py
(`SPESSA_PKGS`, `SPESSA_FILES`), taken out of the npm registry tarballs with `build/fetch_vendor.py --spessa`. Each file has a
SHA-256 in app/vendor.lock.json; each tarball is checked by its SHA-256 and by the sha512 integrity of the package-lock of
tests/spikes/practice-live.
- `spessasynth_lib` 4.4.8 (`spessasynth_lib.js`, `spessasynth_processor.min.js`, the AudioWorklet processor loaded from this
  origin): Apache-2.0. Source: https://github.com/spessasus/spessasynth_lib (npm `spessasynth_lib@4.4.8`).
- `spessasynth_core` 4.4.10 (`spessasynth_core.js`): Apache-2.0. Source: https://github.com/spessasus/spessasynth_core (npm `spessasynth_core@4.4.10`).
- `stb-vorbis` 0.0.7 (`stb_vorbis.js`, Ogg decoding of the SoundFont 3 samples): Apache-2.0 (npm `stb-vorbis@0.0.7`).
- `fflate` 0.8.3 (`fflate.js`, inflate, the browser ES module): MIT (npm `fflate@0.8.3`).
- The licence texts ship next to the files: `LICENSE-spessasynth_lib.txt`, `LICENSE-spessasynth_core.txt`, `LICENSE-stb-vorbis.txt`
  (Apache-2.0, the same text) and `LICENSE-fflate.txt` (MIT).
- Changes: the bare imports of `spessasynth_lib.js` (`spessasynth_core`), `spessasynth_core.js` (`fflate`, `stb-vorbis`) are
  rewritten to the sibling file names. Nothing else is changed.
- The soundbank it plays is the audio export's FluidR3Mono_GM.sf3 (see the section above). The engine's sound bank is decoded on
  the main thread (addSoundBank, timed out after 90 s).
- Not shipped: the source maps (`*.map`) of the packages.

## Bodoni Moda and Courier Prime (app/fonts/): the frame's display and label fonts (2026-11-23)

- Files: `bodoni-moda-latin.woff2` (Bodoni Moda, variable weight), `courier-prime-regular-latin.woff2` and
  `courier-prime-bold-latin.woff2` (Courier Prime), Latin subsets copied from `site/public/fonts/`; the licence texts
  `OFL-BodoniModa.txt` and `OFL-CourierPrime.txt` sit next to them.
- Licence: SIL Open Font License 1.1 (OFL-1.1). The full text is in the two OFL files. The fonts are not sold on their own.
- Copyright: Bodoni Moda Project Authors (https://github.com/indestructible-type/Bodoni); Courier Prime Project Authors
  (https://github.com/quoteunquoteapps/CourierPrime).
- Used only by the one-tool frame (`styles.css`, `@font-face` "SA Bodoni" and "SA Courier"), with system fallbacks.

## Fonts: Noto Serif / Noto Sans / Noto Sans Mono Greek
- Source: Google Fonts (github.com/google/fonts), Greek subset, weights 400-700, self-hosted in app/fonts/ (noto-serif-greek, noto-sans-greek, noto-sans-mono-greek)
- Licence: SIL Open Font License 1.1 — text in app/fonts/OFL-NotoGreek.txt
- Copyright: The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)

## Fonts: Noto Sans / Noto Serif Devanagari, Noto Sans / Noto Serif Thai
- Source: Google Fonts (github.com/google/fonts), self-hosted in app/fonts/
- Licence: SIL Open Font License 1.1 — texts in app/fonts/OFL-NotoDevanagari.txt and app/fonts/OFL-NotoThai.txt
