Performance Launcher — Real-Time Multichannel Cue Player
Prepares selected Sound objects, resamples them to a unified sample rate, writes a performance manifest, and hands complete execution over to a real-time Python audio engine with keyboard-triggered GUI playback.
What this does
This script provides a bridge from Praat to a real-time multichannel audio cue launcher. Select one or more Sound objects in Praat, run the script, and a Python GUI window opens. Each selected sound becomes a playable cue, assigned a default keyboard key (1,2,3…q,w,e…). The cues can be triggered in real time, with per-cue gain, fade-in/out, channel offset, and progress indicators. All audio is pre-loaded into RAM for instantaneous playback.
Key Features:
- Automatic resampling — all sounds resampled to the highest sample rate among selected files
- RAM-based playback — audio loaded into memory for zero-latency triggering
- Keyboard shortcuts — 37 default keys (numbers, letters) assignable per cue
- Per-cue controls — gain (dB), fade-in/out, output channel offset
- Exclusive mode — stop all other cues when a new one starts (one-shot mode)
- Master gain — global output level control
- Progress indicators — real-time progress bar and countdown timer per cue
- Config persistence — saves device, channel count, gain, key assignments between sessions
- Cross-platform — Windows, macOS, Linux (with mouse wheel scroll support)
sounddevice for low-latency audio output, soundfile for reading WAVs, numpy for audio mixing, and tkinter for the GUI. The engine runs a real-time callback thread that mixes all active cues sample-accurately with fade-in/out and channel routing.
Quick start
- In Praat, select one or more Sound objects.
- Run script… →
PerformanceLauncher.praat. - The script exports each sound to a temporary WAV, builds a manifest, and launches the Python GUI.
- In the GUI, select your output audio device and number of output channels.
- Click the ▶ play button for any cue, or press its assigned keyboard key.
- Adjust per-cue gain, channel offset, and master gain as needed.
- Close the window when finished — temporary files are cleaned up automatically.
pip install sounddevice soundfile numpy. The GUI requires tkinter (usually included with Python). If you see "Missing Python dependency", run the install command in your terminal. The script resamples all sounds to the highest sample rate among selected files — this may increase RAM usage for high-resolution files.
Workflow: Praat → Performance Launcher
• Edit, filter, analyse, or generate sounds using any Praat tools
• Select all sounds you want in your performance set
• Sound names become cue names in the GUI
• Stereo sounds remain stereo; mono sounds can be panned via channel offset Step 2: Run PerformanceLauncher.praat
• Script calculates target sample rate (max of all selected)
• Resamples sounds if necessary (preserves original objects)
• Exports each sound as temporary WAV
• Writes JSON manifest with metadata
• Launches Python GUI Step 3: Configure playback in GUI
• Select output device and channel count
• Adjust master gain
• Set per-cue gain, fade times, channel offset
• Assign custom keyboard keys (click the key badge) Step 4: Perform!
• Trigger cues by clicking buttons or pressing keys
• Monitor progress bars and countdown timers
• Stop individual cues or all cues at once Step 5: Close and clean up
• Configuration auto-saves to temp file
• Temporary WAVs and manifest deleted on exit
• Praat objects unchanged
GUI Features
Main window layout
| Section | Controls | Description |
|---|---|---|
| Top bar | Stop All button, window title | Stop all currently playing cues with fade-out. |
| Master controls | Master gain slider, Exclusive mode toggle | Global output level. Exclusive mode = new cue stops all others. |
| Device selector | Output device dropdown, Channels spinbox | Choose audio interface and output channel count (1–32). |
| Cue grid | Scrollable list of cues. Each row contains:
| |
| Status bar | Shows current action, device status, or error messages. | |
Playback modes
Restart mode (default)
If the same cue is triggered while playing, it stops (with fade-out) and restarts from the beginning. Ideal for drum hits or short phrases.
Overlap mode
Multiple instances of the same cue can play simultaneously (configured via manifest). Useful for layers and polyphonic textures.
Keyboard shortcuts
| 1–0 | → | Cues 0–9 |
| q, w, e, r, t, y, u, i, o, p | → | Cues 10–19 |
| a, s, d, f, g, h, j, k, l | → | Cues 20–28 |
| z, x, c, v, b, n, m | → | Cues 29–35 |
- Esc — Stop all cues
Applications
Live electronic music performance
Use case: Trigger pre-composed loops, one-shots, or effect tails from a laptop running Praat as a sound design environment.
Workflow: Prepare sounds in Praat (filtering, spectral processing, granulation), select them, launch Performance Launcher, and perform using keyboard or MIDI (via external mapping).
Sound installation / gallery
Use case: Autonomous or interactive playback of multiple sound files with individual level and pan control.
Workflow: Load ambient textures, field recordings, or spoken word cues. Use exclusive mode to ensure only one sound plays at a time. Connect to a multichannel speaker array using channel offset.
Theatre / dance production
Use case: Cue-to-cue playback with precise fade control.
Workflow: Each cue has its own gain and fade-out time. The stage manager triggers cues via keyboard. Progress bars show remaining time for each sound — essential for cueing next elements.
Rehearsal / practice tool
Use case: Quickly audition multiple versions of a processed sound.
Workflow: In Praat, generate several variations (different filters, pitch shifts, delays), select all, launch Performance Launcher, and trigger each version with a single key press for A/B comparison.
Workflow: Multi-track stem playback
Source: 8 stereo stems (drums, bass, pads, leads, etc.) prepared in Praat.
Settings: Output channels = 16 (or 8 stereo pairs). Set Ch+ offset for each cue to route to different speaker pairs.
Result: Independent level and mute control over each stem via the GUI, all synchronised by triggering simultaneously.
Workflow: A/B comparison for mastering
Source: Same audio file processed with different settings (e.g., different compressor thresholds).
Settings: Exclusive mode on. Assign neighbouring keys (e.g., '1' and '2').
Result: Quick switching between versions for blind listening tests.
• No sound / device not found: Check that your audio interface is connected and selected in the dropdown. Use the device test tone (available via right-click on device list in some versions).
• Latency / glitches: Increase the block size (not exposed in GUI, but can be tuned in the engine). Ensure no other applications are using the audio device exclusively.
• Python fails to launch: Verify that
python or python3 is in your PATH. The script attempts OS-specific discovery (Homebrew, system Python, etc.).• GUI scroll not working on Linux: Version 1.1 adds explicit Button-4/Button-5 bindings for X11 — ensure you're running the latest.
• Cues not playing: Check that the temporary WAV files were created successfully. Look for error messages in the Praat Info window.
Configuration persistence
- Selected audio device index
- Output channel count
- Master gain dB value
- Exclusive mode state
- Per-cue: key assignment, gain dB, output offset, playback mode
sounddevice.OutputStream with a callback that runs at the audio hardware buffer size (typically 256–1024 samples). All mixing is done in 32-bit float to prevent clipping until final output. Per-cue gain, fade-in/out, and channel routing are applied in the callback, which means zero latency for parameter changes.