Cosmic Drift
Coded in Single Scoop Web Code Editor 🤓
Cosmic Drift Ambient Generator is a web application designed to function as an infinite, generative audiovisual experience rather than a standard music player. The user interface presents a deep, dark cosmic void featuring a central button styled as a rotating planet. This planet glows and pulses rhythmically, acting as a visual anchor. Surrounding this center is a dynamic background rendered on an HTML5 Canvas where stars drift slowly to create a parallax effect, simulating depth and vast distance. When the experience is activated, ethereal colored flares drift aimlessly across the screen, adding a layer of dreamlike visual texture that complements the auditory experience.
The technical foundation of the app relies entirely on Vanilla JavaScript and the Web Audio API to function as a programmable modular synthesizer directly within the browser. It uses OscillatorNodes to generate raw sine and triangle waves, adding slight random deviations to their frequencies to mimic the warmth and instability of analog hardware. To create the atmospheric textures of cosmic wind, the application generates buffers of white noise and passes them through bandpass filters. These filters are modulated by Low Frequency Oscillators (LFOs) that slowly open and close, creating a swelling sensation that gives the soundscape a feeling of constant, organic motion.
A defining feature of the audio engine is its procedural generation of acoustic space. The code calculates a massive eight second impulse response to simulate a cavernous environment and applies it using a ConvolverNode, placing the dry synthesizer tones into a vast virtual room. The music does not rely on loops but instead uses a randomized logic system. It selects notes from specific musical modes and triggers them at varying intervals, while a background timer automatically shifts the musical scale every few minutes. This ensures the composition is always evolving and the listener never hears the exact same sequence of sounds twice.
This architecture makes the application particularly well suited for meditation, focus, and mental health regulation. The filtered noise textures closely mimic Brown noise, which is often used to soothe ADHD brains and mask distracting environmental sounds. Because the audio is generative and lacks a predictable loop, the brain does not become bored or annoyed by repetition, allowing the user to maintain a flow state for longer periods. The pulsing animation of the central planet serves as a visual metronome, allowing users to synchronize their breathing with the expansion and contraction of the glow to reduce anxiety. Additionally, the deep blue and black color palette is designed to reduce eye strain, making it safe to use in dark rooms to aid with sleep.
| Updated | 5 hours ago |
| Status | Released |
| Category | Soundtrack |
| Rating | Rated 5.0 out of 5 stars (1 total ratings) |
| Author | Johnny Heggelund |
| Tags | ambient, Atmospheric, meditation, Music, Relaxing, Sci-fi, sound, Sound effects, soundscape, Soundtoy |
Development log
- Adjusted volume and sounds33 days ago
