A desktop application prototype recreating Dolby Axon-style spatial voice chat functionality. Built with Electron, SolidJS, and Web Audio API.
Clippi's tent demonstrates spatial audio positioning where sound sources have virtual positions in a 2D room. The listener (you) can move around, and audio volume/panning adjusts based on:
- Distance attenuation β Sounds get quieter as they move further away (linear, inverse, exponential models)
- Stereo panning β Sounds pan left/right based on horizontal position relative to the listener
- Directional audio β Speakers have directivity patterns (cardioid, omnidirectional, supercardioid, hypercardioid, figure8, hemisphere)
- Wall occlusion β Sound attenuates when passing through room walls
- Max distance cutoff β Configurable maximum hearing range with smooth falloff
- Rear gain floor β Minimum audibility for sounds behind the listener
- Draw rooms by switching to draw mode and clicking/dragging
- Multiple speakers with configurable directivity patterns and frequencies
- Switch perspective β Double-click any speaker to "become" them
- Real-time audio with test tones (oscillators) or microphone input
- Visual feedback β Sound cones, gain bars, and optional sound path lines
- Room boundaries with configurable wall attenuation
- Configure audio devices (input/output)
- Theme selection (light/dark/system)
- Language preferences
- Audio processing options (echo cancellation, noise suppression)
| Component | Technology |
|---|---|
| Desktop Framework | Electron 40 |
| Build System | Vite + Electron Forge |
| UI Framework | SolidJS + @solidjs/router (lazy loading) |
| Styling | CSS Modules + CSS Custom Properties |
| Audio | Web Audio API (oscillators, stereo panner) |
| Testing | Vitest + Playwright |
| Package Manager | pnpm (workspace monorepo) |
- Node.js 18+
- pnpm (
npm install -g pnpm)
# Clone the repository
git clone https://github.com/Omi/clippis_tent.git
cd clippis_tent
# Install dependencies
pnpm install
# Start development server
pnpm dev| Command | Description |
|---|---|
pnpm dev |
Run in development mode with hot reload |
pnpm build |
Package the app for distribution |
pnpm make |
Build platform-specific installers |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Run ESLint with auto-fix |
pnpm typecheck |
TypeScript type checking |
pnpm check |
Run both typecheck and lint |
pnpm test |
Run all unit tests |
pnpm test:watch |
Run tests in watch mode |
pnpm test:ui |
Run UI component tests only |
pnpm test:all |
Run unit tests + E2E tests |
pnpm e2e |
Run Playwright E2E tests |
pnpm e2e:ui |
Run E2E tests with interactive UI |
pnpm e2e:headed |
Run E2E tests with visible browser |
pnpm clean |
Remove build artifacts |
The project has comprehensive test coverage:
- Spatial audio library (
src/lib/spatial-audio*.ts) β Distance, panning, directivity, and wall attenuation calculations - Custom hooks (
src/lib/hooks/) β Room, speaker, audio playback, microphone, and drawing hooks - UI components (
packages/ui/) β All components tested with@solidjs/testing-library - E2E tests (
e2e/) β Critical user flows with Playwright
# Run all tests (275 unit tests)
pnpm test
# Run E2E tests (19 tests)
pnpm e2eThis is a pnpm workspace monorepo with UI components and types extracted into reusable packages.
clippis_tent/
βββ packages/
β βββ ui/ # @clippis/ui - Reusable UI component library
β β βββ src/components/
β β βββ Button/ # Button with variants
β β βββ ColorSwatches/ # Color picker grid
β β βββ FormField/ # Input, dropdown, slider fields
β β βββ ItemList/ # Selectable list
β β βββ Panel/ # Card container
β β βββ Section/ # Card with title
β β βββ SelectField/ # Dropdown
β β βββ Slider/ # Range input
β β βββ Speaker/ # Draggable speaker with cone
β β βββ Tabs/ # Tab navigation
β β βββ Toast/ # Notifications
β β βββ Toggle/ # Checkbox with description
β β βββ ErrorBoundary/ # Error boundary
β βββ types/ # @clippis/types - Shared TypeScript types
βββ src/
β βββ main.ts # Electron main process
β βββ preload.ts # Preload script for IPC
β βββ renderer.tsx # App entry with lazy-loaded routes
β βββ components/
β β βββ ui/ # App-specific UI wrappers
β β βββ audio/ # Audio components
β β β βββ FullDemo/ # Main spatial audio playground
β β β βββ context/ # SolidJS context (composes hooks)
β β β βββ components/ # Modular sub-components
β β β βββ constants.ts
β β β βββ utils.ts
β β βββ layout/ # Layout components
β βββ pages/ # Route pages (lazy-loaded)
β β βββ Tent.tsx # The Tent - spatial audio playground
β β βββ Settings.tsx # Audio settings page
β βββ stores/ # Global state (SolidJS signals)
β βββ lib/ # Core libraries
β β βββ spatial-audio.ts # Spatial audio math utilities
β β βββ spatial-audio-engine.ts # Advanced audio engine
β β βββ hooks/ # Reusable SolidJS hooks
β β β βββ useAudioPlayback.ts # Audio node lifecycle
β β β βββ useMicrophone.ts # Microphone access
β β β βββ useRoomManager.ts # Room CRUD
β β β βββ useSpeakerManager.ts # Speaker CRUD + perspective
β β β βββ useCanvasDrawing.ts # Draw mode interactions
β β β βββ useDragHandler.ts # Drag/rotate interactions
β β βββ i18n.tsx # Localization
β βββ locales/ # Translation files
βββ docs/
βββ TECHNICAL_ROADMAP.md # Development roadmap & HRTF plan
The spatial audio system uses a 2D model with advanced features:
βββββββββββββββββββββββββββ
β β
β π€ Sound Source β
β position, facing β
β directivity pattern β
β β β
β distance + walls β
β + directivity β
β β β
β βΌ β
β π§ Listener (You) β
β position, facing β
βββββββββββββββββββββββββββ
Volume = distanceAttenuation Γ directivityGain Γ listenerDirectionalGain Γ wallOcclusion Γ masterVolume
Pan = calculateStereoPan(listener, source, listenerFacing)
See docs/TECHNICAL_ROADMAP.md for the detailed technical roadmap.
- Electron + SolidJS + Vite setup
- UI library extraction to
@clippis/uipackage - Spatial audio engine with distance models and directivity patterns
- Interactive room drawing with wall occlusion
- Multiple speakers with configurable properties
- Perspective switching (become any speaker)
- Modular component architecture with SolidJS Context and hooks
- Comprehensive test coverage (275 unit + 19 E2E)
- Microphone input capture with permissions
- Audio source switching (oscillator/microphone)
- Voice activity detection (VAD)
- Push-to-talk mode
- Audio level meters / visualizers
- HRTF β Migrate from StereoPanner to PannerNode for true 3D audio
- Room acoustics β Reverb and early reflections
- Audio quality settings β Bitrate, sample rate options
- WebRTC peer-to-peer connections
- Signaling server for room coordination
- User avatars with position sync
- Proximity-based audio routing
MIT