# The Sound of Silence
**Transform Foundry VTT's playlists into a professional sound design studio**
[](https://github.com/GnollStack/The-Sound-of-Silence/releases/latest)
[](https://github.com/GnollStack/The-Sound-of-Silence/releases)

[](https://foundryvtt.com)
> Professional audio engineering for your tabletop RPG. Create complex musical compositions with seamless loops, cinematic crossfades, and dynamic silenceβwithout touching a single audio file.
---
## Quick Start
**Get started in 30 seconds:**
1. **Install** from Foundry's Add-on Modules browser (search "Sound of Silence")
2. **Open any playlist** β Click the toggle buttons in the header ( π π)
3. **Configure** individual sounds with the orange loop icon or playlist settings
## Why The Sound of Silence?
| Feature | Demo Video | What You'll See |
|---------|------------|-----------------|
| **Silence Gaps** | [βΆοΈ 1 min](https://youtu.be/qWQ8Ci46iiw) | Add natural pauses between tracks, static or random |
| **Crossfading** | [βΆοΈ 1 min](https://youtu.be/7K72lde_jus) | Seamless transitions without harsh cuts |
| **Internal Loops** | [βΆοΈ 2 min](https://youtu.be/ykLuKt_UPlg) | Create intro β loop β outro structures, True Crossfade! |
---
## What This Module Adds
### **Cinema-Quality Audio**
- **Equal-power crossfades** β Similar technology used in professional DAWs like Logic Pro and Ableton
- **Exponential fade curves** β Perceptually linear fading that sounds natural to human hearing (no more abrupt volume jumps!)
- **Glitch-free transitions** β Dual-buffer architecture ensures seamless playback without audio pops or stutters
### **Game Audio Features**
- **Multi-segment sequencer** β Design complex tracks: Intro β Loop A β Loop B β Outro, each with configurable repeat counts
- **Dynamic silence gaps** β Add breathing room between tracks with static or randomized durations
- **Skip-to-loop** β Jump directly to your loop point for instant atmosphere building
### **Zero Workflow Disruption**
- **One-click toggles** β Enable features directly from playlist headers, no digging through menus
- **Real-time sync** β All crossfades, loops, and transitions perfectly synchronized across GM and players
- **Works with existing files** β No need to pre-edit your audio, configure everything in Foundry
### **Professional Engineering**
- Built on Web Audio API for sample-accurate timing
- Audio-thread scheduling eliminates main-thread performance issues
- Automatic memory management prevents leaks during long sessions
---
UI Screenshots
### Playlist Header Controls
### Playlist Configuration
### Sound Configuration
---
## Perfect For
**Combat Encounters**
Design dynamic battle music: *Tension intro* β *combat loop* β *victory fanfare*
**Any Music Track**
Ever find music you love but with annoying parts? Create segment loops to play only the sections you enjoy.
**Taverns & Social Hubs**
Layer ambient loops: *Base ambience* β *crowd chatter* β *bardic performance*
**Exploration & Dungeons**
Create evolving atmospheres that never feel repetitive with randomized silence and multi-segment loops
**Boss Battles**
Build multi-phase soundscapes: *Phase 1 theme* β *Enraged phase 2* β *Defeat/victory*
**Narrative Moments**
Fade between emotional beats with professional crossfades
---
## Feature Overview
### **Advanced Looping**
#### Internal Loop-Within-Sound
Create professional game audio structures:
- Define **start and end timestamps** for seamless loop segments
- Set **loop counts** (play 3 times, then continue) or loop infinitely
- Configure **crossfade duration** between loop iterations (default: 1000ms)
- **Multi-segment support:** Chain multiple loop regions in a single track
- Uses **equal-power crossfades** to avoid jarring loop transitions
- **Preview your segments** and fades between audio loops quickly and easily with a built-in audio previewer and **seek bar**
#### Skip Intro Feature
- Start playback directly at your first loop segment
- Perfect for ambient tracks where you want instant atmosphere
- Applies configurable fade-in at the loop point
#### Flexible Segment Behavior
- **Skip to Next:** Jump to the next segment after completing loops
- **Play Through:** Let audio continue naturally after the loop
- **Graceful Retirement:** Automatically fades out at track end when loops complete
---
### **Dynamic Playback**
#### Configurable Silence Gaps
- Insert pauses between tracks to simulate natural music flow
- **Static mode:** Fixed duration (e.g., always 5 seconds)
- **Random mode:** Randomize within a range (e.g., 3-10 seconds)
- Perfect for preventing listener fatigue
#### Automatic Crossfading
- Seamlessly blend between tracks using equal-power crossfades
- Respects your playlist's fade duration settings or use your own
- Works with manual skips and automatic progression
- Synchronized perfectly across all connected clients
#### Intelligent Fade-In
- Smoothly ramps up volume when tracks start as part of a logarithmic fade.
- Configurable per-playlist
- Uses exponential curves for natural-sounding volume changes
---
### **Playlist Management**
- **Loop Entire Playlist** β Automatically restart in Sequential, Shuffle, or Simultaneous modes
- **Volume Normalization** β Set a target volume for all tracks with per-sound overrides
- **GM Authority System** β Prevents conflicts when multiple GMs are online
- **Mode Coordination** β Smart behavior: Crossfade mode automatically overrides Silence mode
---
### **Integrated UI**
#### Playlist Header Toggles
- **Enable Silence** β Quick toggle for gap injection
- **Auto-Crossfade** β One-click seamless transitions
- **Loop Entire Playlist** β Shows as green underline + shuffle icon when active
#### Per-Sound Controls
- **Orange circle icon** β Toggle internal looping without opening config
#### Configuration Dialogs
- **Playlist Config:** Fade-in, silence settings, crossfade toggle, volume normalization
- **Sound Config:** Multi-segment loop editor with visual timeline, crossfade settings, intro skip option
---
## Installation
### Method 1: From Foundry VTT (Recommended)
1. In Foundry, go to **Add-on Modules** β **Install Module**
2. Search for **"The Sound of Silence"**
3. Click **Install**
### Method 2: Manual Installation
1. Copy this manifest URL:
```
https://github.com/GnollStack/The-Sound-of-Silence/releases/latest/download/module.json
```
2. In Foundry, go to **Add-on Modules** β **Install Module**
3. Paste the URL in the **Manifest URL** field
4. Click **Install**
### Requirements
- **Foundry VTT v13+**
- **[lib-wrapper module](https://github.com/ruipin/fvtt-lib-wrapper)**
---
## Usage Guide
### Basic Setup
1. **Configure Playlist Settings**
- Right-click playlist β **Configure**
- Set **Fade-In Duration** (global for all sounds in this playlist)
- Choose **Silence Mode** (static or random) and duration
- Enable **Loop Entire Playlist** if desired
2. **You can turn these On or Off at will**
- Open the **Playlist Directory**
- Click the toggle buttons in any playlist header:
- β = Silence Gaps
- π = Auto-Crossfade
- π = Loop Playlist
3. **Set Up Internal Loops** (Optional)
- Right-click any sound β **Configure**
- Enable **Internal Looping**
- Add segments with start/end times
- Set crossfade duration and loop counts
### Advanced: Multi-Segment Loops
**Example: Boss Battle Music**
```
Segment 1: 00:00 - 01:30 (Intro, loop 1x, skip to next)
Segment 2: 01:30 - 03:00 (Phase 1, loop infinitely)
Segment 3: 03:00 - 04:45 (Phase 2, loop infinitely)
Segment 4: 04:45 - 06:00 (Victory, loop 1x, play through)
```
**How it works:**
1. Track plays intro once
2. Automatically jumps to Phase 1 loop
3. Manually break loop when boss enters Phase 2 by clicking the white icon in the UI
4. Track jumps to Phase 2 loop
5. Break loop again when boss defeated β victory music plays once β track ends
---
## π Important Notes
### Feature Interactions
- β οΈ **Crossfade and Silence are mutually exclusive** β Enabling crossfade automatically disables silence (by design for clean transitions)
- β οΈ **Pause disabled during crossfades** β Prevents audio glitches during internal loop transitions (technical limitation)
### Performance Considerations
- **Memory efficient:** Module uses dual-buffer architecture β only 2 sound instances loaded regardless of segment count
- **Long audio files (15+ minutes):** May cause 1-2 second delays during initial loop setup due to audio decoding
- The module reuses buffers efficiently, so subsequent loops are instant
- Consider using shorter files or Opus/OGG format for faster decoding
- **WeakMap state storage:** Automatically garbage collected, prevents memory leaks during long sessions
- **Audio-thread scheduling:** All fades run on Foundry's dedicated audio context, zero main-thread impact
---
## Community
- ** Star this repo** if you find it useful!
- **π [Report Bugs](https://github.com/GnollStack/The-Sound-of-Silence/issues)** β Help improve the module with detailed reproduction steps
- **π‘ [Request Features](https://github.com/GnollStack/The-Sound-of-Silence/issues)** β Shape the roadmap with your ideas, If its within the scope of the module and relatively easy to create there is high chance Ill do it!
---
## π§ Compatibility
### Tested & Compatible With:
- β
**Monk's Enhanced Audio**
- β
**Playlist Enhancements**
- β
**All game systems**
- β
**Foundry VTT v13+**
### Known Conflicts:
- None reported! If you find a compatibility issue, please [open an issue](https://github.com/GnollStack/The-Sound-of-Silence/issues).
---
## β οΈ Known Issues
Currently tracking [open issues on GitHub](https://github.com/GnollStack/The-Sound-of-Silence/issues):
---
## πΊοΈ Roadmap
### Future Considerations
- [ ] Cross-playlist crossfading, fade from Exploration β Combat playlists
- [ ] Intro β Playlist linking, play intro track, then auto-switch to looping playlist
- [ ] Preset system (save/load/share loop configurations)
- [ ] Playlist automation triggers (conditions: "on combat start", "on scene change")
- [ ] API expansion for macro/module integration
- [ ] Building out the Performance profiler and diagnostics dashboard more
- [ ] Ability to Play Loop Segments in any Order, so go from segment one from 1:00-1:45 to a segment at 00:20-00:40
---
## For Developers
### Architecture Highlights
This module implements professional game audio patterns:
- **Web Audio API** for sample-accurate timing
- **Dual-buffer crossfading** system (soundA/soundB architecture)
- **WeakMap-based state management** for automatic garbage collection
- **Audio-thread scheduling** via AudioContext.currentTime
- **Exponential curves** for perceptually-linear volume changes
- **Equal-power crossfades** (sinΒ²ΞΈ + cosΒ²ΞΈ = 1 for constant perceived power)
### Public API
The module exposes a public API for advanced users:
```javascript
// Access via game.modules.get("the-sound-of-silence").api
// Inspect current state
const state = game.modules.get("the-sound-of-silence").api.inspectAll();
console.log(state); // Shows active loopers, crossfades, silence gaps
// Open diagnostics window
game.modules.get("the-sound-of-silence").api.openDiagnostics();
// Get performance metrics
const metrics = game.modules.get("the-sound-of-silence").api.getMetrics();
console.log(metrics.crossfades.total); // Total crossfades since module load
```
---
## Support Development
This module represents **hundreds of hours** of research, development, testing, and refinement. It implements professional audio engineering techniques that are typically only found in commercial game engines.
### Ways You Can Help:
- β **Star this repository** if you find it useful
- π **Report bugs** with detailed reproduction steps
- π **Share your use cases** in GitHub Discussions or on Reddit
- π₯ **Create tutorial videos** or write guides
---
## βοΈ License & Permissions
### Proprietary EULA
This module is licensed under the **GnollStack Proprietary EULA**.
It is **Free for Personal Use**, meaning you can use it in your home games, stream it, or modify it for your own table without restriction.
However, **Commercial Redistribution is Strictly Prohibited.**
You may **NOT** sell this module, bundle it within paid content (such as Patreon maps or adventures), or host it as a commercial service without prior written consent.
### Commercial Licensing
I am open to partnerships! If you are a map maker, adventure writer, or developer who wishes to use this module commercially, please contact me. I offer commercial licenses for:
* Bundling this module with paid VTT content.
* Official integration into commercial systems.
* Custom feature development for your specific product.
### Contact
For licensing inquiries or permission slips:
* **Discord:** `GnollStack` (Preferred)
* **Email:** `Somedudeed@gmail.com`
* *Please do not open GitHub Issues for commercial licensing discussions. But feel free to contact me via Discord or Email*
---
**Author:** [GnollStack](https://github.com/GnollStack)
**Compatibility:** Foundry VTT v13+ / dnd5e 5.1+
---
[β¬ Back to Top](#the-sound-of-silence)