Melodica is a console-based audio player built with Go. It supports playback of MP3 files from a playlist and includes basic controls like play, stop, next, previous, volume control, and more. The application is designed to work across multiple operating systems, including Linux, macOS, and Windows.
- Cross-platform: Supports Linux, macOS (including Apple Silicon), and Windows.
- Console Interface: Simple and lightweight user interface using the terminal.
- Controls:
Enter
: Play selected tracks
: Stop playbackn
: Next trackp
: Previous trackx
: Pause/Resume playback>
: Volume up<
: Volume downEsc
: Quit application
To install Melodica on macOS via Homebrew, use the following commands:
-
Tap the repository:
brew tap zombocoder/melodica
-
Install Melodica:
brew install melodica
If you prefer to install Melodica via Go, ensure you have Go installed (version 1.20 or later), then run:
go install github.com/zombocoder/melodica/cmd/melodica@latest
This command will download and install Melodica into your $GOPATH/bin
directory.
-
Download a Sample Playlist: To get started quickly, download a sample
playlist.txt
file from GitHub:curl -o playlist.txt https://raw.githubusercontent.com/zombocoder/melodica/main/playlist.txt
-
Run Melodica:
melodica playlist.txt
-
Controls: Use the following key bindings within the application:
Enter
: Play the selected track from the playlists
: Stop the current trackn
: Skip to the next trackp
: Go back to the previous trackx
: Pause or resume playback>
: Increase volume<
: Decrease volumeEsc
: Quit the application
The Makefile
provides a convenient way to build and run the application, as well as clean up generated files.
-
Build: Compile the application for your OS.
make build
-
Run: Run the application with a specified playlist file.
make run PLAYLIST=playlist.txt
-
Test: Run all tests.
make test
-
Clean: Remove the compiled binary and other generated files.
make clean
The audio files used in Melodica are sourced from Lofi Girl's website and are subject to their licensing guidelines.
Please ensure compliance with Lofi Girl's licensing terms if you plan to use Melodica in a commercial context.
To contribute or run the application locally:
-
Clone the repository:
git clone https://github.com/zombocoder/melodica.git cd melodica
-
Build the application using
Makefile
:make build
-
Run the application with your playlist:
go run cmd/melodica/main.go playlist.txt
This project is configured with a GitHub Actions workflow that builds and releases artifacts for Linux, macOS (including Apple Silicon), and Windows on each tagged release.
This project is licensed under the MIT License.