Skip to content

About Melodica - A cross-platform, console-based audio player built with Go, featuring playback controls, volume adjustment, and playlist support for MP3 files.

License

Notifications You must be signed in to change notification settings

zombocoder/melodica

Repository files navigation

Melodica

Build Release

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.

Screenshot

image

Features

  • Cross-platform: Supports Linux, macOS (including Apple Silicon), and Windows.
  • Console Interface: Simple and lightweight user interface using the terminal.
  • Controls:
    • Enter: Play selected track
    • s: Stop playback
    • n: Next track
    • p: Previous track
    • x: Pause/Resume playback
    • >: Volume up
    • <: Volume down
    • Esc: Quit application

Installation

Homebrew (macOS)

To install Melodica on macOS via Homebrew, use the following commands:

  1. Tap the repository:

    brew tap zombocoder/melodica
  2. Install Melodica:

    brew install melodica

Go Installation

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.

Usage

  1. 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
  2. Run Melodica:

    melodica playlist.txt
  3. Controls: Use the following key bindings within the application:

    • Enter: Play the selected track from the playlist
    • s: Stop the current track
    • n: Skip to the next track
    • p: Go back to the previous track
    • x: Pause or resume playback
    • >: Increase volume
    • <: Decrease volume
    • Esc: Quit the application

Makefile Commands

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

Disclaimer

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.


Development

To contribute or run the application locally:

  1. Clone the repository:

    git clone https://github.com/zombocoder/melodica.git
    cd melodica
  2. Build the application using Makefile:

    make build
  3. Run the application with your playlist:

    go run cmd/melodica/main.go playlist.txt

Building for Other Platforms

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.

License

This project is licensed under the MIT License.

About

About Melodica - A cross-platform, console-based audio player built with Go, featuring playback controls, volume adjustment, and playlist support for MP3 files.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks