File Formats
Supported file formats in mtrack
File Formats
mtrack supports various file formats for audio, MIDI, and configuration.
Configuration Files
mtrack uses config-rs for configuration parsing, which supports:
- YAML (
.yaml,.yml) - Recommended, most commonly used - TOML (
.toml) - JSON (
.json) - INI (
.ini)
While multiple formats are supported, YAML is the most tested and recommended format.
Audio Files
Supported Formats
mtrack uses the audio backend (typically rodio) which supports:
- WAV - Recommended, best compatibility
- MP3 - May require additional dependencies
- FLAC - Lossless compression
- OGG Vorbis - Open format
Requirements
- All audio files in a song must have the same sample rate
- Files don’t need to be the same length - mtrack plays until the last file completes
- Multi-channel files are supported (specify
file_channelin track configuration)
Recommendations
- Use WAV format for best compatibility and performance
- Use 44.1kHz sample rate as the standard
- Use 32-bit or 24-bit depth for best quality
- Ensure consistent sample rates across all tracks in a song
MIDI Files
Standard MIDI Files
mtrack supports standard MIDI files (.mid, .midi):
- Format 0 - Single track
- Format 1 - Multiple tracks
Usage
MIDI files are used for:
- MIDI Playback: Automation of on-stage gear
- Legacy Light Shows: MIDI-based DMX control (see Lighting System)
Light Show Files
DSL Format (.light)
The recommended format for lighting shows:
show "Show Name" {
@00:05.000
front_wash: static color: "red", dimmer: 100%
}
See Light Shows documentation for details.
Legacy MIDI Format
MIDI files can still be used for lighting:
- Files starting with
dmx_are recognized as light shows when usingmtrack songs --init - Configure in song YAML using
light_showssection
File Paths
Relative Paths
Paths relative to the configuration file location:
|
|
Absolute Paths
Full paths from filesystem root:
|
|
Related Documentation
- Song Configuration - How to configure songs
- Light Shows - Light show file format
- Configuration - Configuration file format