Ncmpcpp

Ncmpcpp
Ncmpcpp is a sys-libs/ncurses based MPD (Music Player Daemon) client similar to ncmpc, with a few new and improved features.

Installation
Before using ncmpcpp, MPD must first be installed on the system and should be added to the default runlevel. Please refer to https://wiki.gentoo.org/wiki/MPD for more information regarding MPD.

If music visualization is requested then one must enable the visualizer local USE flag within the /etc/portage/package.use directory.

root # emerge --ask media-sound/ncmpcpp

Configuration
After installation the user should make a .ncmpcpp directory within the /home/user directory. This is where ncmpcpp will read the configuration file and output any error messages.

user # mkdir .ncmpcpp && touch .ncmpcpp/config

Basic Configuration
Below is an example of a basic ncmpcpp config file.

file: .ncmpcpp/config

ncmpcpp_directory =	"~/.ncmpcpp" mpd_host =		"/var/lib/mpd/socket" mpd_port =		"6600" mpd_music_dir =	"/var/lib/mpd/music/" visualizer_fifo_path = "/tmp/mpd.fifo" visualizer_output_name = "my_fifo" visualizer_sync_interval = "30" visualizer_in_stereo = "yes" visualizer_type = "spectrum" (spectrum/wave) visualizer_look = "+|" audio_output { type                   "fifo" name                   "my_fifo" path                   "/tmp/mpd.fifo" format                 "44100:16:2" }
 * 1) visualizer_type = "wave" (spectrum/wave)

Note that ncmpcpp must be connected to the MPD UNIX socket via mpd_host. Also depending on users and permissions /var/lib/mpd/socket and /var/lib/mpd/music/ may need to be appended to a different directory, so that ncmpcpp can work client side with MPD. Any changes must also be added to /etc/mpd.conf. Make sure to stop MPD before making any changes to it's configuration file, or else the daemon will not restart properly until system reboot.

If visualizer support was not added to ncmpcpp then only the first four lines are needed for .ncmpcpp/config to run properly.

PulseAudio
If MPD was built with PulseAudio support then a few changes will need to be made within /etc/mpd.conf. Make sure to stop the service before editing the configuration file.

root # rc-service mpd stop

Below is an example of an MPD configuration built with both PulseAudio and Alsa support.

file: /etc/mpd.conf

music_directory			"/var/lib/mpd/music" playlist_directory		"/var/lib/mpd/playlists" db_file				"/var/lib/mpd/database" log_file			"/var/lib/mpd/log" pid_file			"/var/lib/mpd/pid" state_file			"/var/lib/mpd/state" user				"MPD" bind_to_address		       "localhost" bind_to_address		       "/var/lib/mpd/socket" port				"6600" input { plugin "curl" } audio_output { type		"alsa" name		"My ALSA Device" device	       "hw:0,0"	# optional mixer_type    "software"	# optional mixer_device	"default"	# optional mixer_control	"PCM"		# optional mixer_index	"0"		# optional } audio_output { type		"pulse" name		"My MPD Pulse Output" mixer_control	"Master" } audio_output { type                   "fifo" name                   "my_fifo" path                   "/tmp/mpd.fifo" format                 "44100:16:2" } filesystem_charset "UTF-8"
 * 1)       proxy "proxy.isp.com:8080"
 * 2)       proxy_user "user"
 * 3)       proxy_password "password"
 * 1) 	 server		"remote_server"		# optional

Lastely you must start the MPD service or if MPD is added to the default runlevel a system reboot will also suffice.

root # rc-service mpd start

If ncmpcpp doesn't have volume control and/or doesn't connect to the MPD UNIX socket then be sure to check your users and permissions. Permissions within the /var/lib/ directory are reverted to default after reboot for security purposes, so again one may have to append the contents of /var/lib/mpd to a different directory.