Tag Archives: music

ksmp3play: Simple and direct, but incomplete

I have two music players that I want to show, but I have to write about them in the correct order, because one is an offshoot of the other. And I screwed up the whole roguelike evolution over the past 10 days, which was a disservice to some of the later ones.

Here’s ksmp3play, which is a little hard to find and appears to have drifted away around 2008.

2014-10-23-9brnr91-ksmp3play-01 2014-10-23-9brnr91-ksmp3play-02

ksmp3play is tagged as “beta” software on Sourceforge, and that’s obvious from using it just for a little while. It has a nice, colorful arrangement, with most of the file and playback information pinned to the top of the display, and the playlist stretching down below. It’s clever mostly because it allows you to stretch the terminal to almost any dimension without scrambling the display. Tiling window manager, here we come.

ksmp3play has a few other features that are worth note: It will play at random or circle through in a loop, and it shows individual file times at the top and a total time at the bottom, along with a file size total, which is an interesting touch.

And of course, any time a program can give me a popup help screen, I’m a fan. That, and the dialog for adding files is quite helpful. I also like onboard volume controls that adjust the application’s output, and I like tag editing commands too. πŸ™‚

Those are most of the good points. Here are some bad ones …

That help screen I mentioned is slightly jumbled. Some of the commands listed there are off by a line, meaning “Add files to playlist” isn’t the left bracket, it’s the “a” key. And so forth. If you pay attention you can decipher it, but it’s not as “helpful” as it should be.

At the least provocation, ksmp3play comes to a screeching halt. Enter an empty filename for a playlist, and your music stops and you’re back at your prompt. Skip to an impossible point in a song with the arrow keys, and you’ll know because again, you’ll be back at your shell cursor. It also locks frequently and I get a lot of “stack smashing” errors. ksmp3play needs a lot more error trapping.

Probably irritating to me, as someone who actively looks for well drawn and well designed text-based interfaces, is ksmp3play’s refusal to just start up without a specified file to play. If I enter ksmp3play without a target, I get the help flags list. I can add files to the playlist once ksmp3play is up and running, but if I don’t give it a target to start with, it shudders and blinks like a confused pet.

There are some foggy options, too. ksmp3play offers three different options for randomised play, but nowhere can I find a description of what those three are. You can specify a delay between songs at the command line, but apparently not at the interface (unless I overlooked it). ksmp3play doesn’t bother to remember what volume level it last played at, which means it’s always going to start up at 90 percent of max (I think that’s what it is).

But the worst transgression to me is the lack of a recursive add function. I’d be satisfied to just spin up ksmp3play and feed it my master directory of music, but ksmp3play won’t have any of that. If I want to play a file I have to add it singly, one at a time, through the add dialog. (I get around that nonsense by feeding the results of find through xargs and back in to ksmp3play, which works … sometimes.)

ksmp3play is not in AUR or Debian; the author has a precompiled .deb package on the Sourceforge page, which is what you see running in Mint up there. You’ll need to install libsmpeg0 as well, which begs the question of whether ksmp3play will actually work in a nongraphical environment, if that drags in any SDL, which might drag in Xorg, and so forth.

I’m willing to give the same halfhearted recommendation to ksmp3play as I have to other incomplete projects that dwindled away in the past. It’s easy to see where software didn’t quite reach the level of “completeness” its authors probably wanted. In ksmp3play’s case, “completeness” was still a long way off. 😐

Tomorrow: ksmp3play’s “progeny.”

qplay: More music, in the code of C

I can afford to bring out another music player today, even if it does have a little less visual appeal. This is qplay, which does a nice job of carving down the music playback task.


I’m eager to try out qplay on something rather lightweight, because it’s written in C but wisely (to me at least) avoids becoming a music manager.

Granted, one of the best and lightest music players I know of, cmus, does a lot of management on top of its playback duties, and does not suffer in the least for it. But let’s just say it’s a feature I avoid. 😐

qplay relegates actual playback to mpg123 or ogg123, but apparently can accept “modules” for other formats. The interface is very vim-like, with arrow keys as well as the HJKL set for playlist navigation and seek functions. There are also paging and five-count skip keys, if you’re working with a very big list of music.

There are hotkeys for randomizing, shuffling and repeat functions, as well as a status bar to show if they are enabled, and time displays for individual files. Add files to your playlist by starting qplay with the -r and jump out of it with the “q” key. Simple enough.

Some features don’t appear to be quite … done, which seems to be a recurring theme these days. Help pages are missing, most notably, and the command line “add” function didn’t … add when I asked. O_o

