it's a Windows CLI application that integrates with Soundpad to play random sound effects from organized folders using customizable global keyboard shortcuts.
What's Soundpad? it's a Windows tool that lets you play custom sounds through your microphone in voice chats or games, acting like a soundboard.
- ๐ต Random Sound Playback - Play random sounds from organized categories
- โจ๏ธ Global Keyboard Shortcuts - Works in games, fullscreen apps, any Windows context (uses keyboard library for reliability)
- โฏ๏ธ Pause/Resume Toggle - Same shortcut pauses and resumes audio instead of stopping completely
- ๐ Automatic Folder Import - Scan directories and import sounds into Soundpad categories
- ๐ฎ Interactive CLI - Beautiful Rich-based interfaces for setup and configuration
- โ๏ธ YAML Configuration - Human-readable configuration files
- ๐ Real-time Key Capture - Live keyboard shortcut assignment during setup
- ๐ Live Status Display - Real-time monitoring of shortcuts and activity
- ๐ Auto-launch Soundpad - Automatically starts Soundpad when needed
- ๐ก๏ธ Automatic Admin Elevation - Requests administrator privileges for global shortcuts automatically
- Soundpad Setup Tool (
1- Soundpad-setup.py) - One-time folder import and category setup - Soundpad Config Tool (
2- Soundpad-config.py) - Manage keyboard shortcuts and folder mappings - Soundpad Commander (
3- Soundpad-run.py) - Main application with global keyboard listener
- Language: Python 3.8+ (Cross-platform, excellent Windows support)
- Config Format: YAML (Human-readable, easy to edit)
- CLI Interface: Rich interactive menus
- Dependencies:
rich>=13.0.0- Beautiful CLI interfaces with menus, tables, progress barsquestionary>=1.10.0- Interactive prompts and selectionspynput>=1.7.6- Interactive key capture during configurationkeyboard>=0.13.5- Global keyboard shortcuts (more reliable than pynput on Windows)PyYAML>=6.0- YAML configuration management
-
Prerequisites:
- Windows 10/11
- Python 3.8 or higher
- Soundpad (full version)
-
Clone or Download:
cd Soundpad-commander -
Install Dependencies:
pip install -r requirements.txt
Run the setup tool "1- Soundpad-setup.py" to scan for sound folders and import them into Soundpad:
Setup Process:
- Select "Scan for sound folders"
- Enter the path to your sound effects directory (e.g.,
C:\SoundEffects) - Review discovered categories
- Confirm import to Soundpad
Folder Structure Example:
C:\SoundEffects\
โโโ explosions\
โ โโโ explosion1.mp3
โ โโโ explosion2.wav
โ โโโ explosion3.ogg
โโโ gunshots\
โ โโโ rifle1.mp3
โ โโโ pistol2.wav
โโโ ambient\
โโโ forest.mp3
โโโ rain.wav
Run the config tool "2- Soundpad-config.py" to assign keyboard shortcuts to categories:
Configuration Process:
- Select "Assign category shortcuts"
- Choose a category to configure
- Press your desired key combination (e.g.,
Alt+1) - Press Enter to confirm
- Repeat for other categories and set stop shortcut
Start the main application "3- Soundpad-run.py" to begin using keyboard shortcuts:
Runtime Features:
- Interactive status display showing connection status, shortcuts, and activity
- Global keyboard shortcut detection
- Automatic Soundpad connection monitoring
- Real-time activity logging
- Press
Alt+1โ Random sound from "explosions" category plays - Press
Alt+2โ Random sound from "ambient" category plays - Press
Alt+0โ Pause/Resume currently playing sound (toggles between pause and resume)
The configuration is stored in Soundpad-config.yaml:
soundpad:
executable_path: "C:\\Program Files\\Soundpad\\Soundpad.exe"
pipe_path: "\\\\.\\pipe\\sp_remote_control"
auto_launch: true
shortcuts:
stop_playback: ["alt", "0"] # Actually performs pause/resume toggle
categories:
explosions:
soundpad_category_id: 1
keyboard_shortcut: ["alt", "1"]
folder_path: "C:\\SoundEffects\\explosions"
enabled: true
sound_count: 15
settings:
play_on_speakers: true
play_on_microphone: true
log_level: "INFO"
show_notifications: trueSee Soundpad-config-template.yaml for detailed configuration options.
- Audio Files:
.mp3,.wav,.ogg,.m4a,.aac,.flac,.wma - Video Files:
.mp4,.avi,.mov,.mkv,.webm(audio track only)
- Modifiers:
ctrl,alt,shift,cmd(Windows key) - Function Keys:
f1,f2,f3, ...f12 - Regular Keys:
a-z,0-9 - Special Keys:
space,enter,tab,esc,backspace,delete, etc.
Supports complex combinations like:
["ctrl", "alt", "f1"]["shift", "ctrl", "s"]["alt", "1"]
"Cannot connect to Soundpad"
- Verify Soundpad path in configuration
- Ensure Soundpad is running (otherwise the tool will try to run it automatically)
"No shortcuts configured"
- Run
Soundpad-config.pyto set up keyboard shortcuts - Ensure categories were imported via
Soundpad-setup.py
"Permission denied accessing pipe"
- Run as Administrator if needed (otherwise the tool will try to run itself automatically)
- Check Windows permissions for named pipes is enabled
Keyboard shortcuts not working
- Verify shortcuts are not conflicting with other applications
- Check that keyboard library installed correctly
- IMPORTANT: Run as Administrator for global keyboard hooks to work properly (otherwise the tool will try to run itself automatically)
Soundpad-commander/
โโโ Soundpad/
โ โโโ __init__.py
โ โโโ soundpad_client.py # Soundpad API wrapper
โ โโโ keyboard_listener.py # Global hotkey handling (keyboard library)
โ โโโ config_manager.py # YAML config management
โ โโโ file_scanner.py # Directory scanning
โโโ 1- Soundpad-setup.py # Setup tool (moved from bin/)
โโโ 2- Soundpad-config.py # Configuration tool (moved from bin/)
โโโ 3- Soundpad-run.py # Main application (moved from bin/)
โโโ Soundpad-config.yaml # User configuration (generated)
โโโ requirements.txt # Python dependencies
โโโ README.md # Documentation
Soundpad Commander uses Soundpad's Named Pipe API for communication:
- Pipe Path:
\\.\pipe\sp_remote_control - Protocol: Text-based commands with HTTP-style responses
- Key Commands:
DoPlayRandomSoundFromCategory(categoryIndex, speakers, microphone)DoTogglePause()- Used for pause/resume functionality instead of stopDoStopSound()- Available but not used (we use pause/resume instead)DoAddCategory(name, parentIndex)DoAddSound(url, categoryIndex, position)
soundpad_client.py- Python wrapper for Soundpad's Java APIconfig_manager.py- YAML configuration management with validationfile_scanner.py- Audio file discovery and categorizationkeyboard_listener.py- Global keyboard hooks using keyboard library (more reliable than pynput on Windows)
MIT License - see LICENSE file for details.
- Soundpad by Leppsoft for providing the excellent audio management platform
- Rich library for beautiful CLI interfaces
- pynput library for global keyboard hooks
and claude code :D
Useful links: https://www.leppsoft.com/soundpad/ https://www.leppsoft.com/soundpad/help/manual/tutorial/rc/ https://www.leppsoft.com/soundpad/en/rc/