0re5ama

Untitled

Sep 1st, 2016
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mpd/ncmpcpp setup tutorial - made by an anonymous user on /g/
  2. ____________________
  3.  
  4. --INTRODUCTION--
  5. Getting mpd with ncmpcpp set up can seem like a daunting task. Seriously, it took me a while before it was firmly rooted into my head that the player is called "ncmpcpp" because it's just so unnatural. Anyway, mpd with ncmpcpp is currently one of the best audio players on *nix. It works on a server/client connection - ncmpcpp works as a front end, or controller, for mpd, that actual music player. Basically, ncmpcpp provides a nice looking, easy to use interface for mpd, the actual music player.
  6. It is not uncommon for a person new to mpd to think that mpd/ncmpcpp is hard to set up. In reality, most confusion over setting up mpd with ncmpcpp comes from bad explanation - one person may say to do this, another may say to do that, and in the end, the user still does not understand what they are doing and gives up even more confused than they intially were.
  7. It is because of this that this text file was made as a guide to the setup of mpd and ncmpcpp themselves - this is not about advanced configuration (although this guide does detail the most basic configuration for ncmpcpp), this is about getting it working.
  8.  
  9. --SETTING IT UP--
  10. 1. Install "mpd", "mpc" and "ncmpcpp" from package manager (apt if ubuntu/debian, yum if fedora, etc.)
  11. 2. Use "sudo mpd" to launch mpd
  12. *mpd will continue to run unless you use "mpd --kill" or "killall mpd". If you get a message that "address is already in use" when trying to "sudo mpd", this just means that mpd is already running. You don't need to mess with it.
  13. 3. Go into /etc/mpd.conf (open with text editor of your choice) to set your "music_directory". This is a path, determining where mpd looks to find your music. The default is /var/lib/mpd/music, but you can change it to anything you like, for example, home/yourusername/Music (your "Music" folder on Ubuntu).
  14. 4. If you are on a modern distro, you probably use pulse audio (Ubuntu users, this means you), but you might use alsa. If you use pulse, make sure your mpd.conf contains these lines, and that they are not commented out with a #:
  15. audio_output {
  16. type "pulse"
  17. name "whatever name you want"
  18. }
  19. If you use alsa, instead, use:
  20. audio_output {
  21. type "alsa"
  22. name "whatever name you want"
  23. 5. You are now ready to use ncmpcpp. Just type in "ncmpcpp" in the terminal, and ncmpcpp is launched. Ncmpcpp contains instructions on how to access your music, which you can get to by pressing "1" on the keyboard. Before you do this, however, you must make sure your music library is updated. To update your library, simply press "u".
  24. If you want to make sure you have the right audio_output in your mpd.conf file,add an object to your playlist and try to play it. If it plays normally, you have the right audio_output. If it does not play. you can check and see if the problem is the audio_output by going back to the command line (open a new terminal window or press "q") and typing in "mpc". This will tell you if there is an audio_output error. If it is working properly, you will not see an error message, and the problem may be solveable simply by restarting mpd.
  25.  
  26. --CONFIGURATION--
  27. 1. Inside the hidden directory in your home folder ".ncmpcpp", create a file called "config" with vim/nano/emacs or whatever other text editor you use.
  28. 2. A template which guides you through configuration and can be modified/used as a config file can be found at the end of this text file, under "--CONFIG TEMPLATE--". Paste this into the newly created "config" file. This will guide you through configuration of ncmpcpp
  29.  
  30. --GETTING VISUALIZATIONS WORKING--
  31. 1. To your mpd.conf file, add these lines:
  32. audio_output {
  33. type "fifo"
  34. name "whatever you want the name to be"
  35. path "/tmp/mpd.fifo" #This is the path to the fifo file, it can be whatever you want as long as "mpd.fifo" is present.
  36. format "44100:16:1"
  37. }
  38. 2. For our example to work, you will use the "mkfifo" command to create file "mpd.fifo" inside of "/tmp".
  39. 3. To your .ncmpcpp/config, add:
  40. visualizer_fifo_path = "/tmp/mpd.fifo"
  41. visualizer_type = "spectrum" (spectrum/wave)
  42. visualizer_color = "default" # can be any color you like
  43.  
  44. --CONFIG TEMPLATE--
  45. ####################################################
  46. ## this is example configuration file, copy it to ##
  47. ## ~/.ncmpcpp/config and set up your preferences ##
  48. ####################################################
  49. #
  50. ##### connection settings #####
  51. #
  52. ## set it in order to make tag editor and renaming files work properly
  53. #
  54. mpd_host = "localhost"
  55. #
  56. mpd_port = "6600"
  57. #
  58. mpd_music_dir = "/home/sash/music"
  59. #
  60. #mpd_connection_timeout = "5"
  61. #
  62. #mpd_crossfade_time = "5"
  63. #
  64. ##### delays #####
  65. #
  66. ## delay after playlist highlighting will be disabled (0 = don't disable)
  67. #
  68. #playlist_disable_highlight_delay = "5"
  69. #
  70. ## defines how long various messages are supposed to be visible
  71. #
  72. #message_delay_time = "4"
  73. #
  74. ##### song format #####
  75. ##
  76. ## for song format you can use:
  77. ##
  78. ## %l - length
  79. ## %f - short filename
  80. ## %F - full filename
  81. ## %a - artist
  82. ## %t - title
  83. ## %b - album
  84. ## %y - year
  85. ## %n - track number
  86. ## %g - genre
  87. ## %c - composer
  88. ## %p - performer
  89. ## %d - disc
  90. ## %C - comment
  91. ## %r - begin right align
  92. ##
  93. ## you can also put them in { } and then it will be displayed
  94. ## only if all requested values are available and/or define alternate
  95. ## value with { }|{ } eg. {%a - %t}|{%f}
  96. ##
  97. ## text can also have different color than the main window has,
  98. ## eg. if you want length to be green, write $3%l$9
  99. ##
  100. ## available values:
  101. ##
  102. ## - 0 - default window color
  103. ## - 1 - black
  104. ## - 2 - red
  105. ## - 3 - green
  106. ## - 4 - yellow
  107. ## - 5 - blue
  108. ## - 6 - magenta
  109. ## - 7 - cyan
  110. ## - 8 - white
  111. ## - 9 - end of current color
  112. ##
  113. ## Note: colors can be nested.
  114. ##
  115. #
  116. song_list_format = "{%a - }{%t}|{$8%f$9}%r{$3(%l)$9}"
  117. #
  118. #song_library_format = "{%n - }{%t}|{%f}"
  119. #
  120. #media_library_album_format = "{(%y) }%b"
  121. #
  122. #tag_editor_album_format = "{(%y) }%b"
  123. #
  124. #browser_playlist_prefix = "$2playlist$9 "
  125. #
  126. #selected_item_prefix = "$6"
  127. #
  128. #selected_item_suffix = "$9"
  129. #
  130. ## colors are not supported for below veriables
  131. #
  132. song_status_format = "{(%l) }{%a - }{%t}|{%f}"
  133. #
  134. #song_window_title_format = "{%a - }{%t}|{%f}"
  135. #
  136. ##### columns settings #####
  137. ##
  138. ## syntax of song columns list format is "column column etc."
  139. ##
  140. ## - syntax for each column is:
  141. ##
  142. ## (width of column in %)[column's color]{displayed tag}
  143. ##
  144. ## - color is optional (if you want the default one, type [])
  145. ##
  146. #
  147. #song_columns_list_format = "(7)[green]{l} (28)[cyan]{a} (28)[]{b} (50)[red]{t}"
  148. #
  149. ##### various settings #####
  150. #
  151. #playlist_display_mode = "classic" (classic/columns)
  152. #
  153. #incremental_seeking = "yes"
  154. #
  155. #seek_time = "1"
  156. #
  157. #autocenter_mode = "no"
  158. #
  159. #repeat_one_mode = "no"
  160. #
  161. #default_place_to_search_in = "database" (database/playlist)
  162. #
  163. #media_library_left_column = "a" (possible values: a,y,g,c,p, legend above)
  164. #
  165. #default_find_mode = "wrapped" (wrapped/normal)
  166. #
  167. #default_space_mode = "add" (add/select)
  168. #
  169. #default_tag_editor_left_col = "albums" (albums/dirs)
  170. #
  171. #default_tag_editor_pattern = "%n - %t"
  172. #
  173. #header_visibility = "yes"
  174. #
  175. #statusbar_visibility = "yes"
  176. #
  177. fancy_scrolling = "yes"
  178. #
  179. #follow_now_playing_lyrics = "no"
  180. #
  181. #ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add)
  182. #
  183. #display_screens_numbers_on_start = "yes"
  184. #
  185. #clock_display_seconds = "no"
  186. #
  187. #enable_window_title = "yes"
  188. #
  189. ##### colors definitions #####
  190. #
  191. #colors_enabled = "yes"
  192. #
  193. #empty_tag_color = "cyan"
  194. #
  195. #header_window_color = "default"
  196. #
  197. #volume_color = "default"
  198. #
  199. #state_line_color = "default"
  200. #
  201. #state_flags_color = "default"
  202. #
  203. #main_window_color = "yellow"
  204. #
  205. #color1 = "white"
  206. #
  207. #color2 = "green"
  208. #
  209. #main_window_highlight_color = "yellow"
  210. #
  211. #progressbar_color = "default"
  212. #
  213. #statusbar_color = "default"
  214. #
  215. #active_column_color = "red"
  216. #
  217. #window_border_color = "green"
  218. #
  219. #active_window_border = "red"
  220. #
Add Comment
Please, Sign In to add comment