But by most accounts, qplay is taking up a very slender space in memory. qplay itself floats in around 500Kb while running, which is considerably less than, for example, mocp’s claim of 6.5Mb on the same machine. Of course, qplay implies you’ll need another 3.4Mb for ogg123, but that still sets the entire suite around 4Mb, and I’m betting you can afford it.

So let’s review:

  • Written in C, so very lightweight.
  • Uses the time-honored mpg123 and ogg123 tools.
  • Follows vim-like controls, with a healthy addition of other one-key commands.
  • Doesn’t try to manage my music.

And so far its only real shortcoming is a few unfinished features. Not bad for a music player that has been on the shelf since 2005. Oh, did I not mention it was a decade beyond its best-before date? My apologies. … 😈

consolecandy: Worth the effort?

“Effort” is a relative term here, since the screenshots I have for you of consolecandy were assembled on the fly, in a live Linux Mint environment, and really only required a few minutes of my life.

2014-10-12-l3-b7175-consolecandy-00 2014-10-12-l3-b7175-consolecandy-01 2014-10-12-l3-b7175-consolecandy-02 2014-10-12-l3-b7175-consolecandy-03 2014-10-12-l3-b7175-consolecandy-04

And they’re considerably attractive. I’m not sure why I passed this over so abruptly a year ago.

I’d like to get it working in Arch, and just use it as a static background toy, but I think libmpeg3 is only available through AUR, and that package explodes every time I try to compile it. 😦

In Debian (or more specifically, Mint) though, I only needed build-essential, libmpeg3-dev, libfftw3-dev and libncurses5-dev. Yep, if I remember right, that was all. Decompress the consolecandy tarball, and enter make from the source directory.

You should be left with an executable that not only plays a song, but keeps your eyes entertained. The beauty of a precompiled distro. πŸ˜‰

I tried this on my high-end machine — a dual-core Thinkpad with gobs of memory and plenty of processor power. It seemed a little slow on the display, where I could sense a lag between pulses in the music and spikes in the output. I was not expecting that, but it may have been an anomaly.

And compared to some other music players for the console, you might find consolecandy a bit slender. By default, it has no title display, no progress indicator, no real playlist support. … The command-line flags give you some control over the particular display or the time delay between changes, but not much more than that.

Of course, we have seen other music players in the past that were similarly tight-lipped, so maybe it’s not such a big deal.

On the other hand, there are only a few console music players out there that take the time to give you a proper visual element — I can think of only Open Cubic Player and ncmpcpp (which I promised to look at again) offhand. So consolecandy didn’t have to work hard to get into the top three. πŸ™„

If all you want out of your music player is music, and perhaps something splashy to drive other geeks nutty, consolecandy is a great bet. If you need precise information and explicit control over playback, I’d recommend something else.

Hey, it’s your computer; what are you asking me for?! :mrgreen:

jdkdrum: Limitations of the media

It’s rare that I have a program I can’t share properly because you can’t hear it. jdkdrum is one I can tell you about, but if you came here for an electrifying screenshot, you’ll be disappointed this time.

jdkdrum is a command-line drum synthesizer, and even though the files are all stamped with a date of 2003, it still amazingly works … with a little help from alsa-oss, of course. In short, just enter

aoss ./jdkdrum < drumbeat3

and you can get your groove on. πŸ˜‰

You’ll need to compile jdkdrum, which takes about 3 seconds, and then feed it drumbeat patterns or instruments. If your sound system is correctly configured, you’ll get the beginnings of your very own rave. Just add strobe lights.

For what it’s worth, jdkdrum has an “interactive” mode as well, which is really just its way of allowing you to feed it custom instruments or rhythms before it fires up. Look at the readme.txt file if you need examples of that.

Also, each “drumbeat” file is really just a flat text file with its rhythm written out, so you can use those as examples to build on.

jdkdrum was a pleasant little surprise, and if you’re one of those people inclined toward audio applications, you might have fun with this.

P.S.: Not in AUR or Debian.

checkmp3: Does exactly that

A long time ago I mentioned mp3check, and we also saw mpck and mp3val. checkmp3 does much the same thing as those tools, albeit with a little less … discussion.


checkmp3 adds on the oblique ability to “fix” mp3 files, by sending the entire file to STDOUT but omitting frames which appear invalid. I suppose that could technically “fix” an mp3 if you pipe it into another file, but I also suspect it would cause hiccups in some cases. The files I used for a test run were more or less intact, so I didn’t notice any difference in playback.

