Gomu is intuitive, powerful CLI music player.

Gomu (Go Music Player)

Go Report Card Build Status Buy Me A Coffee

Gomu is intuitive, powerful CLI music player. It has embedded scripting language and event hook to enable user to customize their config extensively.

gomu

Features

  • lightweight
  • simple
  • fast
  • show audio files as tree
  • queue cache
  • vim keybindings
  • youtube-dl integration
  • audio file management
  • customizable
  • find music from youtube
  • scriptable config
  • download lyric
  • id3v2 tag editor

Dependencies

If you are using ubuntu, you need to install alsa and required dependencies

$ sudo apt install libasound2-dev go

Optional dependencies can be installed by this command

$ sudo apt install youtube-dl

Installation

$ go get -u github.com/issadarkthing/gomu

For arch users, you can install from the AUR

using yay:

$ yay -S gomu

using aura:

$ sudo aura -A gomu

Configuration

By default, gomu will look for audio files in ~/music directory. If you wish to change to your desired location, edit ~/.config/gomu/config file and change music_dir = path/to/your/musicDir.

Keybindings

Each panel has it's own additional keybinding. To view the available keybinding for the specific panel use ?

Key (General) Description
tab change panel
space toggle play/pause
esc close popup
n skip
q quit
+ volume up
- volume down
f/F forward 10/60 seconds
b/B rewind 10/60 seconds
? toggle help
m open repl
T switch lyrics
c show colors
Key (Playlist) Description
j down
k up
h close node in playlist
a create playlist
l (lowercase L) add song to queue
L add playlist to queue
d delete file from filesystemd
D delete playlist from filesystem
Y download audio
r refresh
R rename
y/p yank/paste file
/ find in playlist
s search audio from youtube
t edit mp3 tags
1/2 find lyric if available
Key (Queue) Description
j down
k up
l (lowercase L) play selected song
d remove from queue
D delete playlist
z toggle loop
s shuffle
/ find in queue
t lyric delay increase 0.5 second
r lyric delay decrease 0.5 second

Scripting

Gomu uses anko as its scripting language. You can read more about scripting at our wiki

Keybinds.def_g("ctrl_x", func() {
    out, err = shell(`echo "hello world"`)
    if err != nil {
        debug_popup("an error occured")
    }
    info_popup(out)
})

Project Background

I just wanted to implement my own music player with a programming language i'm currently learning (Go). Gomu might not be stable as it in constant development. For now, it can fulfill basic music player functions such as:

  • add and delete songs from queue
  • create playlists
  • skip
  • play
  • pause
  • forward and rewind

Album Photo

For songs downloaded by Gomu, the thumbnail will be embeded as Album cover. If you're not satisfied with the cover, you can edit it with kid3 and attach an image as album cover. Jpeg is tested, but other formats should work as well.

Donation

Hi! If you guys think the project is cool, you can buy me a coffee ;)

Buy Me A Coffee

Seeking and more advanced stuff has not yet been implemented; feel free to contribute.

