MOC

Music On Console is a lightweight music player similar to MPD, but unlike it, MOC comes with an interface and its server does not support remote access.

Installation

Install the moc package.

PulseAudio

For PulseAudio support install moc-pulseAUR or moc-pulse-svnAUR for the development version. To use the pulseaudio driver, go to #Using PulseAudio.

Front-ends

  • mocicon GTK panel applet to control MOC
http://mocicon.sourceforge.net/ || mociconAUR
  • eXo Qt frontend to MOC, supports scrobbling
https://github.com/loimu/exo || exo-playerAUR

Configuration

Sample configuration files can be found in /usr/share/doc/moc/. On mocp first run, the ~/.moc/ directory is created. To configure, copy the examples to it and edit accordingly.

To use MOC with v4.1 OSS, see OSS#MOC.

To change the default key bindings, see /usr/share/doc/moc/keymap.example.

Using PulseAudio

If you have moc-pulseAUR or moc-pulse-svnAUR downloaded, locate the variable SoundDriver and add to the front.

SoundDriver = PULSEAUDIO:JACK:ALSA:OSS

This ensures that PulseAudio gets loaded with first priority. Listing other sound drivers after this are fallbacks when the previous ones are not available.

To change directories with the arrow keys uncomment in :

Keymap = keymap

Edit the following in :

go    = ENTER RIGHT
go_up = U LEFT
#seek_forward  = RIGHT
#seek_backward = LEFT

To speed up navigation and detach, set the following in :

ReadTags = no
ShowTime = no
TagsCacheSize = 0

systemd service

Enable this service for the respective user:

Themes

Several themes for the player GUI are available. To list the available themes and set one, use hotkey . To set one to permanent use the configuration file .

Theme = laras_theme

A selection of example themes can be found in , the installation of mocp-themes-gitAUR adds more of them.

Since themes are just text files, it is easy to create new ones. User defined themes are expected in .

Example theme file:

background                     = white black
frame                          = white black
window_title                   = white black
directory                      = white black
selected_directory             = white black reverse
playlist                       = white black
selected_playlist              = white black reverse
file                           = white black
selected_file                  = white black reverse
selected_info                  = white black reverse
marked_file                    = white black bold
marked_selected_file           = white black reverse
info                           = white black
marked_info                    = white black bold
marked_selected_info           = white black reverse
status                         = white black
title                          = white black bold
state                          = white black
current_time                   = white black bold
time_left                      = white black bold
total_time                     = white black bold
time_total_frames              = white black
sound_parameters               = white black bold
legend                         = white black
disabled                       = white black
enabled                        = white black bold
empty_mixer_bar                = white black
filled_mixer_bar               = white black reverse
empty_time_bar                 = white black
filled_time_bar                = white black reverse
entry                          = white black
entry_title                    = white black
error                          = white black bold
message                        = white black
plist_time                     = white black

Usage

Run mocp to start the server and interface. Some useful default shortcuts (press for more):

Start playing at this file or go to this directory
Pause Space or
Play next file
Play previous file
Silent seek forward by 5s
Silent seek backward by 5s
Switch between playlist and file list Tab
Add a file/directory to the playlist
Add a directory recursively to the playlist
Delete an item from the playlist
Clear the playlist
Increase volume by 1%
Decrease volume by 1% <
Increase volume by 5% (period)
Decrease volume by 5% (comma)
Set volume to 10%
Set volume to 90% Alt+9
Detach MOC from the server
Quit

To shut down the server, run the command.

Scrobbling

is a Last.fm (and Libre.fm) scrobbler for MOC with support for now-playing notifications, daemonization and cache. It only depends on Python 3.
Note: To use Libre.fm instead of Last.fm change hostname from post.audioscrobbler.com to turtle.libre.fm.

Copy the example file to your user configuration directory:

mkdir ~/.mocpscrob/
cp /usr/share/doc/mocp-scrobbler/config.example  ~/.mocpscrob/config

Edit to add your login and password. The password variable will be replaced with on the first run. Its value will be the original value hashed using MD5 algorithm. If you want to change password, just add again password with you new password, and will be replaced.

To scrobble tracks, start mocp-scrobbler as daemon before mocp. You can also use an alias:

alias mocp='/usr/bin/mocp-scrobbler.py -d; mocp'

In January of 2016 last.fm updated their password requirements, with all new and updated passwords requiring the inclusion of one of the following characters , or a space. This is known to cause an authentication error with mocpscrob configurations which specify passwords not conforming to these new specifications. Changing one's password and updating the password accordingly resolves this issue.

Troubleshooting

MOC fails to start

If MOC fails to start, it is most probably because of something wrong in ~/.moc/. You can try to fix it, or simply delete the whole folder.

Strange characters

If you see strange-like characters displayed instead of the normal lines (vertical lines to separate space, etc.), you may have a font set incompatible to MOC. Either change the respective font, or edit to use ASCII for drawing lines:

ASCIILines = no

FATAL_ERROR: Layout1 is malformed

If MOC crashes with this error, try adding either line to :

Layout1 = directory(0,0,50%,100%): playlist(50%,0,100%,100%)

or

Layout1 = directory(0,0,50%,100%): playlist(50%,0,FILL,100%)

See original report and Debian bugs.

gollark: As such, it can become machine code.
gollark: This has no generic type parameters.
gollark: This is monomorphised to, if you use it for floats and ints, say,```haskellapifyBees__Int :: Int -> Int -> IntapifyBees__Int x y z = z - y * xapifyBees__Double :: Float -> Float -> FloatapifyBees__Double x y z = z - y * x```
gollark: As in, it can take any type satisfying the constraints as `a`.
gollark: This is "generic" over the type of `a`.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.