You see the Debian Squeeze version there (apparently it’s also in Sid), but the man page gives a Sourceforge address which is titled, oddly, MP3 Check. I tried building MP3 Check from scratch in Arch but ran into issues; all the same, I have no reason to believe that checkmp3 and MP3 Check are not the same program. (The mp3check we saw before was strikingly different.)

That’s about all I can think of to say. It’s a very straightforward tool and (apparently) does what it promises. Let’s move on.

irmp3 and irmp3-curses: All for naught

There’s a little clock in my head that starts ticking when I have been spending too much time trying to get a program to work. And that little clock was ticking furiously by the time I got this screenshot.


That’s irmp3-ncurses, a text-based front-end to the irmp3 audio jukebox. And believe it or not, after more than an hour of scraping around in two different distros, that’s the best I could come up with.

I am ashamed. My geek credentials are in jeopardy. 😦

As I understand it, irmp3 is primarily aimed at environments that need infra-red support or LCD output, so … car stereos, custom-built home mp3 players, and so forth. And if you skim through a few of these examples, it’s quite impressive to see what you can do with it.

Unfortunately what I did with it … was almost zero. I could build both the daemon and the command-line control interface in Arch. I even managed to generate a configuration file with the built-in utility, but the daemon never seemed to find my music path, which meant the command-line interface couldn’t tell it to start playing, and irmp3-ncurses couldn’t help anyone out. Not even with alsa-oss on the team. 😦

So I switched to Mint, because the previous verision of irmp3* is in the Lucid (and Debian Squeeze) repositories. If the issue was a faulty setup in Arch, perhaps the Debian/Ubuntu versions carried enough default settings to get things rocking. But as luck would have it, the Mint/Ubuntu version was no more successful. Oh well, I tried.

There are a few considerations, of course: The last version was released way back in 2007. I don’t have either LCD or IR hardware. And I have a long-standing reputation for butchering application conf files. Any one — or all — of those could be the problem.

If you know how to get this one working, or if you have tips on how to make it sing pretty, or if you converted your 1949 CitroΓ«n 2CV into an mp3 player with irmp3, please help us out. Science demands an answer. πŸ˜‰

gplayer: Get loud with the cloud

It seems cloud-based or Internet-heavy tools are the choice of the gods of shuf today, since the second title for this sunny Saturday is a CLI-based interface for Grooveshark, the online streaming audio service.


Like I said earlier this week, I’m in favor of any utility that strips away the worthless scum that coats most Internet services, and I list the noxious, fetid remains of Flash technology among that. So from the start, gplayer wins points for allowing me to sidestep the standard Grooveshark player.

That said, gplayer doesn’t reach the same degree of finesse that soundcloud2000 did. It is worth remembering that what you see in the screenshot is accomplished in approximately 60 lines of code … of course, allowing for the fact that mplayer, that seven-headed-ten-horned beast of media playback, is doing all the heavy work.

It’s still impressive though. gplayer gives you a search function that mimics Grooveshark, returns a list of 20 results, and allows you to cue any of the titles that are listed. From there, mplayer takes over, using its keypresses as controls and its frame progress counter as an onscreen display.

I’ve found a few small incongruities in gplayer, and I’ll note them here just as a matter of record. For one, when a song ends either because it’s over or because the listener gave “q” to mplayer, gplayer never recovers its prompt. I get a dull cursor without any text, and short of pressing CTRL+C, gplayer seems to have stalled.

I don’t think that was the way the author intended, since it would make more sense to me, as a casual user, to either get a new search prompt, a prompt to cue another title, a repeat of the previous list, or just be dropped to the shell. As it is, I’m lost somewhere betweem mplayer finishing and gplayer recovering.

Second, it’s fairly easy to send gplayer into a tailspin over the selection. Any non-numeric character will cause an error, and any out-of-range of numbers will cause an error. It’s just an issue of trapping those entries and preventing gplayer from exploding across the screen.

I can stop there since that’s about the limit of gplayer’s functions. If you’re willing to hold its hand for a little bit, and if you can find a way to cue up several songs in a row, and if you’re a fan of Grooveshark in the first place, you’ll probably find a place in your heart for it.

Oh, and I think the author should follow soundcloud2000’s lead, and subtitle gplayer as “Grooveshark without all the stupid css.” Or maybe “without all the stupid Flash.” πŸ˜‰

mediainfo: There is none higher

I know of no alternatives to mediainfo, and honestly even if I did, I would probably still use it.


And that’s the short version of what it can tell you. I don’t have space on my 1600×1200 screen to show you all of what it knows. And it’s not just ripped videos either: mediainfo knows a heckuva lot about audio files too.

