The dialogue rails in DSH Web are responsible for navigation, and these rails typically remain static when playing background music, lacking a sense of dynamism. The Rail Music plugin solves this problem by capturing system audio from the host machine running DSH and driving rail heights. It provides a mechanism to transform auditory rhythm into visual motion while maintaining navigation usability.
How It Works¶
The plugin runs within the DSH Web Profile. It utilizes Python audio libraries to capture system mix output (including sounds from players, browser videos, or local files), generates data through frequency band analysis, and sends it to the DSH client for rendering.
System Requirements¶
Before use, the following requirements must be met:
- DSH Version: 0.2.0-rc.2 or higher.
- Python Environment: 3.9 or higher, with
soundcardandnumpylibraries installed. - Audio Drivers:
- Windows: WASAPI Shared Mode loopback.
- Linux: PulseAudio or PipeWire sink monitor, requiring libpulse support.
- macOS: CoreAudio virtual input (such as BlackHole 2ch), requiring multi-output routing configuration.
Installation¶
Install via DSH Agent or command line:
dsh plugin --profile web add github:YOU-SHOULD-KNOW-ME/dsh-rail-music
Please confirm the system environment before installation. Windows users can check in PowerShell:
python -m pip install soundcard numpy
python -c "import soundcard, numpy; print('Audio dependencies ready')"
If the Python used by DSH is different or not in the PATH, specify the path in the configuration file:
~/.dsh/profiles/web/cordis.patch.yml
- id: dsh-rail-music
config:
pythonPath: 'C:\Python311\python.exe'
Core Features¶
- Audio Capture and Rendering: Captures system mix, supporting Windows WASAPI, Linux PulseAudio/PipeWire, and macOS CoreAudio.
- Interaction Logic: Restores DSH’s original navigation style when hovering with mouse or navigating with keyboard; resumes motion when leaving.
- Controls and Shortcuts: Supports
Alt + Mto pause or resume motion; the level button in the top-right corner also provides control. - Visual Style: Offers four color schemes (Classic, Aurora, Warm Flame, Monochrome), bar width adjustment, motion amplitude adjustment, and peak hold functionality.
Usage¶
- Enable
dsh-rail-musicin DSH’s Plugins page. - Open a dialogue page with turn navigation rails.
- Play music or video.
- Click the
⋯in the top-right corner to enter the settings panel and adjust colors, bar width, and amplitude.
Notes¶
- Exclusive Output: When the player uses WASAPI exclusive output, the plugin may not capture sound; switch to shared mode.
- Browser Preferences: If the browser has “reduce motion” enabled, the plugin will pause rendering.
- Audio Routing: macOS and Linux require pre-configured virtual audio devices or monitor sources.