Skip to content

Rename FlexAudioBufferSource to TimestretchAudioSource - #47

Merged
danigb merged 4 commits into
mainfrom
chore/rename-timestretch-audio-source
Sep 7, 2026
Merged

danigb merged 4 commits into
mainfrom
chore/rename-timestretch-audio-source

Conversation

@danigb

@danigb danigb commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Made with Claude

The package has never been published, so this is a free rename to a name
that says what the module does: WSOLA time-stretch with an independent
pitch stage, not a vague "flexible" source.

- `@synthlet/flex-audio-buffer-source` -> `@synthlet/timestretch-audio-source`
- `FlexAudioBufferSource` and its `Inputs`/`WorkletNode`/`Processor`
  companions -> `TimestretchAudioSource*`
- `registerFlexAudioBufferSourceWorklet` -> `registerTimestretchAudioSourceWorklet`
- registrar key `FABS` -> `TIMESTRETCH_AUDIO_SOURCE`
- internals: `createFlexSource` -> `createTimestretchSource`, `FlexConfig`
  -> `TimestretchConfig`, the `flex` locals -> `stretch`

Also updated: the umbrella package's dependency, imports, re-exports and
registrar list (kept alphabetical), the descriptors test's expected list,
the docs page and its example component, THIRD-PARTY-LICENSES.md, the
cross-package comments that cite this module by path, and package-lock.

No changeset: neither name has ever been on npm, so there is nothing to
announce as a rename.
The package had no changeset at all - not the rename, a pre-existing gap.
Every other package carries one, and the two other unpublished packages
(analog-delay, digital-delay) follow the same convention: sit at 0.0.0
with an `<pkg>-initial-release.md` minor changeset, which versions them
to 0.1.0 and ships them with a CHANGELOG.md.

This one sat at 0.1.0 with nothing, so `changeset version` skipped it and
it would have published as the only package in the repo with no changelog.

Reset to 0.0.0, pointed synthlet's dependency at ^0.0.0 to match how
analog-delay and digital-delay are referenced, and added the changeset.
`changeset status` now plans it at 0.1.0, alongside digital-delay.
TimestretchAudioSource is longer than FlexAudioBufferSource, so four
lines crossed prettier's 80-column limit after the rename. Pure
re-wrapping, no behaviour change.
# Conflicts:
#	THIRD-PARTY-LICENSES.md
#	site/.source/index.js
@danigb
danigb merged commit 48dd8cf into main Sep 7, 2026
1 check passed
@danigb
danigb deleted the chore/rename-timestretch-audio-source branch September 7, 2026 06:43
danigb added a commit that referenced this pull request Sep 7, 2026
Brings in #46 (Granite improvements) and #47 (FlexAudioBufferSource ->
TimestretchAudioSource). Three conflicts, all in files this branch also
rewrote.

**`packages/granite/src/params.ts`** - main replaced the four-parameter engine
with an eighteen-parameter one, so ticket 06's pass on the old `wet`/`speed`/
`density`/`spread` had nothing left to describe. Took main's file and re-applied
the convention to it.

Its header carried a cost argument this branch disproves: "not worth 128 floats
per parameter per block". `benchmarks/automation-rate/` measured that and it is
wrong twice over - declaring a parameter costs ~0.30 us/node/block with the rate
free, and an a-rate parameter with nothing varying connected still arrives as a
single value, so the 128 floats only exist once somebody has patched something
in, at which point k-rate renders the modulator and discards the samples.
Replaced with the honest ground: fifteen of the eighteen are read once per grain
at activation, which is (b). `freeze` is (a). `wet` and `feedback` are applied
per sample and are marked **A bet**, joining the folder's candidate list.

**`packages/synthlet/src/descriptors.test.ts`** - main added
`["Granite", "freeze", "k-rate"]` to the trigger-like table, against this
branch's claim that every trigger-like param is now a-rate.

Kept `freeze` k-rate. It is not an event: it borrows the gate shape (`> 0`, so a
scaled control still opens it) to latch a *mode*, and `dsp.ts` crossfades 100
samples across each edge - so the splice is what a listener hears, not the
sample the edge landed on, and placing it exactly would buy nothing the fade
does not already cover. Narrowed the claim the test pins from "every
trigger-like param" to "every param that places an *event*", and said why
`freeze` is the exception.

**`packages/synthlet/src/worklet-copies.test.ts`** - both sides added a package
to `spectrumPackages`. Kept both: `granite`, `lfo`.

Verified on the merged tree: 60 suites, 1519 tests, 42 snapshots pass;
`npm run build` leaves every generated bundle unchanged; `npm run check:rates`
and `prettier --check` pass. The two lockfiles are byte-identical to main's.
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