How-To: Create an open-source jukebox

December 01st, 2008 | Category: Blog, Tutorial

What: An open-source jukebox.
How: Read on!

Recently I was tasked with creating a jukebox for a party. You can read all about my thoughts on the matter at the link; this article is to provide with the specifics on what software I used, and why.

  • The Hardware

    The hardware I chose to use was rather limited in performance, which I think illustrates the efficiency of the software and solution which I designed. Components were as follows:

    • CPU: Pentium II 300Mhz
    • RAM: 384Mb SDRAM
    • Motherboard: Intel i440BX-based
    • Video: S3 Virge DX/3D
    • Storage: 4Gb, 5400RPM ATA HDD
    • Sound: Creative Sound Blaster Live! 5.1

    Obviously, I chose the software based on the known limitations of this hardware. Luckily I had a spare SoundBlaster Live! card, because I don’t think the system would’ve been able to reliably handle the music playback and the overheads of the user interface without it. Of course, whatever hardware you plan on using will probably be much faster. I really did pull this box right out of the stone age.

  • The Operating System

    The operating system I chose in order to optimise performance was of course my favourite Linux operating system: Arch Linux. With the kernel, modules and all packages being i686-optimized, it was a good starting point for a “from scratch” jukebox system. More importantly though is that after installation of the base system, I had a basic, but fully working, command line Linux system at my disposal. This meant there were no unnecessary startup services, configurations and other settings which would have been useless, redundant or otherwise a hinderence to performance on this slow system.

  • The Desktop Environment

    I chose to install XFCE as the desktop environment because it is the most lightweight of the ‘fully-featured’ environments. I would have liked to use an even lighter option, but of all the specialty and niche options available, I had never used any before, and this build was to be completed in a few hours. So, I chose XFCE which I found behaved no differently to GNOME, but was still relatively responsive despite limited system resources.

    To make the GUI look decent, I had to install a few additional packages that are not explicit dependencies of XFCE. They are listed below.

    • ttf-ms-fonts - the easiest way to make websites look nice is by installing this font package
    • midori - a lightweight, Webkit based browser for GTK+ environments. I chose this over Firefox due to the AJAX-heavy nature of the relaxx player. Webkit is supposedly superior in performance compared to alternatives
  • The Webserver

    Now, you may be wondering why, with such a limited system, I was bothering with so many layers of abstraction between music, player and control. The reason is that none of the music playing applications I investigated (and there were quite a few) offered any functionality near that of a simple party jukebox. So, I had to use a web-based front end for mpd called relaxx, both of which I’ll talk about soon.

    The webserver of choice is lighttpd; a light weight simple web server, with all the features (and a lot more) required for what I had in mind.

  • The Music Daemon

    Simply put: mpd. Or, Music Player Daemon, as it is less commonly known. I chose this system for multiple reasons: first and foremost, its awesome efficiency. With my 80Gb music collection catalogued and at my immediate disposal, mpd uses approximately three megabytes of system memory. Yes, you read that correctly: three. megabytes. If I go ahead and do something silly like, say, add my entire music collection into a single playlist, that number jumps to a staggering (!!!) eight megabytes. Yeah, I know. It’s ridiculous.

    Secondly, due to the daemon nature of mpd, you can use any frontend you like. You can use a text-based terminal application, you can use a GTK+, Qt or other, or you can use a web-based application, like relaxx player.

  • The Music Frontend

    This is the party piece — the piece of the system that everyone gets to see. I chose relaxx player because it had some of the functionality that provides jukebox-like behaviour. Well, kind of. It essentially only had one major feature that made it stand out from a variety of other mpd front-ends: multi-user capability. Essentially, you could lock down certain features of the interface for anonymous users, and require a login for those functions. So, essentially that meant I could specify that anonymous users were only allowed to add songs to the playlist and press play. Meaning you had to log in to delete tracks, stop, pause or rewind, etc.

    The installation of relaxx was straightforward, but I had to install a few extra packages under Arch to make it work properly:

    This was the only part of the system which didn’t quite work out so well. Its functionality was great, but due to the fact that it’s programmed entirely in AJAX, the old Pentium II powering the computer couldn’t quite keep up. It was slow to respond and not very nice to use, but it was usable. The music itself never skipped a beat (literally), but the performance of this frontend left something to be desired.

