Status: Working


May 15, 2012

I've started a bit of new development on this and fixed all sorts of crap for version 0.60. Not much new in this release except a help window to list commands and a reworking of the ncurses usage to actually use the panel library properly... It turned out that the bug supposedly fixed back in 0.40 was never really fixed but I didn't care enough to fix it. Now with proper panel usage I can't seem to reproduce the bug.

Soon I'd like to add a graphical equalizer at some point and perhaps even some volume control...

December 11, 2010

I graduated this week and am trying to resume some of my projects now that I have time. I mostly abandoned this project and I'm certainly the only user of it around. Anyways, bug fixes are still legit so I finally fixed the bug that has plagued ncrok since day 1 where the interface would just crap the bed randomly when scrolling while playing. Still don't fully understand the cause, but I tried just being obsessive about thread safety and this seemed to do nothing. Whatever, it's fixed. Also made some other minor changes and bug fixes.

November 7, 2009

I've been debating creating a GTK release as well, providing exactly the same functionality. It seems to be the quickest way to alleviate the ncurses/gstreamer disagreements. The other option is to write a whole new output system not using gstreamer and I can't find myself with enough time on my hands to do that. Piss poor, right?

Maybe it wouldn't be that much work. Just need to get familiar with a lot more audio decoders and I'd have to force dependency on ALSA.

nCroK music player screenshot

The current state of Linux music players is fairly terrible. There are a number of good options for smaller collections (notably AmaroK, Rhythmbox, and Exaile) which are inadequate for larger collections. They are all resource-heavy, being based in GTK or QT. In some cases the library is managed in a database, never making its way into the program's own memory. This results in painful search and sort times on a large collection.

The ideal music player to me is lightweight and quick, at the cost of trivial functionality such as automatically searching for album art and keeping track of my own ratings of songs. GTK and QT are often limiting not only because of their resource usage, but also because they restrict a user to having an active X11 session, which is not always the case. I find myself rarely needing custom playlists, however, a nice feature introduced to me by AmaroK is to be able to queue tracks while playing others. Once the queue is finished, the list should continue to play through normally from the last queued track. This allows users to easily modify the list of tracks to be played while keeping the library intact. Additional similar features would be the ability to set the player to stop after certain tracks. I often go to sleep to music and much appreciate this feature where implemented.

My implementation, called nCroK (ncurses + AmaroK, pronounced however the hell you want), is to acheive this goal in a minimalist fashion. Ncurses has been chosen for the GUI, since it is lightweight and versatile by not requiring X. My goal is to implement the important and awesome queueing system that I first met in AmaroK some years ago while significantly decreasing the resource requirements for acceptable performance on a large (20,000+ tracks) library. For simplicity, I have chosen Gstreamer for its ability to handle most major file formats and be able to work with a number of audio output APIs (ALSA, JACK, Apple OSX) transparently. Both ncurses and Gstreamer have a native C API. To incorporate ID3v2/3 tag reading, I am using taglib, which is native to C++ and handles varied encodings of tag data. Gstreamer uses taglib as well but using taglib directly is a bit faster.

What it can do:

Still to do:

Manual: (manpage to come)

$ ncrok [list of initial paths]
If no paths are provided, ncrok will attempt to load your last saved playlist

Key Action
h Show help window (as of version 0.60)
Up/down keys, page up/down Navigate the library
o Add path to library and sort
; Save playlist -- This playlist is saved in ~/.ncroklst
l Load playlist
Enter Play track
[ Previous track
] Next track
p Pause track
s Stop
Right/left 5 second relative seek
< and > 20 second coarse relative seek
. Jump to first match from beginning of menu string. ESC exits this search mode.
/ POSIX regex search. This will find the first match, then arrow keys navigate other results.
a Toggle track queueing. This list will be processed upon completion of the current track and, upon completion, will continue to play from the last track in the queue.
z Toggle stop after track. The playlist will stop after the next time the track is played.
DELETE Remove a track from the playlist. Does not delete the file. (New since 0.40)
j Jump to currently playing track.
As of 0.40, it will continue to cycle through your queue.
jz Stop after currently playing track. This isn't really its own command, but I use the combination frequently enough to mention it.
^l Redraw the screen. Use this if gstreamer biffs and outputs junk on the screen. Will not help if said output forces the terminal into Chinese. Seriously.
q Quit



Files: (Now featuring CMake! Come on, at least it's easy...)

Back to more useless crap

Valid XHTML 1.0 Strict