You are not logged in.
As suggested I will make here a little MOC how-to if someone is interested and does not have the time to hunt for it.
I think all #!'ers know what MOC is. In reality it is really easy to set up, the problem is that the infos on the home page are somehow old/outdated. So I will take the time to write my little how-to. Bear with me, it is my first one.
First of all, I really like this little CLI music program, it does everything you want, and more important it has out of the box gapless playback, you can use an EQ and you can set up also LastFM. The most used codecs are supported, just Ape does not work but maybe in the future. The app is still under development not as active but many users contribute patches etc.
I will speak of the actual MOC version from the Debian Testing repositories as I am on Wheezy, not sure if some patches are not working yet from the Stable repository.
First of all we will install the app with of course:
apt-get install moc
Then we will also install if needed the ffmpeg plugin:
apt-get install moc-ffmpeg-plugin
To configure MOC properly or to your likings we will need a MOC config, first start MOC with the command:
mocp
Now you can pull the config into your home folder with:
cd ~/.moc && cp /usr/share/doc/moc/examples/config.example.gz ./ && gunzip config.example.gz && mv config.example config
Now we can begin to edit the config file with your preferred text editor.
You can see already some things you can change but I will speak about the most important.
First of all, if you want that MOC starts with your music directory you have to go to this section:
#MusicDir = "/home/joe/music"
and change it with your music path, in my case as an example as my music is on an external drive:
MusicDir = "/media/David Extern/Música"
Now change this line to look like this:
StartInMusicDir = yes
Now when you start MOC it will open straight into your music directory of choice, with the keystroke m you can always go directly back to your music directory.
With q you can close MOC, open it again and it should be set up with your music directory. With Q you can also shutting down the whole service, as MOC runs also as a server.
With T
you can select some default themes, I prefer to use another one. That is also easy, just create a /themes folder in your /.moc directory, choose a text editor and create a file. I went the easy path and decided to take the theme of @rhowaldt as it fits well with my Xfce Greybird theme:
# Thank you Gutterslob & pvsage from #! forums!
# Example color theme for MOC.
# You can use a theme by copying it to ~/.moc/themes directory and using
# Theme config option or -T command line option.
#
# Fill free to make your own themes and send me them. It will be included in
# official MOC releases or on the MOC web site.
#
# The format of this file is:
# Lines beginning with # are comments.
# Blank lines are ignored.
# Every other line is expected to be in format:
#
# ELEMENT = FOREGROUND_COLOR BACKGROUND_COLOR [ATTRIBUTE[,ATTRIBUTE,..]]
#
# or
#
# colordef COLOR = RED GREEN BLUE
#
# Where names are case insensitive.
#
# ELEMENT is an element of MOC interface. This can be:
# background - default background for regions when nothing is displayed
# frame - frames for windows
# window_title - the title of the window (eg name of the current
# directory)
# directory - a directory in the menu
# selected_directory - a directory that is selected using arrows
# playlist - playlist file
# selected_playlist - see selected directory
# file - an ordinary file in the menu (mp3, ogg, ...)
# selected_file - see selected directory
# marked_file - a file that is currently being played
# marked_selected_file - a file that is currently being played and is also
# selected using arrows
# info - information shown at the right side of files
# selected_info - see selected directory
# marked_info - a file (its time) that is currently being played
# marked_selected_info - a file (its time) that is currently being played
# and is also selected using arrows
# status - the status line with a message
# title - the title of the file that is currently being played
# state - the state: play, stop, or paused (>, [], ||)
# current_time - current time of playing
# time_left - the time left to the end of playing the current file
# total_time - the length of the currently played file
# time_total_frames - the brackets outside the total time of a file ([10:13])
# sound_parameters - the frequency and bitrate numbers
# legend - "KHz" and "Kbps"
# disabled - disabled element ([STEREO])
# enabled - enabled element
# empty_mixer_bar - "empty" part of the volume bar
# filled_mixer_bar - "filled" part of the volume bar
# empty_time_bar - "empty" part of the time bar
# filled_time_bar - "filled" part of the time bar
# entry - place wher user can type a search query or a file name
# entry_title - the title of an entry
# error - error message
# message - information message
# plist_time - total time of displayed items
#
# FOREGOUND_COLOR and BACKGROUND_COLOR can have one of the following values:
# black, red, green, yellow, blue, magenta, cyan, white, default (can be
# transparent), grey (not standard, but works)
#
# Optional ATTRIBUTE parameters can be (from ncurses manual):
# normal - default (no highlight)
# standout - best highlighting mode of the terminal
# underline - underlining
# reverse - reverse video
# blink - blinking
# dim - half bright
# bold - extra bright or bold
# protect - protected mode
#
# You can specify a list of attributes separated by commas: attr1,attr2,attr3.
# Don't use spaces anywhere in such a list.
#
# With colordef you can change the definition of a color. It works only if
# your terminal supports it, if not those lines will be silently ignored.
# COLOR must be a valid color name and the RED GREEN and BLUE are numbers
# from 0 to 1000. Example:
#
# colordef red = 1000 0 0
#
# HINT: you have only 8 colors, but combined with attributes bold and/or
# reversed you actually get more colors.
#
# If you don't specify some elements, the default values will be used.
#
# Replaces the default configuration:
background = default default
frame = default default
window_title = default default
directory = blue default
selected_directory = blue default reverse
playlist = default default
selected_playlist = default default reverse
file = default default
selected_file = default default reverse
marked_file = blue default bold
marked_selected_file = blue default reverse
info = default default
selected_info = default default
marked_info = blue default bold
marked_selected_info = blue default bold
status = default default
title = blue default bold
state = default default
current_time = default default
time_left = default default
total_time = default default
time_total_frames = default default
sound_parameters = default default
legend = default default
disabled = default default
enabled = blue default bold
empty_mixer_bar = default default
filled_mixer_bar = default default reverse
empty_time_bar = default default
filled_time_bar = default default reverse
entry = default default
entry_title = default default
error = default default bold
message = default default bold
plist_time = default default
I named it blue_theme. Now it will show up in the themes selection of MOC and you can use it. You need to change again this line:
# Theme = example_theme
with your theme of choice and with the next start of MOC it will use your theme. You can also change the line for Xterm there.
As I am a LastFM fan I needed also this. MOC does not have LastFM build in by default, there are also some patches but I prefer the easy way. Just install lastfmsubmitd with:
apt-get install lastfmsubmitd
and follow the instructions, you will be asked to set up your account. To make it work with MOC, we have again to edit the config. You have to go to this line and make it look like mine:
OnSongChange = "/usr/lib/lastfmsubmitd/lastfmsubmit --artist %a --title %t --length %d --album %b"
Restart MOC and now it will scrobble your tracks, not as nice, as it will scrobble them immediately and not after 50 % of the played time e.g. but it works.
The last thing for me to do was to add an EQ. The sound is not bad but I need the possibilty to manipulate it.
Create a folder and name it e.g. eqsets. Now grab some presets from here, they are from Winamp: http://moc.daper.net/node/397. Put them in your EQ folder, with E
you can enable/disable the EQ, with k you can switch through the different EQ presets. You can even make your own.
I think that's it. If you want more on MOC, just press h and it will give you all the keystrokes or look at the documentation on their site for more things. I hope you have fun with MOC.
And here a screenshot how mine looks:
For more themes of our community look at this thread: http://crunchbanglinux.org/forums/topic … gs-themes/.
Ah, before I forget, a nice feature is the ability to search in your directories. With g you will be prompted to a text search, just if you would use a library based audio player. Nice thing.
Thanks go to @rhowaldt for the awesome theme, to @Slobby who gave me tips on the EQ and to @VastOne who also helped me to find some things.
Note: When setting up LastFM, it will ask you which group to use, put there audio.
Edit: If you want to use conky with MOC, then go here.
Edit (Nov. 16 2011): I must read something wrong, there is actually no cue sheet support. Tried it, did not work. Fixed that in the how-to.
Last edited by ivanovnegro (2011-11-16 06:35:38)
Offline
nice howto ivanovnegro, and flattered you used my theme for it. as users can see in the comments of the theme, credits pass over to gutterslob and pvsage for providing me with the basis for my theme. what i also really liked about that theme-file is that it has the full documentation at the beginning, so you always know how it works.
Offline
^ Yes, that is why I posted it with the names of @Slobby and @pvsage.
Offline
^ Thank you. And I will link also to your conky scripts.
Offline
Offline
^ if i were you, i'd just move through the config-file to check if there is an option there that might be causing this and/or might prevent this. the config-file for moc is pretty well-documented (at least mine is - if yours is not i'll post mine here) so should not be that difficult.
Offline
^^ moc is sorting your tracks by filename (which I think is the only option). If you rename your files like '01 Title.mp3', '02 Title.mp3', etc, it should order them properly
Last edited by safetycopy (2011-11-07 15:14:15)
i wonder if i missed the warning
Skinny Puppy, Love in Vein
Offline
@kexolino: Not sure, by default it is set up to order by file name rather then other thing, that is the reason why it shows up this way, it is the exact copy how it looks like from your default file browser. When you add the files to the playlist you can order them with u and j, u for up and j for down.
Last edited by ivanovnegro (2011-11-07 15:14:58)
Offline
@safetycopy: that's what i thought initially, but that doesn't explain the order '3, 8, 5'. so i think it must be something else. regardless, always a good idea to use '01' instead of '1' in mp3 filenames. looks nicer
Offline
^ Look at the song names - they're in alphabetical order...
Stranger Than Fiction
Television
The Handshake
i wonder if i missed the warning
Skinny Puppy, Love in Vein
Offline
From the MoC web site, a good explanation...
The tracks are sorted in alphanumerical order but numbers are not considered, only digits are, so the solution is to have all files in an folder follow this rule:
$some_stuff$number$whatever. All the files in the folder must start exactly by the same $some_stuff and the number must always have as much digits as the track that has the most digits (2 digits usually works fine).
For instance:
% ls Symphonie\ n.5/
1 - Symphony No.5 in C minor Op 67 - Allegro con brio.mp3
2 - Symphony No.5 in C Minor Op 67 - Andante con moto.mp3
3 - Symphony No.5 in C Minor Op 67 - Allegro.mp3
4 - Symphony No.5 in C Minor Op 67 - Allegro.mp3
or:
% ls Metallica/The\ Best\ Of/ -1
Metallica_01.wma
Metallica_02.wma
Metallica_03 - Enter Sandman .wma
Metallica_04.wma
Metallica_05 - Sad But True.wma
Metallica_06.wma
Metallica_07.wma
Metallica_08 - Holier than Thou.wma
Metallica_09.wma
Metallica_10 Piste 10.wma
Metallica_11 Piste 11.wma
Metallica_12 Piste 12.wma
Metallica_13 Piste 13.wma
Metallica_14 Piste 14.wma
Metallica_15 Piste 15.wma
Offline
@safetycopy: hey, didn't notice the alphabetical order!
@VastOne: good one. this must be it.
Offline
Thanks, that's it, the song files don't have the number in their names.
Offline
@ivanovnegro
Thanks, I was waiting for your how-to for MOC, thanks I hope I can finally get LastFM to work with my MOC.
Cheers.
"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee
Offline
^ Thank you also. Just follow my instructions, LastFM works perfectly.
Offline
Thanks a lot dude! This is a great little addition to my desktop terminal... now i gotta learn how to configure awesomewm
Offline
^ Thank you also. Just follow my instructions, LastFM works perfectly.
Yes, works like a charm on #! or my debian netinstall. Big thank you for this howto!
I have to figure out why it doesn't on my arch install. Hmm, i set my username and pass in /etc/lastfmsubmit.conf and start the demon on boot in the rc.conf file but no success...
came for the distro, stayed for the community
streamripper :: smxi
Offline
Offline
Oh, again thank you for the link to the archwiki the chmod -R 777 to /var/spool/lastfm does the trick. Everything is fine now.
came for the distro, stayed for the community
streamripper :: smxi
Offline
^ Great, then enjoy, I made such a bombastic EQ, my house is exploding, will see if the neighbors will come to my door. MOC is really loud here.
Offline
^ Great, then enjoy, I made such a bombastic EQ, my house is exploding, will see if the neighbors will come to my door. MOC is really loud here.
How about posting those EQ settings? I would like to see them and try them against pulseaudio EQ
Offline
^ Great, then enjoy, I made such a bombastic EQ, my house is exploding, will see if the neighbors will come to my door. MOC is really loud here.
Haha, but don't take it too far. I did once in my early days on Debian Bo (i think) and X11amp (anyone remember these days?) under influence of too much booze and wimmen and the result was that the german (very unfriendly ) police take my huge speakers with them and i have to take them back the next day (when i was sober). Not much fun... Hell, yes it was Fun when i think of it.
came for the distro, stayed for the community
streamripper :: smxi
Offline
How about posting those EQ settings? I would like to see them and try them against pulseaudio EQ
It is just the Techno EQ preset modified by myself, I am still tweaking it, you posted it also in the Dropbox folder. Let me make still some tests. I should open a tweak your EQs thread.
@lowrider: Nice story.
Offline
Cool, I got it to work now, thanks to you mate.
How to I change the EQ? I press shift-E, then it only display either wa_Club or off.
Do I only leave one preset in that folder? or is there another way to select it?
"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat