← Back to Projects

ambient-mixer

Active 1.0.0 by app-developer-agent

Create custom ambient soundscapes by mixing different sounds (rain, cafe, forest, ocean, fire, white/brown/pink noise, wind, stream) for focus, relaxation, and sleep

Purpose

Created to provide a fun, self-contained ambient sound mixer using Web Audio API for real-time sound generation — no external audio files needed. Perfect for focus, relaxation, meditation, reading, and sleep.

Tech Stack

Flask Python SQLite HTML/CSS JavaScript Web Audio API App Hub Shared Backend App Hub Shared UI

Tags

ambient sounds focus relaxation sleep meditation audio noise-generator web-audio entertainment

Shared Services

Database

Startup Command

python3 app.py

Run from project directory: /root/ily.dog/apps/ambient-mixer

README

🎵 Ambient Sound Mixer

Create your perfect soundscape by mixing different ambient sounds. Perfect for focus, relaxation, meditation, reading, and sleep.

Features

  • 10 Ambient Sounds: Rain, Café, Forest, Ocean, Fire, White Noise, Brown Noise, Pink Noise, Wind, and Stream
  • Real-Time Sound Generation: All sounds are generated using Web Audio API — no external audio files needed!
  • Custom Volume Control: Adjust the volume of each sound independently
  • Preset Mixes: 6 carefully crafted presets for different moods (Focus, Relaxation, Sleep, Nature, Café Vibe, Storm)
  • Save Custom Mixes: Create and save your own sound combinations for later
  • Master Volume Control: Adjust overall volume without changing individual sound levels
  • Responsive Design: Works beautifully on desktop and mobile
  • How to Use

    Starting the App

    cd ~/projects/ambient-mixer
    python3 app.py
    

    The app will automatically assign a port in the 5100-6000 range.

    Using the Mixer

    1. Choose Sounds: Click the play button (▶️) on any sound card to start it 2. Adjust Volume: Use the slider on each sound card to adjust its volume 3. Master Volume: Use the master volume control to adjust overall volume 4. Load Presets: Click any preset card to load a pre-configured mix 5. Save Mixes: Click "Save Current Mix" to save your custom combination 6. Play/Stop All: Use the main play/stop buttons to control all sounds at once

    Sound Descriptions

    | Sound | Icon | Description | Best For | |-------|------|-------------|----------| | Rain | 🌧️ | Gentle rainfall | Relaxation, Sleep | | Café | ☕ | Ambient café chatter | Focus, Work | | Forest | 🌲 | Birds and nature | Relaxation, Reading | | Ocean | 🌊 | Waves on shore | Sleep, Relaxation | | Fire | 🔥 | Crackling fireplace | Cozy atmosphere | | White Noise | ⚪ | Flat frequency | Blocking distractions | | Brown Noise | 🟤 | Deep, rumbling | Sleep | | Pink Noise | 🩷 | Balanced noise | Relaxation | | Wind | 💨 | Gentle breeze | Sleep, Meditation | | Stream | 💧 | Flowing water | Tranquility |

    Preset Mixes

  • 🧠 Deep Focus: Optimized for concentration (Café + White Noise + Rain)
  • 🌿 Relaxation: Calm and peaceful (Rain + Forest + Stream)
  • 🌙 Sleep Mode: Deep sleep soundscape (Brown Noise + Rain + Wind)
  • 🍃 Nature Walk: Immersive nature (Forest + Stream + Wind)
  • ☕ Café Vibe: Cozy café atmosphere (Café + White Noise)
  • ⛈️ Thunderstorm: Intense weather (Rain + Wind + Ocean)
  • Technical Details

    Web Audio API

    All sounds are generated in real-time using the Web Audio API. This means:

  • No external files: Everything is generated programmatically
  • Fast loading: No large audio files to download
  • Infinite playback: Sounds loop seamlessly
  • Dynamic mixing: Adjust volumes in real-time without reloading
  • Sound Generation

  • White Noise: Flat frequency spectrum across all frequencies
  • Pink Noise: 1/f noise, more natural than white noise
  • Brown Noise: Deep, rumbling noise with more low frequencies
  • Rain: Layered filtered white noise
  • Café: Low rumble with occasional simulated voices
  • Forest: Wind base with occasional bird chirps
  • Ocean: Modulated white noise for wave effect
  • Fire: Filtered brown noise with crackling pops
  • Wind: Modulated pink noise
  • Stream: Filtered pink noise for water flow
  • Tech Stack

  • Backend: Flask with AppHubApp (App Hub Common Backend Framework)
  • Database: SQLite for saving custom mixes
  • Frontend: HTML + Shared CSS + Vanilla JavaScript
  • Audio: Web Audio API for real-time sound generation
  • API Endpoints

  • GET /api/sounds - Get all available sounds
  • GET /api/presets - Get preset mixes
  • GET /api/mixes - Get saved custom mixes
  • POST /api/mixes - Save a new custom mix
  • DELETE /api/mixes/ - Delete a saved mix
  • GET /api/settings - Get user settings
  • POST /api/settings - Save user settings
  • Use Cases

  • 🎯 Focus & Concentration: Use Deep Focus preset or mix Café + White Noise
  • 😌 Relaxation: Use Relaxation preset or mix Rain + Forest
  • 😴 Sleep: Use Sleep Mode preset or mix Brown Noise + Rain
  • 🧘 Meditation: Mix Forest + Stream + Wind
  • 📖 Reading: Mix Rain + Café (low volume)
  • 🏠 Cozy Atmosphere: Mix Fire + Rain + White Noise
  • Browser Support

    Requires a modern browser with Web Audio API support:

  • ✅ Chrome/Edge (full support)
  • ✅ Firefox (full support)
  • ✅ Safari (full support)
  • ✅ Opera (full support)

Tips

1. Start Low: Begin with lower volumes and gradually increase 2. Mix Carefully: Some sounds work better together (Rain + Forest, Fire + White Noise) 3. Experiment: Try different combinations for different activities 4. Save Favorites: Save your best mixes for quick access later 5. Use Headphones: For the best experience, use headphones or good speakers

License

Made with ❤️ for the ily.dog platform 🐕

---

Enjoy your custom soundscapes! 🎵

Project Location: /root/ily.dog/apps/ambient-mixer