Song Configuration
How to configure songs in your mtrack repository
Song Configuration
Songs in mtrack are defined using YAML (or other config-rs supported formats) and can include multiple audio tracks, MIDI playback, and lighting shows.
Song Structure
A song consists of:
- One or more audio files
- An optional MIDI file
- One or more light shows (using
.lightDSL files, or legacy MIDI files) - A song definition file
Song Definition Format
Here’s a complete example of a song definition:
|
|
Track Configuration
Single Channel Tracks
For audio files with a single channel, just specify the name and file:
|
|
Multi-Channel Tracks
For audio files with multiple channels, specify which channel to use:
|
|
File Paths
File paths can be:
- Relative: Relative to the song configuration file location
- Absolute: Full path from the filesystem root
MIDI Events on Selection
You can emit a MIDI event when a song is selected (even if not playing). This is useful for triggering events on remote devices:
|
|
See MIDI Events Reference for all supported event types.
MIDI Playback
Play a MIDI file along with your audio:
|
|
This is useful for automating on-stage gear like synthesizers, effects units, etc.
Lighting Shows
New DSL Format (Recommended)
Use .light files with the lighting DSL:
|
|
See the Light Shows documentation for details.
Legacy MIDI Format
You can still use MIDI files for lighting:
|
|
Requirements
- All audio files must have the same sample rate
- Audio files don’t need to be the same length - mtrack plays until the last file completes
- File formats: WAV is recommended, but other formats supported by your audio backend may work
Generating Song Configurations
You can auto-generate song configurations:
|
|
This creates a song.yaml in each subdirectory using:
- Folder name as song name
- WAV files as tracks (track name from filename)
- MIDI files for MIDI playback
- Files starting with
dmx_for light shows
You can then edit these files to refine the configuration.
Testing Songs
View all songs in your repository:
|
|
Play a song directly:
|
|
Related Documentation
- Configuration - Player configuration
- Light Shows - Creating lighting shows
- MIDI Events - MIDI event reference