Skip to content

Instantly share code, notes, and snippets.

@lirenlin
Last active February 13, 2025 06:56
Show Gist options
  • Save lirenlin/f92c8e849530ebf66604 to your computer and use it in GitHub Desktop.
Save lirenlin/f92c8e849530ebf66604 to your computer and use it in GitHub Desktop.
simple mpd and ncmpcpp setup

https://wiki.archlinux.org/index.php/Music_Player_Daemon

sudo apt-get install mpd mpc ncmpcpp  

mkdir .mpd  
mkdir -p ~/.mpd/playlists
touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate}  

cp /usr/share/doc/mpd/mpdconf.example ~/.mpd/mpd.conf
vim ~/.mpd/mpd.conf
# Required files
db_file            "~/.config/mpd/database"
log_file           "~/.config/mpd/log"

# Optional
music_directory    "~/Music"
playlist_directory "~/.config/mpd/playlists"
pid_file           "~/.config/mpd/pid"
state_file         "~/.config/mpd/state"
sticker_file       "~/.config/mpd/sticker.sql"

#run as current local user
#user                 "mpd"

#To change the volume for mpd independent from other programs
mixer_type            "software"

# for visualization
audio_output {
    type                    "fifo"
    name                    "my_fifo"
    path                    "/tmp/mpd.fifo"
    format                  "44100:16:2"
}
$ mpd config_file

if you got the following message: Failed to bind to '[::]:6600': Address already in use

$ sudo service mpd stop

https://wiki.archlinux.org/index.php/Ncmpcpp

$ cp /usr/share/doc/ncmpcpp/config ~/.ncmpcpp/
$ vim ~/.ncmpcpp/config
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_output_name = "my_fifo"
visualizer_sync_interval = "30" 
visualizer_in_stereo = "yes"
#visualizer_type = "wave" (spectrum/wave)
visualizer_type = "spectrum" (spectrum/wave)
$ ncmpcpp
@johnpiers
Copy link

Thanks, this is one of the simplest, shortest, easiest method I've ever found and I've been using ncmpcpp for a very long time. (ARCH user for just as long). The installation bitched about 'timidity++' (A MIDI to WAVE converter and player) not being installed and that it could not find 'timidity.cfg', and when installed it's found in /etc/timidity Once I installed 'timidity++', it cleared the message.

Thanks again. Best regards Piers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment