Skip to content

v0.17.1 - Migrate sample sources and remove websfz format support#116

Merged
danigb merged 6 commits intomainfrom
feat/sample-sources
Feb 23, 2026
Merged

v0.17.1 - Migrate sample sources and remove websfz format support#116
danigb merged 6 commits intomainfrom
feat/sample-sources

Conversation

@danigb
Copy link
Owner

@danigb danigb commented Feb 23, 2026

Sample Sources Migration — Summary

Create with Claude code

Goal

Migrate all instruments from danigb.github.io/samples to smpldsnds.github.io repos, then remove the legacy websfz pipeline.

Completed

SplendidGrandPiano

  • File: src/splendid-grand-piano.ts
  • Changed BASE_URL to https://smpldsnds.github.io/sfzinstruments-splendid-grand-piano/samples
  • Converted all sample names from hyphen to space format (PP-C3 -> PP C3)
  • Fixed pre-existing MF/Mf case bug in FF layer
  • Fixed MF layer mid-range: repo uses MF (uppercase) for C#1-C4 and Mf (mixed case) for low+high range
  • Added space URL-encoding (%20) in src/smplr/load-audio.ts
  • Added optional formats config (defaults to ["ogg", "m4a"])

ElectricPiano

  • File: src/electric-piano.ts
  • No longer extends SfzSampler — composes Smplr directly (same pattern as Smolken)
  • Fetches raw .sfz files from smpldsnds, converts with sfzToSmplrJson()
  • Added optional formats config (defaults to ["ogg", "m4a"])
  • New URLs:
    • CP80: smpldsnds.github.io/sfzinstruments-greg-sullivan-e-pianos/cp80/CP80.sfz
    • PianetT: smpldsnds.github.io/sfzinstruments-greg-sullivan-e-pianos/planet-t/Pianet T.sfz
    • WurlitzerEP200: smpldsnds.github.io/sfzinstruments-greg-sullivan-e-pianos/wurlitzer-ep200/Wurlitzer EP200.sfz
    • TX81Z: smpldsnds.github.io/sgossner-vcsl/Electrophones/TX81Z - FM Piano.sfz

SFZ Parser: #define preprocessor

  • File: src/smplr/sfz-convert.ts
  • Added resolveDefines() step before tokenization
  • Handles #define $VAR value directives used by smpldsnds SFZ files (e.g. #define $EXT flac)

Removed legacy websfz pipeline

All websfz support has been removed. The entire src/sfz/ directory was deleted along with the websfz converter:

Deleted file What it was
src/sfz/websfz.ts Websfz type definitions
src/sfz/sfz-kits.ts Kit discovery URLs (3 danigb.github.io endpoints)
src/sfz/sfz-load.ts SfzInstrumentLoader, fetchWebSfz
src/sfz/sfz-sampler.ts Legacy SfzSampler class
src/sfz/sfz-regions.ts findRegions() for Websfz data
src/sfz/sfz-regions.test.ts Tests for findRegions
src/sfz/__fixtures__/cp80.websfz.ts CP80 test fixture
src/sfz/__fixtures__/meatbass.ts Meatbass test fixture
src/sfz/__fixtures__/grandpiano.ts Grand piano test fixture
src/smplr/websfz-convert.ts websfzToSmplrJson() converter

None of these were exported from the library. SfzSampler was orphaned after the ElectricPiano rewrite (nothing imported it). The test fixtures and findRegions() were only used by sfz-regions.test.ts.

Already on smpldsnds (no changes needed)

Instrument Repo
Smolken (double bass) smpldsnds.github.io/sfzinstruments-dsmolken-double-bass
Versilian smpldsnds.github.io/sgossner-vcsl
Mellotron smpldsnds.github.io/archiveorg-mellotron
DrumMachine smpldsnds.github.io/drum-machines

Demo site improvements

  • All 10 example components now show load progress as percentage
  • SplendidGrandPiano and ElectricPiano pages have ogg/m4a format selector
  • Version number from smplr/package.json displayed in page title

@danigb danigb merged commit ba8bb6e into main Feb 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant