# matcha
A digging companion that finds compatible tracks based on `Key` and `BPM` tags.
## Features
* Find tracks with compatible musical keys using Camelot/Harmonic mixing rules
* Filter tracks by BPM tolerance (drift)
* Support for local music library scanning
* Generate M3U playlists of matched tracks
* Verbose output for debugging
## Building
To build the project, run:
```sh
cargo build --release
```
## Usage
```sh
./target/release/matcha <REFERENCE_TRACK> [OPTIONS] <SOURCE_PATH>...
```
### Arguments
* `<REFERENCE_TRACK>`: The path to the reference audio file.
* `<SOURCE_PATH>...`: One or more directories to search for compatible tracks.
### Options
* `-d`, `--drift <DRIFT>`: BPM drift tolerance. If specified, only tracks with a BPM within `DRIFT` of the reference track will be shown.
* `-p`, `--playlist`: Create an M3U playlist file with matched tracks (saved alongside reference track).
* `-v`, `--verbose`: Enable verbose output, showing the number of files found.
* `-h`, `--help`: Print help information.
* `-V`, `--version`: Print version information.
### Example
```sh
# Print all tracks with matching key
./target/release/matcha /path/to/my/track.mp3 /path/to/my/music/library
# Print all tracks with matching key and custom drift range
./target/release/matcha /path/to/my/track.mp3 --drift 2.0 /path/to/my/music/library
# Create an M3U playlist with matched tracks
./target/release/matcha /path/to/my/track.mp3 --playlist /path/to/my/music/library
```