No comments

I think I’ve got my groove back.

August 24th, 2008 | Category: Blog

For a while there, I’d lost my groove. I’ve always been seriously interested in constantly learning new things about computers, and learning new things in general. For a while there, my interest was waning somewhat. I’m still trying to figure out exactly what it was, although I know many people will tell me it was my other half. Haha, yeah, that works.

Anyway, the point I’m making is that for the last 12 months or so I’ve been wallowing a little in my own self-pity. There was an interesting story on Triple J’s hack programme Friday, about how kids — well, young adults — these days are stressed out to the max when it comes to making life decisions. Australia’s quite a well-off nation, and our high-school graduates are faced with so many choices because of this. Straight into work, tertiary education, travelling the world, dole bludging even. The comparison is made to the era of our parents whose career choices were extremely limited. A good example would be my own mother who finished school at the end of year ten, whose only marketable skills at the time saw her placed into any of the following roles: secretary, typist, or administrative assistant. Yeah, you see what I’m getting at?

These days, we have so much freedom in terms of choosing our career paths … it’s quite stressful. The point is made on the programme that it sounds spoilt, but the burden of choice is extremely taxing on our young minds, and it’s not an easy decision at all.

Anyway, the point I’m getting to is that I’ve never really know what I wanted to do. Parents and teachers always asked during high-school, and even before, “what do you want to be when you grow up?” — which I think stemmed from their own upbringing, and the mindset that you were destined for some arbitrary role in society of your limited choosing. They asked a question which wasn’t relevant to the children whom they were asking. In my case especially, as I’ve never really had any life goals.

I want to own a sports car, and I want to own a house one day. The time frames are pretty undetermined. Though these days I’m thinking more about those two goals, if you’d asked me about those things three years ago, I wouldn’t have had an answer for you. These things do take time.

So for the last twelve months or so I’ve been doing not much with my life. Just studying and working when I have to, and in my personal time, chillaxing. Which is fine, but I think I neglected my self-learning a little. I dropped out of the loop for a while. In hindsight, I can see that it was a good thing for me to have done. I was getting bored with it all, and I needed a change of pace. So I spent time with my girlfriend a lot, and more recently started wasting time playing World of Warcraft.

I don’t mean to say that I’m going to neglect my personal time now that I’ve re-energized myself. I’m going to devote more thought to my personal time so that the time I do spend on myself, and on others, is more worthwhile.

Work has picked up, though. Not my main job, that’s still pretty bland. I don’t care about finance so much. It’s remotely interesting, and I’ll pick up tidbits as I go along, but I won’t actively teach myself about it. My other job however has started off excellently. I’m my own business and I’m doing some research for a guy who does full IT system implementations for small businesses. The twist is that he does it using all open-source software. You know how much I love open-source.

So last Wednesday, my first time working for him, I spent some of the day researching ways to do unattended installations with Ubuntu Linux, and then I spent the rest of the day starting to implement our first revision of system we’re putting in place. I spent the entire day working on my laptop (Arch Linux), logged into his server (Ubuntu), using awesome open-source tools (Firefox, Tomboy Notes, vi, etc). It wasn’t restricting (licences). I didn’t have to learn to speak another language (Microsofteese). I wasn’t constantly worried about lack of documentation (third-parties).

So now even though I’m about to spend my Sunday fixing not one but two Windows PCs for friends and family, I’m not in that poor a mood. I’m going to fix one by installing Ubuntu on it and having all the Windows-only apps run in a virtual machine courtesy VirtualBox, and the other I’m charging for. So that balances out for me!

Anyway, the Ubuntu ISO has finished downloading, so I better get to it.

3 comments

Protected: GPL guffaws: Jin vs. IChessU

September 06th, 2006 | Category: Uncategorized

This post is password protected. To view it please enter your password below:


Enter your password to view comments

OSS is transparent, interoperable and efficient

August 23rd, 2006 | Category: Blog

Open Source Institute
The benefits of open-source software have been known to its proponents since the concept’s inception. Open source, by its very nature, is open software that allows for addition and modification of source code by any and all who choose to do so. Consequently, follow-on benefits become apparent: this open nature is conducive for producing an IT environment powered and supported by open technologies that are transparent, interoperable, and efficient.

