Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .licensure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ excludes:
- Cargo.toml
- .*\.yaml
- .*\.wav
- .*\.mp3
- .*\.flac
- .*\.ogg
- .*\.aac
- .*\.alac
- .*\.m4a
- .*\.mid
- lcov.info
- .*\.tosc
Expand Down
227 changes: 227 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cpal = "0.15.3"
rayon = "1.8.0"
num_cpus = "1.16.0"
duration-string = "0.5.2"
hound = "3.5.1"
symphonia = { version = "0.5", features = ["all"] }
midir = "0.10.1"
midly = "0.5.3"
nodi = { version = "1.0.3", features = ["hybrid-sleep", "midir"] }
Expand All @@ -50,13 +50,14 @@ tokio = { version = "1.42.0", features = [
tonic = "0.12.3"
tonic-reflection = "0.12.3"
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
crossbeam-channel = "0.5.15"
pest = "2.7"
pest_derive = "2.7"

[dev-dependencies]
tempfile = "3.14.0"
hound = "3.5.1"

[build-dependencies]
prost-build = "0.13.4"
Expand Down
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,25 @@ MIDI device, you would use the string `UltraLite-mk5`.

## File formats

### Configuration files

`mtrack` now uses [config-rs](https://github.com/rust-cli/config-rs) for configuration parsing, which
means we should support any of the configuration file formats that it supports. Testing for anything
other than YAML is limited at the moment.

### Audio files

`mtrack` supports a wide variety of audio formats through the [symphonia](https://github.com/pdeljanov/Symphonia) library. Supported formats include:

- **WAV** (PCM, various bit depths)
- **FLAC** (Free Lossless Audio Codec)
- **MP3** (MPEG Audio Layer III)
- **OGG Vorbis**
- **AAC** (Advanced Audio Coding)
- **ALAC** (Apple Lossless, in M4A containers)

All audio files are automatically transcoded to match your audio device's configuration (sample rate, bit depth, and format). Files can be mixed and matched within a song - for example, you can use a WAV file for your click track and an MP3 file for your backing track.

## Structure of an mtrack repository and supporting files

### Song repository
Expand Down Expand Up @@ -163,6 +178,7 @@ tracks:
file: Backing Tracks.wav
file_channel: 2
# Our keys file has two channels, but we're only interested in one.
# Note: You can use any supported audio format (WAV, MP3, FLAC, OGG, AAC, ALAC, etc.)
- name: keys
file: Keys.wav
file_channel: 1
Expand Down Expand Up @@ -205,7 +221,7 @@ $ mtrack songs --init /mnt/song-storage
```

This will create a file called `song.yaml` in each subfolder of `/mnt/storage`. The name of the
subfolder determines the song's name. WAV files are used as tracks. The track's name is
subfolder determines the song's name. Audio files (WAV, MP3, FLAC, OGG, AAC, ALAC, etc.) are used as tracks. The track's name is
determined using the file name and the number of channels within the file. MIDI files are used as
MIDI playback, MIDI files that start with `dmx_` will be used as light shows. You can edit the generated files to refine the settings to your needs.

Expand Down Expand Up @@ -247,12 +263,11 @@ audio:
# Run `mtrack devices` to see a list of the devices that mtrack recognizes.
device: UltraLite-mk5

# (Optional) The buffer size to use for background reads. Defaults to 1024 samples.
# (Optional) The buffer size for decoded audio samples. This controls how many samples
# per channel are buffered internally before being returned. Larger values reduce I/O
# operations but use more memory. Defaults to 1024 samples per channel.
buffer_size: 1024

# (Optional) The threshold for triggering background reads. Defaults to 256 samples.
buffer_threshold: 256

# (Optional) The sample rate to use for the audio device. Defaults to 44100.
sample_rate: 44100

Expand Down Expand Up @@ -768,7 +783,7 @@ lighting:
- file: "lighting/outro.light" # Multiple shows can be referenced
tracks:
- name: "backing-track"
file: "backing-track.wav"
file: "backing-track.wav" # Can be WAV, MP3, FLAC, OGG, AAC, ALAC, etc.
```

The `.light` files use the DSL format and can reference logical groups defined in your `mtrack.yaml`:
Expand Down Expand Up @@ -1415,6 +1430,7 @@ DMX is expected to be well supported through OLA, but the devices that have been

- Entec DMX USB Pro
- RatPac Satellite (Art-Net and sACN)
- Cinelex Skycast A (sACN)

### General disclaimer

Expand Down
Binary file added assets/1Channel44.1k.aac
Binary file not shown.
Binary file added assets/1Channel44.1k.flac
Binary file not shown.
Binary file added assets/1Channel44.1k.mp3
Binary file not shown.
Binary file added assets/1Channel44.1k.ogg
Binary file not shown.
Binary file added assets/1Channel44.1k_alac.m4a
Binary file not shown.
Binary file added assets/2Channel44.1k_alac.m4a
Binary file not shown.
Binary file not shown.
Binary file removed examples/songs/a-really-cool-song/backing-track.wav
Binary file not shown.
Loading