Skip to content

14. Appendix

14.1 config.json field reference

What Export writes and the engines read. Optional blocks are simply absent when disabled — engines assume the safe default.

Top level

Key Type Meaning
version string Config schema version
project string Project display name
audio_format string Primary codec hint — the format picked first in the export dialog: ogg, mp3, opus, aac, wav, flac, aiff
bpm number Informational — the project tempo at export. Each music event carries its own bpm; an event without one defaults to 120 in both engines
sample_rate int Informational; engines read real rates from audio headers
groups array {name, volume, events[]} — volume is linear (1.0 = 0 dB)
events object Event definitions, keyed by safe name (lowercase; spaces and unsafe filename characters become _)
reverb_zones object (optional) {default_zone, zones{name → {room_size, decay, damping, wet, dry, spread, hipass, predelay_ms, predelay_feedback, godot{room_size, damping, wet, dry, spread, hipass}}}} — absent = no reverb bus. The web engine reads decay and predelay_ms (Godot has no such knobs, ch. 8.3); Godot reads dry, spread and the godot override; predelay_feedback is written but unused
master_volume number (optional) Master fader gain (ch. 9.2), linear; written only when ≠ 1.0 — engines assume 1.0 when absent

Every event

Key Notes
type "music" or "sfx"
volume Linear event gain
levels [{name}, …] — index = what set_level() takes
tracks See Track below
start_fade / release_fade {duration, curve}; absent/0 = instant (with engine anti-click)
spatial (optional) see below
reverb (optional) {enabled, send}
intensity (optional) see below

Music events add: bpm, time_signature [num, den], fade_duration, fade_curve, switch_quantization (level-switch defaults), use_nodes + node_graph (advanced mode), sub_levels — {level_index → [{name, volume, tracks[]}]}, each sub track in the Track shape below.

SFX events add: cooldown_ms, max_instances, loop {enabled, mode: "seamless"|"smart"}.

Track

Key Notes
name, volume
level_behavior "level_specific" (per-level sample sets) or "always_play" (one shared set)
levels map level_index → {samples[], clips[], loop_bars?, switch_chance, play_chance}
samples / clips at track root instead, when always_play
loop_bars Musical loop length — computed at export from the clip at the event's BPM
randomization SFX: {pitch, rate, delay, volume} each {enabled, min, max}; a pan block is written in the same shape but reserved — no player applies it
repeat_count, chance_reroll_bars Variation hold count; loop cycles between play/silence re-rolls (legacy key name — it counts loops, not bars)
randomization_algo "random" | "weighted" | "no_repeat" (variation switching)
play_chance_mode "true_random" | "weighted_history" | "shuffle_bag" (dice behavior)
chance_fade_mode, chance_fade_duration "instant" | "fade" + seconds

Clip

{source_offset, source_play_length, loop_mode: "loop_source"|"one_shot", fade_in, fade_out, volume, weight} — after export volume is 1.0 (baked into the audio, ch. 11.2); weight feeds weighted variation picks. Inside a stinger bundle the same clip record is written, but both engines read only volume and weight there — trim and fades are reserved fields on a stinger clip, and a stinger clip's volume is applied at fire time, not baked (ch. 11.2).

Spatial block

"spatial": {
  "enabled": true, "mode": "2D"|"3D",
  "model": "inverse"|"linear"|"exponential",
  "min_distance": 1.0, "max_distance": 50.0, "rolloff": 1.0,
  "panning_model": "equalpower"|"HRTF", "max_pan": 1.0,
  "doppler": 0.0,
  "lpf_enabled": true, "lpf_cutoff_hz": 5000.0, "lpf_db": -24.0,
  "godot": {
    "mode": "2D"|"3D",
    "model": "inverse"|"inverse_square"|"logarithmic"|"linear",
    "min_distance": 2.0, "max_distance": 4.0, "rolloff": 1.0, "max_pan": 1.0
  }
}

