Install and configure mpd & ncmpcpp on Mac
Follow these steps and you are done.
- Install mpd and ncmpcpp using brew
brew install mpd brew install ncmpcpp
- Create
~/.mpd/mpd.conf
and add this content.
bind_to_address "127.0.0.1" bind_to_address "192.168.0.2" music_directory "~/songs" playlist_directory "~/songs/playlists" db_file "~/.mpd/mpd.db" log_file "~/.mpd/mpd.log" pid_file "~/.mpd/mpd.pid" state_file "~/.mpd/mpdstate" auto_update "yes" audio_output { type "osx" name "My Mac Device" mixer_type "software" } audio_output { type "fifo" name "my_fifo" path "/var/folders/jp/_h08pdsfdsd_4nqsdfsdw9443m0000gp/T/mpd.fifo" format "44100:16:2" }
On mac find your temp directory using printenv |grep TMP
. Also create/specify the directories. As you can see the bind_to_address
has two addresses, one for local client ncmpcpp
and the other one the mobile app which I will use later to control the music from my phone. Cool isn't it?
- Start mpd
brew services start mpd
- Create
~/.ncmpcpp/config
and add this content.
visualizer_fifo_path = "/var/folders/jp/_h08pdsfdsd_4nqsdfsdw9443m0000gp/T/mpd.fifo" visualizer_output_name = "my_fifo" visualizer_sync_interval = "30" visualizer_in_stereo = "yes" visualizer_type = "spectrum" visualizer_look = "+|"
This is really it. Now open ncmpcpp
and it will connect to your mpd server. You can also search for mpd client apps and control the music. Just make sure the ip address is correct. Change it in the ~/.mpd/mpd.conf
if needed.
There is more you can do. Refer to these sites:
- https://wiki.archlinux.org/index.php/Music_Player_Daemon
- https://wiki.archlinux.org/index.php/ncmpcpp
- ncmpcpp cheat sheet: https://pkgbuild.com/~jelle/ncmpcpp/
Enjoy. More later.