Categories
minidisc open-source tech

Minidisc, recording mp3 with DAAP and foobar2000

Yes! At last a way to work the word “foobar” into a blog post with it NOT meaning a Perl “placeholder variable”. Awesomes!

So I upgrade a lot less frequently than other folks. I favour “working with what you have” and really learning to get the best out of a tool. Admiral Adama knows what I’m talking about. In the re-imagined BSG, Adama repeatedly outmanoeuvres a technically superior opponent with his obsolete Battlestar Galactica. This is not just because he has guile, he knows the ship and it’s capabilities intimately too.



I have let my beloved Palm Treo 650 go to be replaced with the HTC G1 running Google Android 1.6. I had my Treo for about 4 years while people around me were upgrading every year and still complaining and not being satisfied. I am really happy with the Android so far. I plan to run CyanogenMod soon.



Also my trusty Debian Lenny slug (266Mhz CPU, 32MB) has been replaced with the more powerful plug (1Ghz CPU, 0.5GB, also Debian Lenny, purchased from service-oriented UK distributor New-IT). The HDD pictured is a fantastic bit of kit for it’s rugged simplicity, military-issue looks and build quality. It is a 1TB WD Elements USB HDD.

It stands apart from it’s brethen in the external HDD commodity market IMHO. Of note is its use of a USB-B plug rather than a ridiculous Mini-USB port which can be easily knocked out. The USB-B connector snaps in place with a reassuring click.

And finally the last upgrade in the series: my lovely piano-black Antec quiet case housing my Pentium III 800Mhz 512MB general use server/desktop is being put out to pasture… the PIII that is, not the case! I have had this since 2000 and it’s been very, very reliable. I put this down to the solid build quality of the Asus motherboard and Intel design. So 10 years later in 2010 I am upgrading to a P4 3.2Ghz HT chip with 2GB of OCZ RAM. I sourced this for the bargain sum of £50 from eBay (therein is another story, but thats another blog post).

I also needed a PCI-Express video card (£5 eBay) and SATA HDD (250Gb WD x 2, £25 each, eBay again). Most of my stuff is AGP and IDE so I prolly need a new PSU too. In another 10 years I will probably have a quad-core or whatever £50 in 2020 money can get me 🙂



The above are screenshots of my Windows 7 desktop. The reason for the Antec PC upgrade is, partly, that I was planning to use this PC as a MiniDisc recording station. Thats right – I’m a big MiniDisc fan. I will elaborate more on this strange condition in another blog post sometime soon. So back to the story – I installed a nifty PCI digital optical card and daughter board in this PIII based PC.

This is because I prefer to record to MD using digital optical for optimum sound quality and there is no faffing around with recording levels. I then decided to try Windows 7 (the Evaluation build) on this PC as I heard very good things about it and being a primarily Ubuntu desktop user I like to see what “the other side” are doing. It installed without of a fuss and I’m very, very impressed in it’s speed on such modest hardware. Only snag was that I had to go through about 4 different NICs before one was recognized (good ol’ Realtek). So with network in place I completed the updates and installed my favourite apps (Chrome, Picasa, I do without AVG this time). My verdict?

This is the best Windows yet by a country mile and one I would even consider buying a licence for.

So I excitedly configured my plug with mt-daap (Firefly) the DAAP server. I figured that something with the words “Audio Access” and “Digital Protocol ” in the title would be optimized for streaming audio in clever ways over a network. My plug is a primarily a media repository shared out with Samba with many gigabytes of music. However I am only to be disappointed. You see, DAAP is OK if you just want to stream stuff to somewhere but as soon you want to do something a teensy bit advanced then you are sh!t out of luck. Servers me right for not RTFM’ing.

I want to create playlists and then record them to a MiniDisc in realtime as a compilation. Creating compilations is one of the best things about MiniDisc and one reason I I have gone back to the format. Somehwat ironically, I install iTunes – surely this mighty flagship application will let me stream music over the network and contruct playlists with them?

Great, it finds my DAAP share and attempt to drag some tunes into a playlist but the mouse pointer has that “no entry” look about it. I try again. I search the options for the “bloody-create-playlists-from-daap” option but cannot locate it. Crap. I can’t do it. Well, opensource to the rescue right? I boot into Ubuntu 9.10 and try the same with Rhythmbox, and… same issue! Noooo! So it looks like it is a limitation of DAAP. Knackers! 🙁


So what now? A little Googling reveals suprisingly little sign of people complaining about not being able to make playlists with DAAP shares. Surely thats a fundamental bit of functionality? However, in performing my Google-fu I come across something else… something better than iTunes: Foobar2000.

This amazing bit of software is an advanced audio player with a ton of plug-in support. It’s all I admire in software – fast, low-footprint, responsive, a clean, simple yet attractive GUI and well engineered internals. There’s little sign of network support so I decide to use the good ol’ Samba shares to my music and import them into Foobar2000 – it does so with a minimum of fuss and I can of course construct playlists from these sources so I am very happy with it. Note that Windows 7 by default does not play nice with Samba shares, at least in Debian Lenny. Please refer to this post on the change to make to the Local Security Policy so that Samba shares become usable.



Observe the CPU usage history above – the peaks and troughs co-incide with the music being fetched over the network (peak) and buffered with playback (trough). This was part of the impetus for the upgrade. Windows 7 chugged quite a bit. Eventually I’d like to run Xen with a whole bunch of virtual Debian guests and this is why I need “moar rams” and the multi-Ghz CPU. Stay tuned for a blog post about that later.

With MiniDisc recording one has to ensure a 2 or 3 second gap between tracks to generate a track mark. A little searching and I find an appropriate plug-in for Foobar2000. Yeah baby! I am all set and I try an experiment with what I consider to be the best tracks from the BSG soundtrack (hard to do because the quality of all Bear McCreary’s music is very high). I cue the tracks, start synchro record and walk away. I come back in about an hour and presto – a fresh MD waiting to be enjoyed and savoured. Simples! 🙂


Categories
open-source tech

The Catalyst Perl Web Framework

I’ve been meaning to update the blog for a while as some important stuff has happened.

The MySQL High Availability project went live in early January and is a success 🙂 We made some changes though. Sadly, we decided against read query scale-out because we found that extremely large queries took a noticeable time to propagate. So now read and write queries both loopback. A shame as the application felt faster with read scale out and I deliberately upped the query cache on the read server. Of course, being reliant on a single database for reads also introduces a single-point-of-failure (SPOF). Thinking about SPOFs in other arenas has lead me to reliable ssh tunnel projects like autossh, which is something I can make use of elsewhere.

Debian 5.0, Lenny, was released! As a sysadmin it is both exciting… and a bit of a pain in the bum. Probably in equal measure. In non-production tests, Etch to Lenny dist-upgrades seem to be pretty painless apart for some small oddity in MySQL not coming back up (just start manually). Also we are faced with an upgrade of Apache1.3 to Apache2.2. Lets see what happens there.

I’m getting into Catalyst these days. Essentially, to Perl what Rails is to Ruby. I have plans to implement an existing Perl/mod_perl web app in Catalyst as a way of learning it. It’s quite exciting stuff. Tomorrow I attend an Advanced Perl class which also touches on Catalyst. I have been hacking it on and off for the last 6 months but I just feel I need to kick it into a higher gear and maybe this class will enthuse me. Another idea I had was to create my own blog in Catalyst (a bit like Jono Bacon). Part of the logic in doing that is that in theory it will be more resistant to automated attacks.