Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f0b1ae3
chore: switch licence from ISC to MIT (TF-0MUTVQSI6003VPAD)
Oct 4, 2026
f40ea87
TF-0MUTVQSI6003VPAD: Implementation complete
Oct 4, 2026
8f7a45b
TF-0MN0XD9XE0LD8ODI: Implementation complete
Oct 4, 2026
326c634
TF-0MUUEZE48002CLBX: Implementation complete
Oct 4, 2026
883ef18
TF-0MUUC9RTU008UJ18: Implementation complete
Oct 5, 2026
fbb302e
TF-0MMSXILP20HEKXT2: Implementation complete
Oct 5, 2026
2367b6f
TF-0MUUP5HYY006XQN2: Implementation complete
Oct 5, 2026
88074f4
TF-0MN1LO0XY002FRXM: Implementation complete
Oct 5, 2026
746a1d5
TF-0MUUPAQ7U008H26I: Implementation complete
Oct 5, 2026
bc73823
TF-0MUUPCGSU003G7CI: Implementation complete
Oct 5, 2026
63d014b
TF-0MUV11IXS007W29J: Implementation complete
Oct 5, 2026
fe40fa9
TF-0MUUPIAH80081LF1: Implementation complete
Oct 5, 2026
4b21c9b
TF-0MUUPJ95Z001OHEN: Implementation complete
Oct 5, 2026
2ec0b15
TF-0MUUPRGH5009CT23: Implementation complete
Oct 5, 2026
d37cd34
TF-0MUV11LJA0059A8C: Implementation complete
Oct 5, 2026
c1a7d01
TF-0MUV11PVB008I6EA: Implementation complete
Oct 5, 2026
bab7fc7
TF-0MUV11RXS003Y6JI: Implementation complete
Oct 5, 2026
1d9acdb
TF-0MUV11U9D0087TTS: Implementation complete
Oct 5, 2026
c3bc094
TF-0MN1LO1NK19Z0KWU: Implementation complete
Oct 5, 2026
0817b6d
TF-0MUV11WH60061V9M: Implementation complete
Oct 5, 2026
7b1cae1
TF-0MUV11YIP0026H65: Implementation complete
Oct 5, 2026
08a37f6
TF-0MUV1231O00873IF: Implementation complete
Oct 5, 2026
fc9f174
TF-0MUV125DM0076YZ3: Implementation complete
Oct 5, 2026
20a9913
TF-0MUV125SZ00074M4: Implementation complete
Oct 5, 2026
8294117
TF-0MUV120UZ00006UU: Implementation complete
Oct 5, 2026
34f69fc
chore: remove unused 'tone' dependency from package.json
Oct 5, 2026
9fa9582
chore: initial
Oct 5, 2026
74c21bb
TF-0MN1QCTMC07ATYMS: Implementation complete
Oct 5, 2026
94b2786
TF-0MUVK0K230013UC3: Implementation complete
Oct 5, 2026
31536a9
feat(pty): add CI-safe CLI shim directory for PTY PATH resolution
Oct 5, 2026
f1b9886
TF-0MUVC3DZ10089SAU: Implementation complete
Oct 5, 2026
36e8670
TF-0MUVK0MGO001P2OF: Implementation complete
Oct 5, 2026
4a8a1a9
TF-0MUV8YKFR002BIA2: Implementation complete
Oct 5, 2026
a13ea09
chore(web): add --host to Vite dev script for network access (TF-0MUV…
Oct 5, 2026
a819578
refactor: per-parameter override coverage harness (TF-0MUVK21BQ004E6ZO)
Oct 6, 2026
b843881
test: preserve inline node automation through validation (TF-0MUVK21Q…
Oct 6, 2026
53c6ea1
TF-0MMSYF0G20PY7GMB: Add stack-in-sequence recipe wrapper example
Oct 6, 2026
3603ab6
feat: wire built-in recipe parameters into synthesis (TF-0MUVK225D006…
Oct 6, 2026
68f3b04
feat: declarative file-backed override mappings (TF-0MUVK22K5002RR1R)
Oct 6, 2026
5bdeb2c
fix: honour file-backed derived parameters via declarative mappings (…
Oct 6, 2026
31fd01a
fix: schedule envelope release inside the render window (TF-0MUVK23CN…
Oct 6, 2026
9e1f68f
chore: empty KNOWN_UNWIRED allowlist and update docs (TF-0MUVK23RD008…
Oct 6, 2026
7f41633
Fix SoundEditor widget labels and pointer interaction (TF-0MUVMITO300…
Oct 6, 2026
62f7039
TF-0MN1LPT10146ZV57: Add ToneGraph namespace resolution support
Oct 6, 2026
ebc95bb
TF-0MN1LPT8D04L3SEN: Add byte-identical parity test for ui-scifi-confirm
Oct 6, 2026
8079f00
TF-0MOKJJI7N005LT61: Auto-select a free Playwright e2e port and docum…
Oct 6, 2026
3589cbe
TF-0MOKJJN42008FARS: Add CI job for the web Playwright e2e suite
Oct 6, 2026
1856c35
TF-0MMLC8PXU0D3O594: Implementation complete
Oct 6, 2026
4aa5b08
TF-0MMLC8B3T0Z1F7ZM: Implementation complete
Oct 6, 2026
5934fb0
TF-0MMLC8SQ302DVYOZ: Implementation complete
Oct 6, 2026
5d2d0bc
TF-0MUTZ4TOY003DJ45: Implementation complete
Oct 6, 2026
69abae7
Bump version to v0.1.2
Oct 6, 2026
023193d
Update CHANGELOG.md for v0.1.2
Oct 6, 2026
86852d0
Merge origin/dev into main (automated)
Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/web-playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Web Playwright E2E

# Runs the browser end-to-end suite (including the ToneGraph smoke test that
# proves at least one file-backed recipe is discoverable in the web bundle).
#
# The web server is started by Playwright itself (`node dist-server/index.js`);
# file-backed recipes are inlined into the client bundle at build time by the
# Vite `yamlRecipePlugin` + `import.meta.glob` in
# `web/src/browser-recipe-registry.ts`, so no separate static-asset copy step
# is required.
#
# Work item: TF-0MOKJJN42008FARS.

on:
push:
branches:
- dev
- main
paths:
- "web/**"
- "presets/**"
- "src/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/web-playwright.yml"
pull_request:
paths:
- "web/**"
- "presets/**"
- "src/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/web-playwright.yml"
workflow_dispatch:

# Cancel superseded runs for the same ref to keep CI minutes down.
concurrency:
group: web-playwright-${{ github.ref }}
cancel-in-progress: true

jobs:
web-e2e:
name: Web Playwright E2E
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: |
package-lock.json
web/package-lock.json

- name: Install root dependencies
run: npm ci

- name: Install web dependencies
run: npm ci --prefix web

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium firefox
working-directory: web

- name: Build web demo
run: npm run build
working-directory: web

- name: Run Playwright e2e
run: npx playwright test
working-directory: web
env:
CI: "true"

- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: web/playwright-report
retention-days: 14
if-no-files-found: ignore

- name: Upload Playwright test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: web/test-results
retention-days: 14
if-no-files-found: ignore
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ bin/
# Node / TypeScript
##################################
node_modules/
# Also ignore a symlink named exactly `node_modules` (no trailing slash):
# `phase_start` links the main checkout's dependency tree into each worktree,
# and a trailing-slash pattern does NOT match a symlink. Without this rule
# `git add -A` stages the symlink and pushes a self-referential link to dev,
# breaking every fresh checkout (TF-0MUUEZE48002CLBX).
node_modules
.implement_state.json
.port-skips
dist/
dist-server/
*.tsbuildinfo
Expand Down
34 changes: 34 additions & 0 deletions .toneforge/mixer/rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"version": "1.0",
"defaults": {
"maxVoices": 4,
"duckDepthDb": 6,
"uiDuckDurationMs": 200
},
"groups": {
"dialogue": { "priority": 100 },
"alerts": { "priority": 90 },
"ui": { "priority": 80 },
"combat": { "priority": 60 },
"footsteps": { "priority": 40 },
"ambience": { "priority": 20 }
},
"rules": [
{
"id": "combat-focus",
"when": { "state": "combat" },
"then": {
"duck": ["ambience"],
"boost": ["combat"],
"limit": ["ui"]
}
},
{
"id": "ui-clarity",
"when": { "state": "ui" },
"then": {
"duck": ["ambience", "footsteps"]
}
}
]
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## v0.1.2 (2026-10-06)
> **Release focus:** This release focuses on making the sound design system more flexible and reliable, letting you shape sounds with interactive controls, save and reuse custom recipes without rebuilding the game, and add recipes from any file location. It also adds smooth pitch sweeps for effects, network playtesting, and preset browsing, alongside fixes for audio glitches, session saving, and automated tests.
### Features
- Shape sounds with sliders, dials, and touchpads, then hear changes instantly. (TF-0MUTZ4TOY003DJ45)
- Sound effects can now sweep smoothly up or down in pitch, like laser zaps and explosions. (TF-0MUV8YKFR002BIA2)
- You can now save custom recipes that persist across sessions and use them in any future run. (TF-0MUVC3DZ10089SAU)
- You can now add custom sound recipes from any file location without editing the game's code. (TF-0MUUC9RTU008UJ18)
- Recipes can now be added or tweaked without rebuilding the game. (TF-0MMZIW9NQ09MV98G)
- Improved session saving reliability so your progress is preserved more consistently. (TF-0MN1QCTMC07ATYMS)
- Easily browse available sequence and stack presets right from the command line. (TF-0MMSXILP20HEKXT2)
- Playtest the game from other devices on your network. (TF-0MUVUWN0A006EEBT)
- You can now reuse layered sound stacks inside sequences without rebuilding them. (TF-0MMSYF0G20PY7GMB)
### Bug Fixes
- Fixed browser audio rendering and terminal command issues so tutorial tests pass reliably. (TF-0MUVBX24I000ST03)
- Fixed an occasional audio glitch that could cause sound effects to play incorrectly. (TF-0MUURP3KD00724BM)
- Fixed a setup issue that was preventing the game's automated tests from running. (TF-0MUUELBUD002OEQ8)
- Sound controls now show labels and respond to click-and-drag. (TF-0MUVMITO30059E7U)
- All sound parameters now actually change the audio when adjusted. (TF-0MUV9U9QU001SORH)
### Other
- ToneForge audio is now properly licensed, ensuring reliable sound in the game. (TF-0MUTVQSI6003VPAD)
- Recipes now produce different results each time you play. (TF-0MN1TS9661DEIXH0)
- Removed an unused audio library, making the game download smaller and faster to install. (TF-0MUUYLVHZ002FRYE)

## v0.1.1 (2026-10-04)
### Features
- Generate a wider variety of game sounds, like lasers, footsteps, chimes, and wind. (TF-0MLXF74KE17SQKAD)
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 ToneForge

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.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ToneForge lets developers generate placeholder sounds from recipes and seeds dur

## What It Does

- **Generate** -- Procedural and sample-hybrid sound synthesis via Tone.js
- **Generate** -- Procedural and sample-hybrid sound synthesis via the Web Audio API (browser-native, with optional offline rendering in Node.js)
- **Compose** -- Layer multiple sounds into stacks with per-layer gain, pan, and sample-accurate timing
- **Sequence** -- Schedule sounds into temporal patterns with state-driven transitions and probabilistic variation
- **Analyze** -- Extract audio features (envelope, spectral, loudness, transient) in batch
Expand Down Expand Up @@ -59,6 +59,22 @@ Starts the backend server and Vite dev server:
npm run dev:web
```

### Browser support

ToneForge is Runtime-aware: the Runtime, renderer, and recipe registry run in
the browser using the native Web Audio API. `node-web-audio-api` is an optional
dependency used only for offline rendering in Node.js and is never bundled into
browser builds. See [Using ToneForge in the Browser](docs/browser-usage.md) for
installation, the Runtime API, and recipe-rendering examples.

### Web demo — CI-safe CLI in the PTY

The web demo spawns a terminal PTY for the frontend to execute CLI commands.
To make `toneforge` and `tf` resolvable inside that PTY without a global
`npm link`, the server prepends a shim directory (`bin/tf-shim/`) to the
PTY `PATH` at startup. The shim scripts delegate to `bin/dev-cli.js`, so the
commands work in CI and on any machine.

### Troubleshooting

In CI, the postinstall step skips linking automatically. If linking is unavailable locally (permissions/restricted environments), you'll see a non-failing message and can use the loader script directly:
Expand All @@ -72,8 +88,8 @@ The `docs/prd/` directory contains detailed product requirements documents for p
## Planned Tech Stack

- JavaScript / TypeScript
- [Tone.js](https://tonejs.github.io/) (Web Audio API)
- Offline rendering via `Tone.Offline`
- Native [Web Audio API](https://developer.mozilla.org/docs/Web/API/Web_Audio_API) in the browser
- Offline rendering via `OfflineAudioContext` (browser-native, or `node-web-audio-api` in Node.js)
- WAV export
- JSON configuration for presets, stacks, sequences, and library entries
- npm distribution
Expand Down Expand Up @@ -111,9 +127,12 @@ toneforge library add --input sound.wav --tags "weapon,laser"

- [System Architecture PRD](docs/prd/PRD.md)
- [Core Module PRD](docs/prd/CORE_PRD.md)
- [ToneGraph v0.1 Specification](docs/tonegraph.md)
- [Browser Runtime Usage](docs/browser-usage.md)
- [Mixer Rules](docs/mixer-rules.md)
- [All Module PRDs](docs/prd/)
- [Research Questions](docs/prd/BRAINSTORM_QUESTIONS.md)

## License

TBD
ToneForge is released under the [MIT License](LICENSE).
8 changes: 8 additions & 0 deletions bin/tf-shim/tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# CI-safe tf CLI shim.
# Locates the project root relative to this script and delegates to
# bin/dev-cli.js, preserving all arguments.

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
exec node "$PROJECT_ROOT/bin/dev-cli.js" "$@"
8 changes: 8 additions & 0 deletions bin/tf-shim/toneforge
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# CI-safe toneforge CLI shim.
# Locates the project root relative to this script and delegates to
# bin/dev-cli.js, preserving all arguments.

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
exec node "$PROJECT_ROOT/bin/dev-cli.js" "$@"
Loading
Loading