Owner
Raziman Mahathir
Self taught bug maker
Raziman Mahathir
Comments
  • Fix race conditions

    Fix race conditions

    Trying to fix race conditions in two places:

    1. player.go , ctrl and format need to lock before access
    2. playingbar.go, run() and newprogress() are accessing same values but run is in goroutines.

    Please kindly check if the code make sense, or better solution you thought of.

    Currently I don't have race conditions detected during several operation like skip, forward, download lyric etc.

  • lyrics in progress bar

    lyrics in progress bar

    Currently the progress is:

    1. Download subtitles(need to move language setting to config)
    2. Edit tag and embed lyrics(need to check workflow, as currently enter key will close the popup, and could be triggered by user in many controls, also the lyric name displayed is not long enough, to show the language difference)
    3. Display below progress bar.

    Please check if it's all right and have a nice day.

  • Sylt synchronized lyric support

    Sylt synchronized lyric support

    Support synchronized lyric. It should be standard sylt format, but the problem is, I cannot find any other program to test. I can open it with kid3 without problem.

  • Focus control

    Focus control

    I added a new PR for tag editing and lyric previewing. This is a flex contains a bunch of other controls. I met a problem: When I use popup message boxes to show the messages, the focus can fallback to flex, but will always focus on the first control in the flex. It's not intuitive. How to avoid focus switching? As the message boxes don't need focus. Thanks in advance.

  • Lyric support and mp3tag

    Lyric support and mp3tag

    There are some videos on youtube that have subtitles of different languages, and it could be downloaded with youtube-dl as well. I think we could write it as lyric into mp3 and show it in playingBar(if the timestamp is syncronized) or a different panel(if no timestamp). Several options should be added, for example which language is preferred.

  • Accidentally delete whole directory

    Accidentally delete whole directory

    I deleted my mp3 directory completely, by accident, but several times. What I want to do is to clear the queue, but I didn't notice that the focus is not in queue. And right after I confirm the operation(it's too fast by keyboard), I know it's wrong. Fortunately I have complete backup for 30 days, but I think it's a possible problem. What's the better logic to solve it?

  • Installation errors

    Installation errors

    Hi there! This app looks very interesting, but I cannot install it (Pop!_OS 20.04) getting these errors:

    $ go get -u github.com/issadarkthing/gomu
    # github.com/rivo/tview
    go/src/github.com/rivo/tview/box.go:343:63: cannot convert b.borderAttributes (type tcell.AttrMask) to type tcell.Style
    go/src/github.com/rivo/tview/table.go:331:108: cannot convert attributes (type tcell.AttrMask) to type tcell.Style
    go/src/github.com/rivo/tview/table.go:888:150: cannot convert cell.Attributes (type tcell.AttrMask) to type tcell.Style
    go/src/github.com/rivo/tview/table.go:957:63: cannot convert a (type tcell.AttrMask) to type tcell.Style
    go/src/github.com/rivo/tview/table.go:1020:24: invalid operation: t.selectedStyle != 0 (mismatched types tcell.Style and int)
    
  • lang written doesn't not comply to standard

    lang written doesn't not comply to standard

    Currently lang for uslt and sylt are both eng, not actually the language of lyrics. We could write the actual language easily when fetch lyrics, but for lyrics from youtube, I didn't find any specification for the language extension. What do you think?

  • Forward and rewind with

    Forward and rewind with "f F b B" keys

    Recently I'm listening to some very long recordings, so forward is a must. I use the seek method of beep.streamseekcloser. However, in order to do it, I have to get this object outside of Player struct. Don't know if this is the correct way, but it's working. Also, fixed a small bug when play_selected but no song is selected or empty queue and panic.

  • Better color support

    Better color support

    Currently, our config file uses 6 digit hex value to represent color in the terminal. While this is convenient to add your own color but it doesn't mean it will produce the correct color. Having to try and error using different hex values each time will make it difficult to configure. By using tcell.ColorNames we can easily see available colors can be produced in the terminal with their respective name. This is much easier compared to use hex value.

    Pressing c in gomu will show available colors: image

  • Possible bug song played slow

    Possible bug song played slow

    Haven't found a way to reproduce it, but sometimes the song is played slower than normal, means that the tone is lower. I checked player.go, and found speaker.init was called once, with the samplerate of current song. If another song is with different samplerate, it'll be a problem right? That being said, I've never met a song was played with higher tone.

  • Better config/new test for start.go

    Better config/new test for start.go

    I'd like to modify the way config is set up. By default the config file is hardcoded in start.go and the user has to copy it's contents instead of being able to launch the player instantly, which is not good. Also it should be more agnostic, for example by using os.UserHomeDir instead of "~".

    But first of all I think test coverage should be increased before doing any major changes and I think this PR might be a good starting point.

  • Unable to use it

    Unable to use it

    After install from AUR using paru

    $ paru -Qi gomu
    Name            : gomu
    Version         : 2.1.1-1
    Description     : Terminal User Interface (TUI) Music Player
    Architecture    : x86_64
    URL             : https://github.com/issadarkthing/gomu
    Licenses        : GPL
    Groups          : None
    Provides        : None
    Depends On      : alsa-lib  youtube-dl
    Optional Deps   : fzf [installed]
    Required By     : None
    Optional For    : None
    Conflicts With  : gomu-git  gomu-bin
    Replaces        : None
    Installed Size  : 12.13 MiB
    Packager        : Unknown Packager
    Build Date      : Tue 19 Apr 2022 04:58:22 PM CST
    Install Date    : Tue 19 Apr 2022 04:58:34 PM CST
    Install Reason  : Explicitly installed
    Install Script  : No
    Validated By    : None
    
    $ gomu
    open /home/chz/.config/gomu/config: no such file or directory
    

    After I create /home/chz/.config/gomu/config and add

    $ cat ~/.config/gomu/config
    music_dir = ~/Music
    $ gomu -version
    Gomu
    $ gomu
    syntax error: unexpected $unk
    
    
  • stat1.Mtim undefined in ztypes_darwin_amd64

    stat1.Mtim undefined in ztypes_darwin_amd64

    type Stat_t in the method populate of playlist.go has different modify time name with different kernel. image ex: https://github.com/golang/go/blob/master/src/syscall/ztypes_linux_amd64.go#L114 https://github.com/golang/go/blob/master/src/syscall/ztypes_darwin_arm64.go#L75

  • Supported Audio Formats

    Supported Audio Formats

    Hi, I tried GOMU it looks promising. But unfortunately, I could not play m4a files, says

    mp3: free bitrate format is not supported. Header word is 0xffff0000 at position 83679
    

    Although I could play mp3 files, most of my files are m4a. It would be nice if you could list out the supported formats upfront. I hope in the future gomu supports lossless codecs.

  • Problem regarding cpu usage

    Problem regarding cpu usage

    I met a problem for both beep and mpd: When open the app, the cup usage for gomu in gotop for mpd is about 2%, and beep is about 20%. After pressing N for like 10 seconds or more (skip), the cup usage for mpd is 40% and beep is 50%, and they don't drop back.

    I think it's probably related to the go routine for play. I mean, the player.Run is in go routing, and it never returns, but it will spawn another go routine for next song.

    What do you think?