And if you’re some kind of glutton for punishment, check out the number of flags and options available to you with mediainfo. Just mediainfo --Info-Parameters was too much for the scrollback buffer on my terminal emulator. It may be a contender for the Most Extensive List of Options award — which is probably currently held by mplayer.

So … what good is it? Well, for OCPDers like me, who need their home movies organized by date, time, screen dimensions and title, it’s a critical tool.

With little more than mediainfo, grep and cut, I can reshuffle an entire folder full of videos in a way that satisfies that little voice in my brain that says, “This is messy.”

Don’t believe it? It’s true. With just …

for i in *.mp4 ; do DATETIME=$(mediainfo "${i}" | grep -m1 Encoded\ date | cut -c48-) ; WIDTH=$(mediainfo "${i}" | grep Width | cut -c44-46 ) ; HEIGHT=$(mediainfo "${i}" | grep Height | cut -c44-46) ; mv "${i}" "${DATETIME} ${WIDTH}x${HEIGHT} ${i}" ; done

I can go from this …

kmandla@6m47421: ~/temp$ ls
Grub-to-login in 20-plus seconds with Arch Linux-_UOiG7sWWB8.mp4
Grub-to-X in 9 seconds with Crux Linux-aQigpYak2gw.mp4
Photo frame on Pentium running Debian-cbrSlgkmkYA.mp4

to this …

kmandla@6m47421: ~/temp$ ls
2011-03-19 10:42:13 480x360 Grub-to-login in 20-plus seconds with Arch Linux-_UOiG7sWWB8.mp4
2011-03-19 10:50:28 480x360 Grub-to-X in 9 seconds with Crux Linux-aQigpYak2gw.mp4
2014-02-11 13:43:47 480x360 Photo frame on Pentium running Debian-cbrSlgkmkYA.mp4

And life is good again. All hail mediainfo! There is none higher! πŸ˜€

P.S.: There’s a GUI too, for those times when you are feeling visually inclined. πŸ˜‰

lame: How could I have forgotten this?

Somehow I managed to work my way through 20 months of console programs — usually on a two-a-day basis — and still not mention lame.


That’s unacceptable, considering I can remember lame from as far back as 1999 or maybe even earlier. Back then I was stuck using Xing‘s Audio Catalyst to convert CDs to mp3s, and a friend laughed and said, “Get lame.”

Fifteen years have not obsoleted lame, and for what I can remember, it still works just as well. And there’s even more reason to love it now, with that beautiful real-time animated conversion statistics graph. K.Mandla likes. … πŸ˜€

It might be presumptuous for me to offer suggestions on how to use a program that has been around since 1998 and reached such a widespread audience. It’s even more presumptuous because lame has help pages as long as your arm, covering everything from variable bitrate encoding to filter cutoffs to id3 tagging options. For any tweak I could offer, lame has about 20 variations.

I will be honest and say I don’t use lame much any more, since most tools I see incorporate other encoding tools, or rip straight from audio to mp3/ogg. It’s rare that I see a wav file that needs conversion. 😦 And if I must be absolutely candid, I haven’t ripped a CD to mp3 in years.

Perhaps that too is a sign of our evolution, over the last 15 years. :\

glyrc: A music search, for everything but music

For the meticulous music collector, I have a suggestion today that you might find intriguing: glryc.

2014-07-25-lv-c5551-glyrc-01 2014-07-25-lv-c5551-glyrc-02

Technically speaking, glyrc is a command-line tool for the glyr library, which is specific to retrieving lyrics, cover photos, guitar tabs … you name it, from a list of online hosts.

Seems to me, the only thing it doesn’t retrieve is the music itself. We can’t have that, now can we? :\

Supposedly glyr is use in a few music players, but it works just as well with its command line tool. Tell glyrc what you want to retrieve, add a tag for the artist and/or album, and wait patiently while it does its work.

Perhaps even more useful would be to wire glyrc into a script that reads through folders and subfolders, and pulls down all the metadata for each album in your collection. If you’re one of those people who manages their music, that is … and doesn’t rely on the application to do that. πŸ™„

There’s not a lot more I can show you about glyrc, even though there’s a lot more potential here. My favorite point thus far is the option to download backdrops (think: wallpaper) by artist or album. Rabid fans can pull down an image a day and rotate through their collection, if they have a smidgin of coding expertise.

I’ll leave you to explore glyr and glyrc further; its usefulness and appeal will be directly proportional to your taste in music, and your need to flesh out the metadata of your collection. πŸ˜‰