Last updated: March 14, 2026
Status: Advanced prototype, playable, under continuous tuning
Target: desktop browser (WebGL + Web Audio)
Sonic Sphere is a contemplative sonic exploration experience on a spherical surface.
The player has no gameplay goals: they explore, listen, and traverse regions with distinct timbral identities and weather transitions that transform the global mix.
| Component | Technology | Notes |
|---|---|---|
| Runtime | TypeScript + Vite | real-time loop, systems orchestration |
| Audio | Tone.js / Web Audio API | multi-engine synthesis + weather FX chain |
| Spatial Audio | Tone.Panner3D | 3D source positioning |
| Rendering | Pixi.js (WebGL) | high-performance abstract visuals |
| Persistence | localStorage | position, heading, world epoch |
Main scripts:
npm run devnpm run buildnpm run preview
- Artistic start/pause overlay with click-to-enter.
- No debug/performance HUD on screen.
- State persistence between sessions.
- Continuous cruise movement with always-on steering gizmo.
Click/ tap on the sphere: set the steering directionA/D(and left/right arrows): rotate the steering gizmoESC: pause/resume- Overlay click: start/resume audio
- Sphere radius:
SPHERE_RADIUS = 200 - Audible radius:
HEARING_RADIUS = 52 - Geodesic movement with local heading.
- Pole anti-singularity clamp (
±89.5°).
- Sources slowly oscillate around an equilibrium position.
- Pseudo-uniform spatial distribution (Fibonacci-like with jitter).
- Deterministic PRNG for repeatable world layout.
- Unique detune per archetype clone to reduce perceived tonal duplication.
Density is driven by PERFORMANCE_BUDGET.world.densityMultiplier:
BASE_SOURCE_COUNT = max(180, round(240 * density))RHYTHMIC_EXTRA_SOURCE_COUNT = max(120, round(180 * density))SOURCE_COUNT = BASE + RHYTHMIC_EXTRA
Typical values by tier:
high: ~1260 sourcesbalanced: ~945 sourceslow: ~672 sources
Each archetype uses one of the following engines:
subtractive(default): osc + sub + optional air oscillatornoise: colored noise sourcefm:Tone.FMOscillatorresonator: noise excitation + feedback comb filter
- Total archetypes: 132
- Archetypes with
mode: 'rhythmic': 66 - Explicit engines:
noise: 8fm: 4resonator: 4- remaining in
subtractive(default)
In SphereWorld, generation uses weights to avoid strong imbalances:
- Base pool:
subtractive 0.55,noise 0.15,fm 0.15,resonator 0.15 - Rhythmic extra pool:
subtractive 0.5,noise 0.15,fm 0.175,resonator 0.175
- Generated zones:
DEFAULT_ZONE_COUNT = 28 - Simultaneously active zones: max
3 - Simultaneously strong zones: max
2(+1 background) - Types:
mist,echo,ion - Influence computed with core + feather + smoothstep
- Slow drift on lat/lon (world alive over time)
This matches the discussed aesthetic direction: max 2 strong + 1 background.
Weather modifies the global FX chain:
- pre-FX
highpass+lowpass bandpassbranch with fast sweep (LFO)FeedbackDelayJCReverb- dry/wet crossfade with controlled dry attenuation
- final limiter
- Organic per-zone delay (slow parametric oscillation).
- Stabilization with step quantization and hold time.
- More perceptible yet controlled transitions (reduced zipper/click).
Three full presets are available:
subtleexperimentalextreme
Active selector:
ACTIVE_WEATHER_FX_PROFILEinsrc/engine/WeatherZoneEngine.ts
Current default: experimental.
Each preset modifies:
- zone weights and roles
- FX bias by weather type
- boost in overlap (2-3 zones)
- final FX multipliers
- delay quantization
- temporal smoothing
- audio runtime response/limits (aligned in
AudioEngine)
Layer order (bottom -> top):
- background
- world/sonic zones
- weather zones
- player trail
- graticule
- world horizon
- source glyphs
- ring overlay
- compass
- player dot
- Weather colors are separate from the audible-zone palette.
- Distinct palette per type (
mist/echo/ion). - High transparency.
- Overlap with additive blending (
blendMode = 'add') for pleasant color summation.
Shape -> engine mapping:
subtractive: circlenoise: trianglefm: squareresonator: hexagon
Shapes are used for glow/body/core/ring (not only on the core). In addition, each engine has its own animation profile (breath/ring/pulse) for immediate recognizability.
PerformanceBudget selects high | balanced | low using:
hardwareConcurrencydeviceMemory- user-agent (more conservative on Windows)
Available overrides:
- query param
?perfTier=high|balanced|low localStoragekeysonicsphere.perfTier
Main parameters by tier:
targetMaxActiveSourcesminMaxActiveSourcesmaxNewStartsPerFrame- loop rates (
worldHz,weatherHz,renderHz) - renderer quality (
pixelRatioCap,antialias) - synth options (air osc, timbre LFO, panning model)
Active measures:
- adaptive voice quota with release hysteresis (
ACTIVE_RELEASE_MARGIN) - per-frame start limit (
maxNewStartsPerFrame) - smoothing on source gain/position
- audio guard on weather blend application:
- minimum update interval
- minimum delta thresholds
- slew-rate limit for sweep range
- differentiated ramp times for critical parameters (delay/reverb/LFO)
- master output limiter
- Performance HUD fully removed.
- Weather debug overlay removed.
- Performance status remains trackable via console logs and budget parameters.
The main loop uses separate-step updates:
- world update
- weather update
- rendering update
Each step uses accumulators and target frequencies from PerformanceBudget.
Player persistence every 5 seconds + visibilitychange/pagehide/beforeunload events.
Storage key: sonicsphere-v1
Saved data:
playerPositionplayerHeadingworldEpochMslastSeenAtMs
worldEpochMs keeps oscillatory evolution coherent across sessions.
src/engine/WeatherZoneEngine.ts- weather presets (
subtle/experimental/extreme) - zone blending, overlap boost, delay quantization, smoothing
- weather presets (
src/engine/AudioEngine.ts- audio profiles aligned with weather presets
- limits, ramps, anti-glitch guards
src/engine/SphereWorld.ts- source density, engine distribution, adaptive voice cap
src/audio/SourceSynth.ts- timbral engine implementation
src/render/WorldView.ts- additive weather palette
- engine shape mapping
- per-engine glyph animation profiles
src/engine/sphereMath.tsSPHERE_RADIUS,HEARING_RADIUS
src/engine/PerformanceBudget.ts- auto-tier and budget by hardware
- Added weather zones that process the global mix.
- Boosted delay/reverb/band-pass sweep with a more experimental character.
- Stabilized delay time with quantization + hold in weather transitions.
- Added weather-zone color distinction with additive overlap blending.
- Fixed/mitigated click causes with smoothing, guards, and voice management.
- Completely removed performance HUD and related runtime code.
- Added visual encoding for audio engines with dedicated shapes.
- Added per-engine animation profiles (ring/pulse/breath).
- Reduced world sphere radius from 250 to 200.
- Introduced weather presets
subtle / experimental / extremewith quick switching.
- Current aesthetic vision: contemplative with more expressive weather zones.
- Active profile for testing:
experimental. - Compatibility direction: prioritize audio stability on less powerful machines.