Ncmpcpp: Difference between revisions

From wikinotes
(Created page with "{| class="wikitable" | <pre>~/.ncmpcpp/config</pre> || [http://{{SERVERNAME}}/progs/config/mpd/ncmpcpp-config .ncmpcpp/config]] || configure ncmpcpp from visualization to text...")
 
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
A TUI [[mpd]] client.
= Documentation =
<blockquote>
{| class="wikitable"
{| class="wikitable"
| <pre>~/.ncmpcpp/config</pre> || [http://{{SERVERNAME}}/progs/config/mpd/ncmpcpp-config .ncmpcpp/config]] || configure ncmpcpp from visualization to text colours
|-
|-
| <pre>/usr/share/doc/ncmpcpp/bindings</pre> || || default keybindings (just copy and change)
| github || https://github.com/ncmpcpp/ncmpcpp
|-
| <code>man ncmpcpp</code> || https://man.archlinux.org/man/extra/ncmpcpp/ncmpcpp.1.en
|-
|}
|}
</blockquote><!-- Documentation -->


Install
= Tutorials =
<pre>
<blockquote>
sudo pacman -S ncmpcpp mpd smbclient
{| class="wikitable"
</pre>
|-
| cheat sheet || https://pkgbuild.com/~jelle/ncmpcpp/
|-
|}
</blockquote><!-- Tutorials -->


= Locations =
<blockquote>
{| class="wikitable"
|-
| <code>~/.ncmpcpp/config</code> || user config
|-
| <code>~/.ncmpcpp/bindings</code> || user keybindings
|-
| <code>/usr/share/doc/ncmpcpp/bindings</code> || global keybindings
|}
</blockquote><!-- Locations -->


''' ncmpcpp '''
= Install =
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Connect to Samba Share
sudo pacman -S ncmpcpp mpd
# Check possible samba shares on current network connection:
smbtree
 
# Connect Samba Share
sudo mount -t cifs //Langdon/Music /mnt/music/xbmc -o user=will,password=thisismypassword
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Install -->


''' Config '''
= Usage =
<blockquote>
== Cli ==
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
## %l - length
ncmpcpp -s browser  # open to browser screen
## %f - filename
</syntaxhighlight>
## %D - directory
</blockquote><!-- Cli -->
## %a - artist
## %A - album artist
## %t - title
## %b - album
## %y - date
## %n - track number (01/12 -> 01)
## %N - full track info (01/12 -> 01/12)
## %g - genre
## %c - composer
## %p - performer
## %d - disc
## %C - comment
## %P - priority
## $R - begin right alignment


{%a} ## Display Artist only if available
== Menus ==
{%a}|{%A} ## Display Artist if available, else display AlbumArtist
<blockquote>
{%30a} ## Display Artist, maximum char width of 30
<syntaxhighlight lang="yaml">
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
</syntaxhighlight>
</blockquote><!-- Menus -->


$2this is red text ## Numeric Colours (1-8) can be assigned
== 1. Playlist ==
<blockquote>
<syntaxhighlight lang="yaml">
c  # clear playlist
# find song in library
# choose random item (ex. ` b 10 adds 10x random albums)
</syntaxhighlight>
</blockquote><!-- Playlist -->


== 4. Library ==
<blockquote>
<syntaxhighlight lang="yaml">
4  # cycle views ($1,album,track), (album-by-$1,track), (album,track)


e  # edit tags (or if unavail, at least prints filepath)
`  # (on leftmost column) set $1 column tag-type
`  # (on mid/right column) add N random items to the playlist
</syntaxhighlight>
</blockquote><!-- Library -->


    1 - Current playlist
== 6. Tag Editor ==
    2 - Filesystem browser
<blockquote>
    3 - DB search
{{ NOTE |
    4 - Library
to use the tag editor, you must set <code>mpd_music_dir</code> in your ncmpcpp config
    5 - Playlist editor
}}
    6 - Tag editor (very powerful!)
<syntaxhighlight lang="yaml">
    7 - Output selector
* navigate to an album/song
    8 - Music visualizer
  # 'E' on a song locates in tag editor
    = - Clock
  * switch to middle column, select a field to change, change
    F1 - Help
  * navigate to save
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- 6. Tag Editor -->
</blockquote><!-- Usage -->


= Configuration =
<blockquote>
== Colours/Formatting ==
<blockquote>
<syntaxhighlight lang="bash">
# %l - length
# %f - filename
# %D - directory
# %a - artist
# %A - album artist
# %t - title
# %b - album
# %y - date
# %n - track number (01/12 -> 01)
# %N - full track info (01/12 -> 01/12)
# %g - genre
# %c - composer
# %p - performer
# %d - disc
# %C - comment
# %P - priority
# $R - begin right alignment


''' Tips/Tricks '''
{%a}      # Display Artist only if available
<syntaxhighlight lang="bash">
{%a}|{%A}  # Display Artist if available, else display AlbumArtist
### Browse By Genre
{%30a}    # Display Artist, maximum char width of 30
- Hit '4' to get to columns (4 again if in 2-column mode)
 
- Navigate to left column
# Numeric Colours (1-8) can be assigned
- ` + g
$2this is red text
- hit space to add a genre
</syntaxhighlight>
</syntaxhighlight>
</blockquote>
</blockquote><!-- Colours/Formatting -->


== Visualizations ==
<blockquote>
Toggle the visualization with the <code>space</code> key while looking at visualizations.
<syntaxhighlight lang="dosini">
# ~/.mpdconf
# create audio output for visualization
audio_output {
        type "fifo"
        name "visualization"
        path "/tmp/mpd.fifo"
        format "44100:16:2"
}
</syntaxhighlight>


''' Troubleshooting Samba Connections '''<br>
I have had many issues connecting to samba shares over the years (very frustrating).
Here is a checklist of some of the issues that I have run into, and how I solved them.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#### wicd/network manager do not inform systemd that hte network is up
# ~/.config/ncmpcpp/config
use netctl profiles(confirmed), or dhcpcd@interface.service.


#### remote-fs.target disabled
visualizer_data_source = "/tmp/mpd.fifo"
systemctl list-unit-files | grep remote-fs ## Check remote-fs status
visualizer_output_name = "visualization"
sudo systemctl enable remote-fs.target ## re-enable
visualizer_in_stereo = "yes"
sudo reboot
visualizer_type = "spectrum"
visualizer_look = "+|"
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Visualizations -->
</blockquote><!-- Configuration -->

Latest revision as of 00:32, 16 February 2024

A TUI mpd client.

Documentation

github https://github.com/ncmpcpp/ncmpcpp
man ncmpcpp https://man.archlinux.org/man/extra/ncmpcpp/ncmpcpp.1.en

Tutorials

cheat sheet https://pkgbuild.com/~jelle/ncmpcpp/

Locations

~/.ncmpcpp/config user config
~/.ncmpcpp/bindings user keybindings
/usr/share/doc/ncmpcpp/bindings global keybindings

Install

sudo pacman -S ncmpcpp mpd

Usage

Cli

ncmpcpp -s browser  # open to browser screen

Menus

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

1. Playlist

c  # clear playlist
~  # find song in library
`  # choose random item (ex. ` b 10 adds 10x random albums)

4. Library

4  # cycle views ($1,album,track), (album-by-$1,track), (album,track)

e  # edit tags (or if unavail, at least prints filepath)
`  # (on leftmost column) set $1 column tag-type
`  # (on mid/right column) add N random items to the playlist

6. Tag Editor

NOTE:

to use the tag editor, you must set mpd_music_dir in your ncmpcpp config

* navigate to an album/song
  # 'E' on a song locates in tag editor
  * switch to middle column, select a field to change, change
  * navigate to save

Configuration

Colours/Formatting

# %l - length
# %f - filename
# %D - directory
# %a - artist
# %A - album artist
# %t - title
# %b - album
# %y - date
# %n - track number (01/12 -> 01)
# %N - full track info (01/12 -> 01/12)
# %g - genre
# %c - composer
# %p - performer
# %d - disc
# %C - comment
# %P - priority
# $R - begin right alignment

{%a}       # Display Artist only if available
{%a}|{%A}  # Display Artist if available, else display AlbumArtist
{%30a}     # Display Artist, maximum char width of 30

# Numeric Colours (1-8) can be assigned
$2this is red text

Visualizations

Toggle the visualization with the space key while looking at visualizations.

# ~/.mpdconf

# create audio output for visualization
audio_output {
        type "fifo"
        name "visualization"
        path "/tmp/mpd.fifo"
        format "44100:16:2"
}
# ~/.config/ncmpcpp/config

visualizer_data_source = "/tmp/mpd.fifo"
visualizer_output_name = "visualization"
visualizer_in_stereo = "yes"
visualizer_type = "spectrum"
visualizer_look = "+|"