Podcast CLI player
Podcast CLI player

Top-like interface for listening to podcasts podcast-cli lets you play your favourite podcasts from the terminal: podcast-cli is entirely built with G

Oct 31, 2022
Unlock Music Project - CLI Edition

Unlock Music Project - CLI Edition Original: Web Edition

Nov 2, 2022
Sequence-based Go-native audio mixer for music apps

Mix https://github.com/go-mix/mix Sequence-based Go-native audio mixer for music apps See demo/demo.go: package main import ( "fmt" "os" "time"

Dec 1, 2022
Go library for searching on YouTube Music.

ytmusic Go library for searching on YouTube Music and getting other useful information. Installing go get github.com/raitonoberu/ytmusic Usage Search

Oct 15, 2022
A music programming language for musicians. :notes:

Installation | Docs | Changelog | Contributing composers chatting Alda is a text-based programming language for music composition. It allows you to co

Dec 30, 2022
Self-hosted music streaming server 🎶 with RESTful API and Web interface
Self-hosted music streaming server 🎶 with RESTful API and Web interface

Self-hosted music streaming server ?? with RESTful API and Web interface. Think of it as your very own Spotify!

Dec 27, 2022
Download and listen music in the terminal!
Download and listen music  in the terminal!

?? this cli still has a lot of bugs ?? A simple tool to download and listen music in the terminal. You will need: golang deno v1.16+ youtube-dl Instal

Dec 2, 2022
A tool coded by GO to decode cryptoed netease music files and qqmusic files

nqdumpgo A tool coded by GO to decode cryptoed netease music files and qqmusic files 一个使用 Go 语言编写的用于解密被网易云音乐或 QQ 音乐加密的文件的程序,Go 程序在拥有与 C++程序相近的效率的同时,大大

Dec 13, 2022
Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

Nov 18, 2022
Kwed-dl - A tool to download latest music files from remix.kwed.org

kwed-dl A small program to download latest tracks from remix.kwed.org. Keeps a counter in your home-folder (_kwedrc on windows and .kwedrc on linux).

May 24, 2022
Muclean - A simple music file renamer

Muclean A simple music file renamer Installation go install github.com/CJ-Jackso

Jan 23, 2022
MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

BGPiano MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets. Usage bgpiano-send and bgpiano-recv Po

Jun 9, 2022
Simple cli utility to show bitrate/samples of flac files in a directory

flac-specs Simple cli utility to show bitrate/samples of flac files in a directory I needed a quick little utility that would look at the flac files i

Dec 14, 2021
subsonic terminal music player

STMP (subsonic terminal music player) A terminal client for *sonic music servers. Inspired by ncmpcpp. Features browse by folder queue songs and album

Dec 21, 2022
Fast, intuitive, and powerful configuration-driven engine for faster and easier REST development
Fast, intuitive, and powerful configuration-driven engine for faster and easier REST development

aicra is a lightweight and idiomatic configuration-driven engine for building REST services. It's especially good at helping you write large APIs that remain maintainable as your project grows.

Oct 19, 2022
CLI audio player written in go.
CLI audio player written in go.

A very minimal CLI audio player.

Dec 13, 2022
Podcast CLI player
Podcast CLI player

Top-like interface for listening to podcasts podcast-cli lets you play your favourite podcasts from the terminal: podcast-cli is entirely built with G

Oct 31, 2022
painless task queue manager for shell commands with an intuitive cli interface (execute shell commands in distributed cloud-native queue manager).

EXEQ DOCS STILL IN PROGRESS. Execute shell commands in queues via cli or http interface. Features Simple intuitive tiny cli app. Modular queue backend

Dec 14, 2022
A cross platform CLI for Flyte. Written in Golang. Offers an intuitive interface to Flyte https://flytectl.readthedocs.io/en/latest/
A cross platform CLI for Flyte. Written in Golang. Offers an intuitive interface to Flyte https://flytectl.readthedocs.io/en/latest/

FlyteCTL Flyte's official command-line interface Documentation · Contribution Guide FlyteCTL was designed as a portable and lightweight command-line i

Nov 7, 2022
[WIP] a very simple, tiny and intuitive ffmpeg wrapper with a cli interface for inspecting & transforming media files supported by the original ffmpeg software

About a very simple, tiny and intuitive ffmpeg wrapper with a cli interface for inspecting & transforming media files supported by the original ffmpeg

Oct 21, 2022