---
14/02/2017
Written by: Colin Yates
Hi there, been a while - so, buzzword bingo anyone ;-).
Having grown tired of the weight and cost of a GUI I am returning to my lighter-weight roots as much as possible. I can’t quite reproduce the fantastic experience of i3 on the mac but using terminal based apps is a good first step.
So, after experimenting with the excellent cmus I was sold on the convenience of terminal based music players (did I mention how fast these things are?!). However, cmus, whilst excellent had a few things that didn’t quite gel with me:
The other great contender is mpd which is a music player daemon/server with a whole shedload of clients. The most popular one seems to be ncmpcpp.
Installing it was a breeze, follow this although ignore the instruction to create mpd.db otherwise mpd will complain of a corrupted DB.
After installing mpd and ncmpcpp it is time to use them. By far the best reference I have found for ncmpcpp is this cheat sheet.
So, great, except ncmpcpp doesn’t rate songs. The main contender for that seems to be a Perl module (“app?”): https://metacpan.org/release/Audio-MPD. I confess, despite over 20 years of professional software engineering I have managed to not touch Perl ;-). So, what do you do with a Perl thingy?
Turns out:
maven of the Perl worldcpan install <module> installs that library so Perl ‘apps’ can access itperl interpreterWith this knowledge, getting hold of mpd-dump-ratings and mpd-rate is as simple as:
cpan on your mac if you haven’t already by executing cpancpan install AUDIO:MPD (analog of mvn install) installs the MPD library locallybin directory of the github repo you cloned you can find mpd-dump-ratings,mpd-dynamic and mpd-rateSo, have a read through the documentation and link those 3 scripts to your local ~/bin directory (or whatever directory you have in your $PATH for just such a thing).
I am almost certainly doing something wrong and non-idiomatic and upgrades are, as ever, welcome.
That’s all for now folks - see you in another few months ;-).