Flat keys are the canonical (Web) character; the optional godot object is the per-platform override authored on the Godot tab (ch. 7.4). It exists only once that tab has been edited, and then carries exactly these six keys: mode, model (Godot's native attenuation models — linear is the plain fade to silence at max_distance), min_distance, max_distance, rolloff and max_pan. Export writes all six every time; a key the tab did not set is filled from the flat value of the same name (model from inverse). The Godot engine reads the object in place of the flat keys — an older config without it uses the flat keys, mapping the web model to the nearest native one — and the web engine ignores it. Runtime merge order: engine defaults ← event block ← game-side override; the game itself passes only positions.

Intensity block

"intensity": {
  "enabled": true,
  "vol_db": [-18.0, 0.0], "vol_curve": "exponential",
  "pitch_st": [0.0, 0.0], "pitch_curve": "linear"
}

Node graph (flattened by export)

node_graph.entry_node + nodes{} + connections[]. Loop nodes carry id, name, type, level_index, duration_bars, loop_count (0 = ∞), per-section bpm / time_signature / free_tempo (from Tempo nodes), restart_on_entry, trigger, optional entry_fade / terminal_fade (dangling fade nodes, ch. 6.4 — each {fade_duration, fade_curve}). Every connection carries id, source, target, conn_type and, on a transition, trigger, auto, probability, priority; the id names the road — A>B for a direct edge, A>B|X through transition node X, C>B|FO+FI for a serial chain — and the engines key the road's stinger bundle and its no-repeat history by it, so each direction of a bidirectional transition and each road between the same pair keeps its own; connections flattened from a fade node additionally carry fade_duration, fade_curve, quantize, kind, fade_direction and an optional embedded stinger {samples, clips, volume, play_chance, mode}; a flattened fade_out → fade_in chain adds entry_fade_duration / entry_fade_curve for its entry half. One connection per road: two transition nodes between the same two sections give two connections, and the engine picks between them by priority, then probability (ch. 6.4). A direct section-to-section edge carries none of the fade fields — the engines fall back to the event-level fade_duration / fade_curve / switch_quantization for it.

Enums

Where Values
Fade curves linear, equal_power, s_curve, exponential, logarithmic
Quantize bar, beat, instant
Transition kinds crossfade, fade_in, fade_out
Directions both, forward, reverse
Loop (SFX) seamless, smart
Clip loop loop_source, one_shot

Defaults when a block is absent

Absent Engines assume
spatial A flat trigger() plays dry and centered; the positioned calls (trigger_spatial* / triggerSpatial, emitters) use the engine's default spatial character
reverb No send
intensity Full-strength triggers
loop (SFX) One-shot
reverb_zones No reverb bus at all
godot override Godot mirrors the flat (Web) values

14.2 Keyboard shortcuts

Context Shortcut Action
Main Space / Esc Play–stop / stop
Main Cmd+S / Cmd+Shift+S / Cmd+O Save / Save As / Open
Main Delete/Backspace Remove selected track (track list focused)
Timeline Ctrl+wheel Zoom 1–8×
Node editor +/= · − · 0 Zoom in · out · fit
Node editor Space Play / Stop
Node editor Delete/Backspace Delete node / connection
Faders & sliders Double-click Reset (0 dB / 100% / 2.0 s)

14.3 .pfabank in one box

A 64-byte header (PFABANK magic, version, UIDs, section directory) + a JSON section (the entire config, plus an _audio_entries index of path → {offset, length, codec}) + a DATA section with all audio files 16-byte aligned. Codecs: 1 = OGG, 2 = MP3, 3 = WAV, 4 = Opus. One fetch, one parse, zero per-file requests — built for web loading (ch. 11.4).

14.4 Engine parity notes

  • Both engines read the same config; the same export drives web and Godot builds.
  • Web extras: HRTF panning option (3D), reverb send scales as send × zone wet.
  • Godot extras: native attenuation models on the spatial Godot tab; zone wet level comes from the zone (send switches routing); optional SFX→WAV export path for one-shot latency (ch. 11.3).
  • Authored once, platform overrides only where the platforms genuinely differ (spatial Godot tab, reverb zone Godot tab) — the ↺ Follow Web buttons re-link to the canonical character.
  • Editor preview limits are listed in ch. 9.1 — spatial, reverb DSP and intensity between its endpoints are auditioned in-game (demo games / Live Connect); everything else is auditioned in Studio as the game will play it, with the differences ch. 9.1 lists (seam curves, the Godot one-shot window end, first-visit dice, sub switches, a click's route, and the four arbitration cases — the section that already plays requested while a switch waits, a second Stop, an interrupted terminal fade, a section entered from itself).