Repository navigation
EN Create Sound Effects
Français · Type: reference · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.2.5
A game names its sounds by id in audio.sfx and plays them with the sfx command ({ sfx: 'door_open' }). This page
is the reference of the recipes that synthesise them from the shared Mega Drive palette (sfx.json), of how
npm run assets ships them, and of captions for players who cannot hear them.
The sound effects follow the rules of the music (Music in stems), the ones that concern them:
-
One palette. Every effect builds from
tools/audio/palette.json, the same FM patches, PSG envelopes and noise as the music, so a door and the theme sound like one game. A missing sound is a new patch in the palette (with adesc), never an ad-hoc patch; a patch shipped sounds rely on is not edited (add one, or bumpversion). -
The rendered files are committed:
audio/sfx/*.mp3andsfx.json. The build folder (.sfx-build) is removed after each run. -
Sources. An effect you did not synthesise (a recording, a sound bank) must be yours, in the public domain, or
under a licence that allows a derived work; say where it comes from in
CREDITS.mdand in the game's provenance (Asset provenance).
games/<id>/audio/sfx.json holds one recipe per effect id of audio.sfx. In the engine repository, at its root:
# in the engine repository
npm run audio -- sfx games/<id>/audio/sfx.jsonrenders them to games/<id>/audio/sfx/<id>.mp3: the trailing silence trimmed, the peak normalised, a 10 ms fade at
the end. --only door_open latch renders some of them; --out <dir> writes elsewhere. A created project has no
audio command: render the effects in a clone of the engine repository and copy the .mp3 files into the project's
game/audio/sfx/.
A recipe is a few rows of one or more channels at 60 rows per second, with the palette's instruments:
"door_open": { "desc": "a latch, then a wooden creak", "rows": 40, "tracks": [
{ "ch": "NOISE", "ins": "noise_hat", "events": [{ "row": 0, "note": "C6", "vol": 12 }] },
{ "ch": "FM1", "ins": "muted_pluck", "events": [{ "row": 3, "note": "D2", "vol": 118, "fx": [["01", "03"]] }, { "row": 28, "off": true }] }
] }The recipes sit under "sfx" in the file, beside "rate" (rows per second, default 60) and an optional "palette"
(a palette file relative to sfx.json; default the shared one).
| Field | Form | Default |
|---|---|---|
desc |
what the sound is, in words | none |
rows |
the length in rows (the trailing silence is trimmed anyway) | 32 |
tracks[].ch |
a channel: FM1…FM6, PSG1…PSG3, NOISE
|
required |
tracks[].ins |
a palette instrument, for the whole track | none |
events[].row |
the row the event falls on | required |
events[].note |
a note name (C6) or a MIDI number |
none |
events[].ins |
an instrument for this event only | the track's |
events[].vol (or tracks[].vol) |
FM 0–127, PSG 0–15 | the instrument's |
events[].fx |
hex pairs: 01 / 02 pitch slide up / down, 00xy arpeggio, 04xy vibrato, 0Axy volume slide, EDxx delay |
none |
events[].off |
a note off | none |
gain |
the peak after normalisation | 0.9 |
The render stops on a recipe it cannot play, naming it: <id>: unknown channel <ch>, <id>: <ch> row <r> needs an instrument, <id>: event at row <r> beyond length <rows>, <id>: <ch> row <r>: more than 4 effects.
The sample game's sfx.json covers the usual vocabulary of an adventure game:
click, select, success, error, door_open, door_close, latch, coins, cloth, paper, ring, drop,
bell, glass, metal, shuffle, chips, pluck, bong. Copy it into a new game and keep the ids: the sample
games' content uses them, so rules you copy from them keep their sound.
The engine itself plays no sound by a fixed id. The sounds it plays on its own are the ones the game names in
skin.sounds (phone, plane, confetti, jingle, end; see Skin and fonts), and a
minigame plays the ids its parameters name.
A sound that matters gets a caption, shown in writing for whoever cannot hear it, and translated like any line:
{ sfx: 'door_slam', caption: '[A door slams upstairs]' }The captions setting is on by default, and the Settings menu offers it only in a game that captions some sound.
npm run assets (in the engine repository, or in a created project) prepares every sound the content cites:
| What | Default source | Output | Encoding |
|---|---|---|---|
| music | games/<id>/audio/music/<file> |
public/assets/audio/music/<file> |
96 kb/s, stereo |
| sound effects | games/<id>/audio/sfx/<file> |
public/assets/audio/sfx/<file> |
128 kb/s, mono |
| voices | games/<id>/audio/voice/<file> |
public/assets/audio/voices/<file> |
64 kb/s, mono |
In a created project the folder is game/ instead of games/<id>/. Only what changed is encoded again.
games/<id>/sources.json replaces these patterns ({file} is the file named in audio):
- a pattern can be a list of candidates tried in order, and set its own bitrate:
"sfx": ["private/audio/sfx/{file}", { "path": "private/audio/{file}", "rate": "64k" }]; - a requested
.mp3can come from an.oggof the same name; - a sound with no source but already present in
public/assetsis kept as it is; - a sound with neither is reported missing (
sfx:<id>=<file>) and the game plays silence in its place.
The image side of sources.json (patterns, overrides) is on Images.
-
audio.sfx, thesfxcommand and itscaption,skin.sounds. -
npm run audio -- sfx,npm run assets,games/<id>/sources.json. - Music in stems, Voices, Audio toolchain.
Generated publication · publication générée — current documentation · documentation courante: quest'n'click 4.4.0 r1, documentation revision · révision de la documentation 8dc717c69acb62c4742b69c54a7e7dfb620f75d8.
Earlier versions and permalinks · versions précédentes et liens permanents: https://wanoo.github.io/quest-n-click/docs/
An edit made in this wiki is overwritten at the next publication · une modification faite dans ce wiki est écrasée à la publication suivante.
Edit the source · Modifier la source · Report an error · Signaler une erreur
Index (6)
Start (6)
Play (9)
Install (17)
- Requirements
- Install from the release archive
- Install from npm, once published
- Install from the repository to work on the engine
- doctor: checking your machine
- Image toolchain
- Audio toolchain: ffmpeg, fluidsynth, Furnace, uv
- Upgrade
- Upgrade notes: 4.4
- Upgrade notes: 4.3
- Upgrade notes: 4.2
- Upgrade notes: 4.1
- Upgrade notes: v3
- Upgrade notes: v2 to v3
- Coming from web-scumm
- Package reference
- Install troubleshooting
Create a game (55)
- Your first game
- Layout of a created project and of the engine repository
- The working loop
- Content principles and the identity contract
- Rooms
- Geometry: placement, walk zones, masks, layers, camera
- Something is visible but unreachable
- Reactions
- Game commands
- Conditions
- Flags, variables and events: which to use
- Custom code
- Characters
- Items and inventory
- World map
- Dialogues
- Scripts and events
- Moving characters: patrols and walks
- Exits
- Chapters and objectives
- State and saves: persistent or temporary, renaming an id, migrations
- Staging: wide rooms and animations
- The stage: lights, particles, floors
- Skin and fonts
- Title and credits
- Heroes: several characters and hero choice
- Built-in minigames
- A custom minigame
- Translations
- Music in stems
- Sound effects
- Voices: per language and per hero
- Images: prompts, cutting sheets, transparency, scale
- Asset provenance
- The storyboard, source of truth
- Puzzle design
- Classic mechanics
- Review pages
- DSL reference
- Checking your game
- What the solver proves
- Solver options
- Playtests
- Remix
- Speedrun for authors
- The sealed ending
- Production template
- Example games
- Working with an AI
- Build and release a game
- Publish on GitHub Pages
- The static game on Clever Cloud
- Other static hosts
- Sub-path, cache and service worker, incomplete deploys, going back
- Testing on a phone over the LAN
Local Studio (24)
- The local Studio: overview and launch
- Edit a room
- Placement and stage
- Preview, apply, undo
- Storyboard
- Assets and cutting
- Check: validator, solver, critical path, heat, health, coverage
- Before and after captures
- Semantic diff
- Play and replay a session
- Rule explainer
- Language and objectives
- Voices and the heroes × languages matrix
- Map
- Notes
- Remix in the Studio
- Music
- The Assistant: bring your own key
- Demo mode and studio-apply
- Local and LAN security
- Studio API
- Local MCP: setting up each client
- MCP tools
- Studio troubleshooting
Team Studio (21)
- What runs where
- Concepts: revision, transaction, span, lease, preview, build
- Starting as an invited dev
- Working together day to day
- Roles and actions: the full matrix
- Invitations
- Managing members
- Write refused on the hosted Studio: stale base revision (409)
- Write refused on the hosted Studio: span locked (423)
- Recovering after a lost lease, a disconnection or a stale preview
- Comments
- Map and semantic diff
- Publishing builds
- Remote MCP
- The game in Git
- Upgrading the engine of a hosted game
- Hosted assets
- The server's command line
- Health and metrics routes
- Trying it locally with compose.yml
- Known limits
Clever Cloud (23)
- Clever Cloud: overview, cost and prerequisites
- Apps and add-ons
- Domains and TLS
- Keycloak
- Generic OIDC and GitLab
- Configuration
- First deployment
- Backups
- RPO and RTO
- Restore the Studio on a fresh installation
- Redeploys
- Upgrading the server and checking state after a migration
- Limits of going back
- Monitoring
- Security
- Rotating keys
- Recovering admin access
- Changing domain or OIDC provider
- Worker, PostgreSQL or Cellar down
- Exporting the game and leaving the installation
- Retention
- Clever Cloud troubleshooting
- Costs and teardown
Reality Bridge and connectors (16)
- The Reality Bridge: what it is
- Quick start
- Guarantees
- Install and run the Bridge
- Backup and restore
- Several tenants
- Signals and the manifest
- The Bridge's command line
- Connectors overview
- Email connector
- Telnet connector
- SSH connector
- Open Badges connector
- The connector SDK
- Security: Biscuit and signatures
- Bridge and connector troubleshooting
Contribute (25)
- Welcome
- Developer setup
- The dev loop
- Before a pull request
- Conventions
- Writing documentation
- Architecture
- Code tour
- Import boundaries
- Which tests run when
- Mutation testing
- The coverage ratchet
- The quality baseline
- CI explained
- Field passes
- Benchmarks
- Releasing
- npm packages
- Decisions and ADRs
- Governance
- Bot pull requests
- Contributing with AI agents
- Security policy
- Code of conduct
- Licences and credits