Audio Format Standards
Relevant source files
The following files were used as context for generating this wiki page:
Audio Format Standards define the technical requirements for all sound assets within BandaStation. These standards ensure compatibility with the BYOND engine, maintain server performance, and provide a consistent auditory experience across different subsystems like title music, jukeboxes, and mid-round sound effects.
The project primarily utilizes the Ogg Vorbis format for its balance of quality and compression. Specific configuration limits and naming conventions govern how these files are integrated into the game world and user interfaces.
Sources: sound/standard.md:1-2, README.md:65-67
Technical Specifications
BandaStation enforces a specific encoding standard to prevent engine-side downmixing and performance degradation. Using unnecessarily large files causes client-side lag and should be avoided.
| Parameter | Required Value |
|---|---|
| Format | Ogg Vorbis |
| Sample Rate | 44.1 kHz (44100 Hz) |
| Quality Preset | 5 (Quality slider at center in Audacity) |
| Mono/Stereo | Mono for positional sounds; Stereo for global sounds |
Sources: sound/standard.md:1-12, config/title_music/README.txt:4-6
Positional vs. Global Audio
The channel configuration depends on how the sound is triggered in the code:
- Positional Sounds: Sounds played via
playsound()with a specific source or direction must be downmixed to mono. If provided as stereo, BYOND performs the downmix itself, consuming additional resources. - Global Sounds: Sounds played to all players simultaneously without a specific location (e.g., lobby music) may remain in stereo.
Sources: sound/standard.md:3-8
Audio Management Systems
Title Music Configuration
Title music files are stored in /config/title_music/sounds. The system selects a random file from this pool unless specific naming filters are met.
- Common Sounds: Files without a "+" character in the name are included in the general rotation.
- Map-Specific Sounds: Formatted as
(MAP_NAME)+(SOUND_NAME). These play only when a specific map is active. TheMAP_NAMEmust match the internalMAP_NAMEdefine. - Rare Sounds: Prefixed with
rare+. These have a 1% chance of being selected for the round's title pool.
Sources: config/title_music/README.txt:11-33
Internet Sound Requests
The server allows requesting external audio from specific platforms if REQUEST_INTERNET_SOUND is enabled in the configuration. The system utilizes yt-dlp for processing these requests.
REQUEST_INTERNET_ALLOWED youtube\.com\/watch?v=,youtu\.be\/,soundcloud\.com\/,bandcamp\.com\/track\/
Sources: config/config.txt:261-268
Synthesized and Programmatic Audio
BandaStation supports synthesized audio through specific interfaces and subsystems:
- Instruments: Handled via the
InstrumentEditor, which manages chords, BPM (Tempo), and sustain modes. Chords are defined as series of notes separated by commas, with individual notes in a chord separated by hyphens. - TTS (Text-to-Speech): Utilizes an external HTTP server (Docker-based) for generating speech. Configuration includes voice blacklists and specific overrides for systems like Trams or Computers.
Sources: tgui/packages/tgui/interfaces/InstrumentEditor.tsx:240-265, config/config.txt:514-531
Audio Processing Workflow
The following diagram illustrates the standard procedure for preparing an audio file for the repository using tools like Audacity.
The workflow ensures that all assets meet the technical requirements for the BYOND engine and project standards.
Sources: sound/standard.md:1-18
Licensing and Attributions
All sound assets are generally under a Creative Commons 3.0 BY-SA license unless otherwise indicated in specific directories.
- Operator Responsibility: Server operators must manage the copyright status of files in
/config/title_music/and/config/jukebox_music/. - Attribution Files: Specific folders (e.g.,
modular_bandastation/shuttles/sound/) containattributions.txtfiles to credit authors and specify licenses like CC BY-NC 4.0.
Sources: README.md:65-67, config/title_music/LICENSE.txt:1-10, modular_bandastation/shuttles/sound/attributions.txt:1-4
Summary
BandaStation audio standards prioritize engine efficiency and organizational clarity. By enforcing the Ogg Vorbis format at 44.1kHz and requiring mono downmixing for positional audio, the project minimizes server overhead and client-side performance issues. Developers and mappers must adhere to these encoding standards and naming conventions to ensure their audio assets function correctly across different game systems.