Instead of being restricted by proprietary licencing and arbitrarily enforced limitations, open-source software leaves developers and users alike to make free choices about the software they use. Unrestricted by vendor lock-in, users are free to switch software solutions as they please, allowing IT departments and home users alike to make quick and resolute decisions concerning software they use.

This of course is much to the chagrin of large software organisations that rely on said vendor lock-in to maintain market share. This has been one of the main sticking points for many governments, businesses and other organisations plans to transition to free and open-source software solutions. However, recently the US Department of Defence and the Croatian government have both made serious efforts toward evaluating and implementing open-source software solutions for use in their day-to-day tasks; the Croatian government has implemented an open-source software policy for all government departments, which encompasses the following guidelines:

  • Government institutions will choose and/or develop open source solutions as much as possible, instead of using closed source alternatives.
  • The government will support development of closed source solutions that use open standards for protocols and file formats, and which are developed in Croatia.
  • The government will support the use of open source programs and open standards outside of its institutions.
  • The government will support the use of open source solutions in educational institutions; both closed and open source solutions will be equally presented to students.

(provided by NewsForge, “Croatian Government adopts open-source software policy“)

Indeed, from the NewsForge article linked above, here are the words of Domagoj Juricic, deputy state secretary at the Central State Administrative Office for e-Croatia, who is the leader of Croatia’s Open Source Software Policy project:

“The use of information technology in government administration bodies is increasingly becoming important. So far, most of the software we use is proprietary software, so we cannot modify or complement it, or link software from different vendors. These software products impose rigid commercial conditions of use and limit our possibilities. In this way, government administration bodies may be led into a dependent position on the supplier of the software. This could lead to closed information systems, which make the success and efficiency of our eAdministration project more difficult.”

Similar sentiments are put forward by the US Deparment of Defence’s report, The Open Technology Road Map. The report identifies critical differences between the acqusition of physical goods vs the aquisition and use of digital media. While currently, many proprietary software programmes are treated the same way as a physical good, the report argues the arbitrary limitations of proprietary software, stating:

Digital goods (software code, music, movies, etc.) once created can be copied perfectly with relative ease: limiting distribution enforces scarcity, but that scarcity is arbitrary and negotiated, rather than an innate property of the product.

This arbitrary limitation of software availability also has an impact on inter-departmental software sharing:

Currently within DoD, there is no internal distribution policy or mechanism for DoD developed and paid for software code. By not enabling internal distribution, DoD creates an arbitrary scarcity of its own software code, which increases the development and maintenance costs of information technology across the Department. Other negative consequences include lock-in to obsolete proprietary technologies, the inability to extend existing capabilities in months vs. years, and snarls of interoperability that stem from the opacity and stove-piping of information systems.

Alongside vendor lock-in and the consequent reliance upon the software vendor, proprietary software suffers from lack of features, as well slow turnaround time for bugfixes and feature requests. Open software does not suffer the same limitations, as software developers can be contracted as needed to make additions to existing software, without the arbitrary licencing restrictions placed upon alternative proprietary software. Software developed for use in one department can be easily deployed in other departments, and collaboration of efforts between inter-departmental software development is made easier.

If the Croatian government and the US Department of Defence can adopt open-source ideals, technology and software, there is no reason why other governments and government departments cannot do the same. Open software allows for consistent interoperability (code-sharing, systems compatability, data management), offers system transparency (ease of auditing, bugtracking and fixing, feature implementations) and improves efficiency (reduction of code duplication through code re-use, ease of integration of new features and technology, streamlining of developer contracting) and overall, produces not only a better system of software, but at the same time reduces cost, eliminates vendor lock-in, and produces community-friendly code, which benefits everyone.

No comments

Protected: Intel, AMD talk open GPU drivers, jaw-related injuries skyrocket

August 10th, 2006 | Category: Uncategorized

This post is password protected. To view it please enter your password below:


Enter your password to view comments

Protected: WiFi exploited at driver level

August 05th, 2006 | Category: Uncategorized

This post is password protected. To view it please enter your password below:


Enter your password to view comments