A collaborative web-based music creation app where multiple users can play notes from shared chord progressions to create ambient soundswarms together.
- Collaborative Ambient Drones - Share a link with friends and everyone gets assigned a unique note from the chord
- Multiple Chord Presets - Choose from various chord progressions including ambient pads and classic harmonies
- Customizable Sound Design
- 4 waveform types (sine, square, triangle, sawtooth)
- Adjustable detune for thicker sounds
- Smooth note transitions (glide or crossfade)
- Arpeggiator - Automatically cycle through notes at configurable intervals
- Visual Feedback - Optional canvas visualization that responds to your sound
- Offline Support - Works without a backend using local note assignment
- Mobile Friendly - Full iOS Safari support with proper audio unlocking
-
Clone the repository:
git clone https://github.com/yourusername/soundswarm.git cd soundswarm -
Serve the files with any static file server:
# Using Python python -m http.server 8000 # Using Node.js npx serve # Using PHP php -S localhost:8000
-
Open
http://localhost:8000in your browser -
Share the URL with friends to create music together!
Customize the experience with URL parameters:
| Parameter | Description | Example |
|---|---|---|
chord |
Preset chord name | ?chord=CMajor |
notes |
Custom note list | ?notes=C4,E4,G4,B4 |
sid |
Session ID for note coordination | ?sid=my-session |
Test- G major with extensionsBesideYouInTime- Dm7 ambient pad (inspired by Nine Inch Nails)CMajor,GMajor,DMajor- Classic major triadsAmMaj7,EmMaj7- Minor major seventh chordsDsus2,Asus2,Esus4- Suspended chordsGmaj9- Major ninth chord
Use the notes parameter with comma-separated note names:
?notes=D3,F3,A3,C4,E4,G4
Note format: NoteName + Octave (e.g., C4, F#3, Bb5)
soundswarm/
├── index.html # Main HTML structure
├── styles.css # All styling including grain effect
├── app.js # Application logic and Web Audio API
├── README.md # This file
├── LICENSE # MIT License
├── CONTRIBUTING.md # Contribution guidelines
└── .gitignore # Git ignore rules
SoundSwarm uses the Web Audio API to generate sounds:
- Oscillators - Generate the base waveforms
- Gain Nodes - Control volume with smooth ramps to prevent clicks
- Filter - Low-pass filter with LFO modulation for movement
- LFOs - Modulate amplitude and filter for evolving textures
When multiple users join:
- Each user's browser requests a note from the chord
- Notes are assigned to create complementary harmonies
- Session state is stored in localStorage
iOS requires special handling for Web Audio:
- AudioContext must be created during a user gesture
- Silent oscillator/buffer played to "unlock" audio
- Multiple event listeners ensure reliable playback
- Chrome/Edge 80+
- Firefox 75+
- Safari 14+
- iOS Safari 14+
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the ambient soundscapes of Nine Inch Nails
- Built with the Web Audio API
Made by Matthias Feit