Smooth Music and the LTM

It’s been a while since the last entry, but at least I’ve been up to some good. There have been some exciting happenings regarding Sonance, too numerous and exciting to post here, right now. However, lately I’ve been enjoying iTunes while developing Sonance. I now have an iPod, and am loving it – but it’s not just for play. Currently I am performing five concurrent tasks in iTunes, and am happy to say that Sonance’s backend is ready to handle the same tasks soon. All at once I am Ripping a CD, Importing music to the iPod, Downloading purchased music, Burning a CD, and listening to music. This task load started as me re-ripping most of my CD collection to AAC (vs OGG) in order to actually have content to fill the iPod. In many ways this is a shame – I’ve been using OGG for years, and the only reason to drop it is because the iPod doesn’t support it, and that really needs to change.

Anyway, Sonance handles all of its extensive IO tasks with no lag in the interface at all, like iTunes. This is due to the Library Transaction Manager (LTM). IO tasks are handled through Library Transactions, all which extend a base class, so the LTM can manage the actual transactions. Transactions of the same type cannot be executed concurrently, and are therefore executed in a queue (For instance, you couldn’t burn two CDs at once). However, transactions that are not of the same type can be executed concurrently (I can import, burn, rip, and listen all at once). Additionally, the LTM provides access to the top-most transaction (usually the last transaction initiated), and then an array of the top-most transactions of each type. The interface can then query each transaction for status information. This allows the UI to provide status pages like iTunes – the top-most transaction’s status is displayed first, with the option of cycling to other transactions.

Development for Sonance over the next three months is going to be extremely exciting. A few major target features are iPod support, CD Burning, and CD Ripping. More details on this are soon to follow, when I can find a spare moment.

In somewhat other news, I’ve implemented a nice test case for all sorts of common Drag-n-Drop functionality desired for GtkTreeViews, including multi-row DnD, drag reordering, drop between rows, and drop on a row (both vs. the default drop between or on). This functionality will be included in Sonance, but I wanted to iron out a test case for other projects and make sure the code might not suffer from unrelated factors. I’ll make this available when it’s a little more polished off, and I have another spare moment.

F-Spot, Server Monitoring, ASP.NET, and Crazy Dancing

Today I relaxed a little bit and decided to organize ~/Photos, which has been an all purpose photo dumping grounds for the last year or so. I don’t take many photos, mainly because I have a horrible 2MP camera with awful focus and lighting, so I only had about 400 photos to organize. I built F-Spot for the first time today, and am extremely impressed. However, I did this after manually cropping and rotating about 80 photos using The Gimp. I am extremely impressed with F-Spot – it makes me even more inclined to finally purchase a nice camera.

I love the simple photo touch up tools and the fact that it doesn’t overwrite the original, and of course tagging photos like “Favorites.” The timeline widget is amazing – too bad only a few of my images have EXIF information, because about 90% of my photos, as reported by F-Spot, were taken today, when I copied many of them to a new location. Not much can be done about that I guess.

Anywhoo, I started writing a simple standalone HTTP server in C# today to serve status information regarding the health of my server and its applications and services. It is made up of a simple multi-threaded HTTP server that sends XML “ResponsePackets” containing status information (like uptime, system load, process listings, whether a given service is actually running, memory usage, etc). Each ResponsePacket is handled in code by extending a base ResponseHandler class. These extended classes are then registered with the server at startup in a Hashtable. When a client sends a GET request in the form of “/a:b:c”, “a”, “b”, “c” are parsed out and used to look up the proper ResponseHandler to execute. It’s kinda nifty. I’ll write a simple front end client for it that can email and text message my phone if/when a service goes down.

Of course I’ll release the whole thing in a few weeks when it actually becomes useful.

I also finally managed to build Mono 1.1.7 under my Linode UML server. Before today, Mono would segfault and/or throw a NullReferenceException during compile of mcs. I found out today that it was TLS that was causing the problem, as it’s not well supported under UML. All is well, and I now have mod_mono setup and working, and I look forward to learning ASP.NET (I never thought I would say that!)

Finally, last week I went to my brother’s talent show at his high school. Per his request, I brought my video camera, and recorded most of the show. Some of it was rather amusing, and I think I may put parts of the show on my web site. I’ve started with Shay-Shay. Enjoy!

Modern Music Management Experience: In Linux

With Sonance gaining much attention, and development gaining steady ground (though sometimes slow, due to trumping obligations that pay my bills), it is starting to unfold into a more modern environment for managing and playing music.

I am overjoyed with how well Jon Lech Johansen’s SharpMusique works. I purchased my first song through it today. Beautiful. There are plans to integrate it into Sonance for the ultimate music experience yet to be seen under Linux. I can’t wait until I can search for new music in iTms, purchase it, and have it appear shortly thereafter in my Sonance library. Yes, it is sick.

I made an SVN commit today that shows off some of the new functionality/widgets in Sonance, but I’m sure I’ve broken somethings, specifically adding tracks to a playlist. The next SVN commit will be more pleasing and feature complete. After a few more SVN commits, the next public release will be available.

One snag though, regarding which I am rather upset. It appears that you can’t drag-n-drop multiple selected rows in a Gtk.TreeView. This is upsetting because to add new songs to a playlist from the library, I wanted to be able to select them, and drag them onto a playlist in the sources TreeView. Apparently the problem is in GTK, not gtk-sharp. I read there is a hack for the problem in egg, so I’ll investigate that, and see what I can do. It’ll need to be wrapped, which is annoying. It seems like this should be supported in GTK itself. If I am misinformed, or if anyone has suggestions, I’d be glad to hear them!