Difference between revisions of "Ncmpcpp"

From ArchWiki
Jump to: navigation, search
m (typo)
m (added the shortcuts for play/pause and volume control, weird that the original author didn't include them.)
 
(30 intermediate revisions by 20 users not shown)
Line 1: Line 1:
[[Category:Audio/Video]]
+
[[Category:Multimedia players]]
 +
[[de:Ncmpcpp]]
 
[[it:Ncmpcpp]]
 
[[it:Ncmpcpp]]
{{Article summary start}}
+
[[ja:Ncmpcpp]]
{{Article summary text|Covers installation and usage of ncmpcpp (ncmpc++)}}
+
[[pl:Ncmpcpp]]
{{Article summary heading|Related}}
+
{{Related articles start}}
{{Article summary wiki|mpd}} - Music Player Daemon
+
{{Related|mpd}}
{{Article summary end}}
+
{{Related articles end}}
 +
[http://unkart.ovh.org/ncmpcpp/ Ncmpcpp] or ncmpcpp is an [[mpd]] client (compatible with ''mopidy'') with a UI very similar to ''ncmpc'', but it provides new useful features such as support for regular expressions for library searches, extended song format, items filtering, the ability to sort playlists, and a local filesystem browser.
  
==Introduction==
+
To use it, a functional ''mpd'' must be present on the system since ''ncmpcpp''/''mpd'' work together in a client/server relationship.
[http://unkart.ovh.org/ncmpcpp/ Ncmpcpp] or ncmpc++ is an [[mpd]] client with a UI very similar to ncmpc, but it provides new useful features such as support for regular expressions in search engine, extended song format, items filtering, last.fm support, ability to sort playlist, local filesystem browser and other minor functions.  To use it, a functional [[mpd]] must be present on the system since ncmpcpp/mpd work together in a client/server relationship.
+
  
The shell "GUI" for ncmpcpp is highly customizable.  Edit {{ic|~/.ncmpcpp/config}} to your liking.  For inspiration, see the following resources:
+
== Installation ==
  
* [https://bbs.archlinux.org/viewtopic.php?id=66488 Show your .ncmpcpp/config with Screenshot forum thread]
+
[[Install]] {{Pkg|ncmpcpp}} from the [[official repositories]].
* [http://unkart.ovh.org/ncmpcpp/screenshots.php Project screenshots page]
+
  
==Installation==
+
== Basic configuration ==
The official package resides in [community]
+
# pacman -S ncmpcpp
+
  
==(Very) Basic configuration==
+
The shell "GUI" for ''ncmpcpp'' is highly customizable. Edit {{ic|~/.ncmpcpp/config}} to your liking. If, after installation, {{ic|~/.ncmpcpp/config}} has not been created, simply copy the sample config, [[File_permissions_and_attributes#Changing_ownership|change owner]] and edit at the very least the following three configuration options:
After installation a sample configuration file can be found in /usr/share/doc/ncmpcpp/config
+
  
If, after installation, ~/.ncmpcpp/config has not been created, you could copy the sample config, [[chmod#chown|change owner]] and edit at the very least the following three configuration options:
+
* '''mpd_host''' - Should point to the host on which ''mpd'' resides, can be "localhost" or "127.0.0.1" if on the same machine
 +
* '''mpd_port''' - The default of ''mpd'' should be "6600"
 +
* '''mpd_music_dir''' - The same directory value as specified in "music_directory" in {{ic|mpd.conf}}
  
* mpd_host (should point to the host on which mpd resides, can be "localhost" or "127.0.0.1" if on the same machine)
+
For inspiration, see the following resources:
* mpd_port (unless you've changed the defaults of mpd, this should be "6600")
+
* Sample configuration file in {{ic|/usr/share/doc/ncmpcpp/config}}.
* mpd_music_dir (the same directory value as specified in "music_directory" in mpd.conf)
+
* [https://bbs.archlinux.org/viewtopic.php?id=66488 Show your .ncmpcpp/config with screenshot forum thread]
 +
* [http://unkart.ovh.org/ncmpcpp/screenshots.php Project screenshots page]
  
==Enabling visualization==
+
== Enabling visualization ==
For visualization, one needs the {{AUR|ncmpcpp-git}} package from the [[AUR]].  Once built, add a few lines to {{ic|/etc/mpd.conf}} to enable the generation of the [[Wikipedia:Fast Fourier transform|fast Fourier transform]] data for the visualization:
+
  
<pre>
+
For visualization, add a few lines to {{ic|/etc/mpd.conf}} to enable the generation of the [[Wikipedia:Fast Fourier transform|fast Fourier transform]] data for the visualization:
audio_output {
+
 
    type                    "fifo"
+
audio_output {
    name                    "my_fifo"
+
    type                    "fifo"
    path                    "/tmp/mpd.fifo"
+
    name                    "my_fifo"
}
+
    path                    "/tmp/mpd.fifo"
</pre>
+
    format                  "44100:16:2"
 +
}
  
 
Additional lines need to be added to {{ic|~/.ncmpcpp/config}}
 
Additional lines need to be added to {{ic|~/.ncmpcpp/config}}
  
<pre>
+
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_fifo_path = "/tmp/mpd.fifo"
+
visualizer_output_name = "my_fifo"
visualizer_output_name = "my_fifo"
+
visualizer_sync_interval = "30"  
visualizer_sync_interval = "1"
+
visualizer_in_stereo = "yes"
#visualizer_type = "wave" (spectrum/wave)
+
#visualizer_type = "wave" (spectrum/wave)
visualizer_type = "spectrum" (spectrum/wave)
+
visualizer_type = "spectrum" (spectrum/wave)
</pre>
+
visualizer_look = "+|"
  
Users can choose between either a spectrum analyzer or wave form.
+
* '''visualizer_sync_interval'''  - Set the interval for synchronizing the visualizer with the audio output from ''mpd''. It should be set to greater than 10 to avoid trying to synchronize too frequently, which freezes the visualization. The recommended value is 30, but it can be reduced if the audio becomes desynced with the visualization.
 +
* '''visualizer_type''' - Set the visualization to either a spectrum analyzer or wave form.
 +
* '''visualizer_look''' - Set the visualizer's look (string has to be exactly 2 characters long: first one is  for wave whereas second for frequency spectrum).
  
==Basic Usage==
+
== Basic usage ==
===Loading ncmpc++===
+
 
Load ncmpc++ in a shell  
+
=== Loading ncmpcpp ===
 +
 
 +
Load ncmpcpp in a shell:
 
  $ ncmpcpp
 
  $ ncmpcpp
===Remapping keys===
 
A listing of keys and their respective functions is available from within npmpcpp itself via hitting {{Keypress|1}}.  Users may remap any of the default keys simply by copying {{ic|/usr/share/doc/ncmpcpp/keys}} to ~/.ncmpcpp/ and editing it.
 
  
===Different views===
+
=== Different views ===
Partial list of views within ncmpc++
+
*{{Keypress|0}} - Clock
+
*{{Keypress|1}} - Help
+
*{{Keypress|2}} - Current playlist
+
*{{Keypress|3}} - Filesystem browser
+
*{{Keypress|4}} - DB search
+
*{{Keypress|5}} - Library
+
*{{Keypress|6}} - Playlist editor
+
*{{Keypress|7}} - Tag editor (very powerful!)
+
*{{Keypress|9}} - Music visualizer
+
  
===Other UI keys===
+
Partial list of views within ncmpcpp:
*{{Keypress|\}} - Switch between classic and alternative views
+
*{{ic|1}} - Current playlist
*{{Keypress|#}} - Display bitrate of file
+
*{{ic|2}} - Filesystem browser
*{{Keypress|i}} - Show song info
+
*{{ic|3}} - DB search
*{{Keypress|I}} - Show artist info (saved in {{ic|~/.ncmpcpp/artists/ARTIST.txt}})
+
*{{ic|4}} - Library
*{{Keypress|L}} - Shuffle between available lyric databases
+
*{{ic|5}} - Playlist editor
*{{Keypress|l}} - Retrieve song lyrics for current song Show/hide lyrics
+
*{{ic|6}} - Tag editor (very powerful!)
 +
*{{ic|7}} - Output selector
 +
*{{ic|8}} - Music visualizer
 +
*{{ic|&#61;}} - Clock
 +
*{{ic|F1}} - Help
  
{{Note|As mentioned above, the visualizer is not enabled in the ncmpcpp package in the repo.  Users will need to build the git version from the AUR.}}
+
=== Other UI keys ===
  
===Playback modes===
+
*{{ic|q}} - Quit
 +
*{{ic|f}} - Seek forward
 +
*{{ic|b}} - Seek backward
 +
*{{ic|\}} - Switch between classic and alternative views
 +
*{{ic|#}} - Display bitrate of file
 +
*{{ic|i}} - Show song info
 +
*{{ic|I}} - Show artist info (saved in {{ic|~/.ncmpcpp/artists/ARTIST.txt}})
 +
*{{ic|L}} - Shuffle between available lyric databases
 +
*{{ic|l}} - Retrieve song lyrics for current song Show/hide lyrics
 +
*{{ic|>}} - Next track
 +
*{{ic|<}} - Previous track
 +
*{{ic|p}} - Play/Pause
 +
*{{ic|+}} - Increase volume 2%
 +
*{{ic|-}} - Decrease volume 2%
 +
 
 +
=== Playback modes ===
  
 
Noticed the control panel in the upper right; shown in alternative mode:
 
Noticed the control panel in the upper right; shown in alternative mode:
Line 92: Line 103:
 
This corresponds to the playback modes; ordered from left to right, they are:
 
This corresponds to the playback modes; ordered from left to right, they are:
  
*{{Keypress|r}} - repeat mode '''[r-----]'''
+
*{{ic|r}} - repeat mode '''[r-----]'''
*{{Keypress|z}} - random mode '''[-z----]'''
+
*{{ic|z}} - random mode '''[-z----]'''
*{{Keypress|y}} - single mode '''[--s---]'''
+
*{{ic|y}} - single mode '''[--s---]''' (Repeats the current track after reaching the end.)
*{{Keypress|R}} - consume mode '''[---c--]'''
+
*{{ic|R}} - consume mode '''[---c--]''' (Removes the current track from playlist after reaching the end.)
*{{Keypress|x}} - crossfade mode '''[----x-]'''
+
*{{ic|x}} - crossfade mode '''[----x-]'''
 +
 
 +
The final "-" is only active when the user forces an update to the datebase via {{ic|u}}.
 +
 
 +
== Remapping keys ==
 +
 
 +
A listing of key bindings and their respective functions is available from within npmpcpp itself via hitting {{ic|F1}}. Users may remap any of the default keys simply by copying {{ic|/usr/share/doc/ncmpcpp/bindings}} to {{ic|~/.ncmpcpp/}} and editing it.
 +
 
 +
== See also ==
  
The final "-" is only active when the user forces an update to the datebase via {{Keypress|u}}.
+
[http://dotshare.it/category/mpd/ncmpcpp/ dotshare.it configurations]

Latest revision as of 16:13, 20 August 2016

Related articles

Ncmpcpp or ncmpcpp is an mpd client (compatible with mopidy) with a UI very similar to ncmpc, but it provides new useful features such as support for regular expressions for library searches, extended song format, items filtering, the ability to sort playlists, and a local filesystem browser.

To use it, a functional mpd must be present on the system since ncmpcpp/mpd work together in a client/server relationship.

Installation

Install ncmpcpp from the official repositories.

Basic configuration

The shell "GUI" for ncmpcpp is highly customizable. Edit ~/.ncmpcpp/config to your liking. If, after installation, ~/.ncmpcpp/config has not been created, simply copy the sample config, change owner and edit at the very least the following three configuration options:

  • mpd_host - Should point to the host on which mpd resides, can be "localhost" or "127.0.0.1" if on the same machine
  • mpd_port - The default of mpd should be "6600"
  • mpd_music_dir - The same directory value as specified in "music_directory" in mpd.conf

For inspiration, see the following resources:

Enabling visualization

For visualization, add a few lines to /etc/mpd.conf to enable the generation of the fast Fourier transform data for the visualization:

audio_output {
    type                    "fifo"
    name                    "my_fifo"
    path                    "/tmp/mpd.fifo"
    format                  "44100:16:2"
}

Additional lines need to be added to ~/.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)
visualizer_look = "+|"
  • visualizer_sync_interval - Set the interval for synchronizing the visualizer with the audio output from mpd. It should be set to greater than 10 to avoid trying to synchronize too frequently, which freezes the visualization. The recommended value is 30, but it can be reduced if the audio becomes desynced with the visualization.
  • visualizer_type - Set the visualization to either a spectrum analyzer or wave form.
  • visualizer_look - Set the visualizer's look (string has to be exactly 2 characters long: first one is for wave whereas second for frequency spectrum).

Basic usage

Loading ncmpcpp

Load ncmpcpp in a shell:

$ ncmpcpp

Different views

Partial list of views within ncmpcpp:

  • 1 - Current playlist
  • 2 - Filesystem browser
  • 3 - DB search
  • 4 - Library
  • 5 - Playlist editor
  • 6 - Tag editor (very powerful!)
  • 7 - Output selector
  • 8 - Music visualizer
  • = - Clock
  • F1 - Help

Other UI keys

  • q - Quit
  • f - Seek forward
  • b - Seek backward
  • \ - Switch between classic and alternative views
  • # - Display bitrate of file
  • i - Show song info
  • I - Show artist info (saved in ~/.ncmpcpp/artists/ARTIST.txt)
  • L - Shuffle between available lyric databases
  • l - Retrieve song lyrics for current song Show/hide lyrics
  • > - Next track
  • < - Previous track
  • p - Play/Pause
  • + - Increase volume 2%
  • - - Decrease volume 2%

Playback modes

Noticed the control panel in the upper right; shown in alternative mode:

1:40/4:16 1082 kbps                            ──┤ Criminal ├──                                       Vol: 98%
[playing]                             Disturbed - Indestructible (2008)                               [-z-c--]

And again in classic mode:

─────────────────────────────────────────────────────────────────────────────────────────────────────────[zc]

This corresponds to the playback modes; ordered from left to right, they are:

  • r - repeat mode [r-----]
  • z - random mode [-z----]
  • y - single mode [--s---] (Repeats the current track after reaching the end.)
  • R - consume mode [---c--] (Removes the current track from playlist after reaching the end.)
  • x - crossfade mode [----x-]

The final "-" is only active when the user forces an update to the datebase via u.

Remapping keys

A listing of key bindings and their respective functions is available from within npmpcpp itself via hitting F1. Users may remap any of the default keys simply by copying /usr/share/doc/ncmpcpp/bindings to ~/.ncmpcpp/ and editing it.

See also

dotshare.it configurations