Greetings, and welcome to this short article, my name is Martín, and today I will talk about the audio player MOC.
Table of Contents
Introduction.
I just read the article about MPD published on this site, it seems to me an excellent contribution. However, before knowing of MPD met MOC.
«MOC is an audio player that runs on a console using a simple ncurses-based interface. Supported audio formats include OGG, MP3, WAV, among others. »
Extracted from the man pages.
When to use MOC?
When starting my journey through the world GNU / Linux, I came across the window manager KDE. I was stumped by the stationery on it, so much so that I stayed for over six months. But one day I came home and decided to try something new (streamline my work environment), and flux box he was ready, waiting for a chance.
Then my machine started to breathe, so many processes stopped (processes that it didn't really require); but KDE was still there -with Amarok- and that made me uneasy.
One day i discovered MOC, it was surprising because no extra configuration was necessary, I just run mockup in a command terminal or command launcher Alt + F2 and I enter: xterm -e mocp.
The program responds with a couple of sections, on the right side we have our directories, and on the left side our playlist will appear.
Consult the help.
Once started, we press the key h. The program responds with a list of available options.
Among the most important we have:
q -> Exit the player. Just quit, don't stop playback.
a -> Add a file or directory to the playlist. To use this option we must first navigate with the arrow keys and choose the directory where our audio files are located.
A -> Add a directory recursively to the playlist. To use this option we must first navigate with the arrow keys and choose the directory where our audio files are located.
p -> Play the selected track.
n -> Play next track.
b -> Play previous track.
s -> Stop the player.
p o Space -> Pause the player.
Tab -> Navigate between the playlist and the user's file system.
But what happens, this is not really your great advantage. In my opinion, the ideal is to load the server when you log in and activate the playback using keyboard shortcuts. For this, you must consult the manuals of the player.
Fluxbox + MOC
When running man mocp, we access the documentation that comes with MOCP. From there we get that to start the server, we need mocp -S, which allows to launch the server.
It is then that we edit our login settings, then we show how to achieve this in flux box.
flux box stores its configuration files in a hidden directory within each user's home directory ~ / .fluxbox /. There we find the files: apps, init, Keys, menu, overlay, startup, among others; and some more configuration directories.
We will start by editing the file startup. From a terminal we execute vim ~ / .fluxbox / startup and we add mocp -S, just before the line exec flux box, as the picture shows
We save changes, and close vim. One vim not to your liking, you can use some other text editor.
Other options that interest me from the manuals MOC neighborhoods, are the Next, Previous, stop, play, pause, unpause, seek, theme. Correct a shortcut to play, next, previous, stop, ...
Then we edit the file Keys. In this file there is a lot to explore, I will try to be as brief as possible. We have to Mod1 is equivalent to the key Alt, so I'll use it to define my keybindings:
Atajos para moc
Mod1 Shift Z :Exec xterm -bg black -fa monospace -fs 11 -e mocp --theme green_theme
Mod1 P :Exec mocp -t shuffle,autonext --play
Mod1 S :Exec mocp --stop
Mod1 N :Exec mocp --next
Mod1 B :Exec mocp --previous
Mod1 L :Exec mocp --pause
Mod1 K :Exec mocp --unpause
Mod1 Shift S :Exec mocp --seek -3
By defining the previous combinations we can:
- Open the player with: Alt + Shift + Z, I have also indicated that I want to use the theme green_theme. For more topics, run
ls /usr/share/moc/themes/
- Similarly, we start playback with Alt + P. The option -t shuffle, autonext indicates that I want to use random mode and have the audio tracks played one after the other.
- With Alt + N we play the next track, and so on with the rest of the keyboard shortcuts.
And ... in KDE?
KDE+MOC
Very well, mockup it has been to your liking but you want to stay in KDE. Let's apply the same settings:
- Alt + F2, we introduce: systemsettings
- We proceed in Quick accesses and gestures
Now Right click > New group
- We put a name to our group
- Right click> New> Global shortcut> Order / URL:
- Now in the trigger tab place the desired shortcut
And in the Action tab we place the appropriate command for each shortcut.
Well that's it with this little tutorial. I hope you like it and continue customizing GNU / Linux.
[specs]
- Laptop: Samsung RV415
- OS: GNU / Slackware Linux v14.1
- WM: Fluxbox, KDE
MARKDOWN_HASH0ac53b8a47f34f5ed67043157642cf65MARKDOWN_HASH
.References:
http://www.slackware.com
http://fluxbox-wiki.org/index.php/Keyboard_shortcuts
http://www.fluxbox.org
I still prefer ncmpcpp ...
( before adding to the library or creating the list), I think it is the biggest attribute of the moc, which is a bit complicated in the mpd.
The truth is the best player on the console, I have been using it for a long time and it is the best. But I would never leave Kde for fluxbox, haha I'm very comfortable here.
Very useful, for those people who want pure minimalism. And by the way, I'm also using Slackware.
changing the subject: is it possible to fulfill dependencies automatically in Slackware? I've always wanted to try but I don't dare
Interesting 🙂 Another good option is MPD, which once configured you can use it with different interfaces. Cantata in KDE, Sonata in GTK desktops, various options in the terminal ... Control it remotely from Android / iOS / other PCs ... More potential, but to taste the colors 🙂
You have said it, MPD is more powerful but at the end of the day what matters is how the user adapts to the player
Very good article, it is useful to me. I'm going to use it in my Openbox in Arch, since thanks to a burning in a RAM module I was left with 1Gb.
Thanks for the input.
Very good even that I prefer to use ncpcpp and even later I try moc so as not to stay without trying it and be able to give my opinion of it, greetings and thanks! 0 /
Sorry I meant * ncmpcpp
Much lighter, simpler and minimalist I recommend cplay.
I have it on my Gentoo with openbox at home and at work on a freebsd server also with openbox.
Thanks! .. ..it comes in a thousand pearls .. ..I will adapt it to my Openbox in Arch ..
I also use this player sometimes. It is perfectly solvent to satisfy my musical needs in general and by terminal.
I also really like fluxbox! The shortcut trick is very useful!
Excellent post, very detailed and original!
I use Banshee to manage my music library which is quite clumsy. However to reproduce something specific I like this way. 🙂
I'll put into practice! Cheers!
Can also be with mplayer
Great but I still prefer MPD + NCMPCPP 😀
PD ¿Banda MS ?, ¿Espinoza Paz? hahahaha Greetings from Sinaloa 🙂
Moc is the best player in the world and its surroundings… ..
mpd + ncmpcpp> *
Salu2
Excellent, I'm testing it and I don't think I'm going back to the graphical interface!
Very good!
Greetings to all, I am glad to know that there is a community, and that it is interested in free alternatives.
A small correction, the 'p' key is not for play, use 'Enter' for that purpose.
I have tried to edit the post but apparently that option was not contemplated, hehe.