Computers

Thesis Submitted!

I meant to post this here a while back, but kinda forgot to. Anyway, on Monday last week I finally submitted my thesis. The title is “The Impact of Representation on the Evolution of Genetic Algorithms.” Now I just need to sit back and wait until the examiners get it, mark it, and probably send me corrections to make prior to it being accepted. I’m going to try for the August graduation, but that is perhaps a bit too hopeful unless the marking happens faster than I expect it will.

Unfortunately, the plans for work I had lined up in the Netherlands didn’t pan out due to the immigration system there making it very difficult for a relatively small company to get a work permit for a foreign employee. As such, I’m still looking for work, although I have enough here to tide me over for as long as I need it. That said, I’m definitely looking to get out of Dunedin, and ideally New Zealand, in the relatively short term. So if you have any ideas, let me know!

For now, I have my regular work, which I’m doing fairly short hours on right now, and a contract job for Naxos (again) upgrading their version of eMusic/J to match their new requirements. It’s good work, and the improvements will flow back into the normal version. It’ll be nice to finally get another release of that out the door, it’s been on something of a hiatus while I finished the thesis.

Artificial Intelligence
eMusic/J

Comments (0)

Permalink

Monitoring Puppet with Nagios

I’ve been setting up a Puppet system at work so we can easily set up virtual servers, and also so that all the configuration is in one place.

Yesterday, someone suggested to me how I can have our existing Nagios system monitor the state of the puppet configuration. This allows me to be notified if there is something causing puppet to fail on any of the monitored nodes.

There is a Ruby script out there that is a Nagios plugin, however it requires extra Ruby libraries, and I don’t know how to handle them nicely on a Debian system. I do, however, know how to handle Perl libs. So I wrote a Perl plugin that does the same task. It’s got a lot of hard-coded paths and times and such, you’ll want to make completely sure that they work in your configuration. It’s also not well documented, but it is quite basic: check_puppet.pl

The main tricky dependency it has is on Nagios::Plugin, but it’s in CPAN, so some dh-make-perl should get you a Debian package for it easily.

Linux
Sysadmin
Work

Comments (5)

Permalink

eMusic/J 0.25 released

First update in a while, just fixes to various things.

  • Overhauled the filename cleaning stuff, hopefully finally fixing issues on windows. — found more filenames that windows dies on, so this deals with them. Hopefully that’s the last of them.
  • If the option ’spacesToUnderscore’ is ‘true’ then spaces will be converted to underscores in filenames. — someone asked for this, and it was easy enough to do when working on the other stuff
  • Handle the case where the emusicj script is a symlink to the real location, and use that to find the program directory — makes it nicer for people who lay their applications out in complex ways.

Find it at the usual place

eMusic/J

Comments (0)

Permalink

eMusic/J 0.24 released

This is a pretty small one, mostly just to fix a problem some people were having.

Changelog:

  • Truncate the pathname to save files to if it gets too long on windows (which has stupidly low limits) Some classical albums have really long names, and there were some that couldn’t be downloaded as a result. This hopefully fixes the problem, although I haven’t tested it yet.
  • Added option to allow the user to specify that they don’t want cover art to be downloaded. This is done by adding the line ‘downloadCoverArt=false’ to ~/.emusicj/emusicj.prop. Someone wanted this, I can’t remember why, but it was easy enough to do.
  • Updated build.xml to allow more flexible compiles, such as not always creating a dist build Apparently some people are making distro packages of eMusic/J, and this makes life easier for them. Related to this, I’ve started posting the source code of each release on the site, too.

It can be downloaded here.

eMusic/J

Comments (6)

Permalink

eMusic/J 0.23 released

I’ve just put out eMusic/J 0.23. The main reason for getting this out there is that there is a bugfix for a problem that occurs in a certain (rare) circumstance.

Here’s a list of the changes:

  • Allow multiple tracks to be selected This means you can shift-click or control-click to perform operations on multiple tracks. This is a prelude to drag-and-drop support, which I hope to get to some time soon.
  • Adds auto-remove timer to tracks that were finished when the program started Previously, and tracks there when the program started were never cleared automatically. Now they are.
  • Trim spaces from ends of album/track/artist names as vfat doesn’t like them
  • Changed default save location of files to ~/Music or ~/My Music (whichever exists), defaulting to the first one if neither do This should make its default save location a bit nicer on various platforms.
  • Fixed an infinite loop if the album/artist/track names contain a path wildcard (e.g. %t). Thanks to Hugh Brackett for spotting this one. This caused the program to peg the CPU on this album due to the track “S#%t Outta Luck”

It can be downloaded from the eMusic/J homepage.

An extra note, a customised version of this program was developed for Reggae Country to use with their download service. Thanks for their support!

Java
eMusic/J

Comments (0)

Permalink

Making the Hercules DJ Control MP3 work with Mixxx

(Note: files updated for Ubuntu 8.04)
(Another note: this is all unnecessary now, as Hercules has released Linux drivers for their devices. Just install, and away it goes.)

A little while back, I got a Hercules DJ Control MP3, which is an entry-level DJ console that connects to the computer with USB. Unlike most of these kinds of things, this isn’t a MIDI device, so making it work requires a bit of hacking.

Mixxx supports the Herc DJ Control Mk1 and Mk2 just fine, by talking to them directly over USB, unfortunately the Control MP3 requires some magic for this to work that noone has figured out yet. However, the kernel can talk to it using the HID system, which usually is used for keyboards, mice, and other random controllers. The problem with this is that the LEDs don’t work. For some reason, the Linux kernel (as of 2.6) ignores any LEDs that the device says it has if it doesn’t know what they are. With a bit of kernel hacking, this behaviour can be changed, and then Mixxx will use it just fine. If you don’t do this, the controls work, but the LEDs don’t. And we all want blinky LEDs, don’t we? :) (Also, I used some of the spare LEDs on the controller and made them into a VU meter, which works surprisingly well.)

So to start with: making the kernel work right. I’ve made a patch against the Ubuntu 2.6.22 2.6.24 kernel, here. Or, if you are using Ubuntu 32-bit with this kernel, you can just use these two modules: hid.ko and usbhid.ko. (Files for Ubuntu 7.10 are also available). With the Herc unplugged, do:

sudo rmmod usbhid; sudo rmmod hid; sudo insmod hid.ko; sudo insmod usbhid.ko

(it pays to do them all on one line, as USB keyboards and mice may stop working while the module is unloaded). If these load properly, then you’re half way there.

The next step is to make Mixxx work with this. By default, it only supports the Mk1 and Mk2, as it uses the direct USB way of talking to them. To make it use HID, you need to recompile it, using the current SVN version. How to do this is documented on the Mixxx website, but the compile command needs an extra option, thus:

scons djconsole_legacy=1

The binary that this spits out should handle the LEDs just fine.

This is all very hacky, but hopefully it won’t be in the future. I’m going to see if I can get that patch put in the kernel proper, which will solve the most annoying part of the problem. It would also be good to get Mixxx supporting both legacy mode and the newer one at the same time.

However, we’ve heard from Hercules, and they say that some time in the first part of this year, they’re going to try to get some Linux drivers out. Hopefully they’re open source, and turn the Herc devices into MIDI devices, which would make life a whole lot easier for support.

Linux
Music

Comments (3)

Permalink

First ever DJ gig

For the past couple of months I’ve been playing with Mixxx, practising mixing music. Today I played in front of a crowd for the first time ever. It was a friends birthday, and I’d raided his Gatecrasher CD collection first, so it wasn’t nice, heavy industrial like I’d like, but still, most of the people there seemed to like it. Coincidentally, I’d included a few tracks that people knew, which helped.

It was a load of fun, so hopefully I’ll get the chance to do it more. Even better if it’s the sort of stuff I prefer, although it’s much harder to mix the heavier stuff. But, if I put in more practise I’ll get better at it.

I really need to get a cheap control system to use with the laptop, it’ll be much better than using the keyboard for everything. I’m looking at the Hercules DJ Control MP3, it’s supposed to be pretty crap (very laggy), but it’s cheap, small and portable. It also works with Mixxx properly. When I get into this more, I can look into buying a more expensive and good one and hack Mixxx to work with it. Unfortunately, they don’t ship this outside the US, so I’ll have to find someone there to ship it to and send it on.

Music
Software

Comments (1)

Permalink

eMusic/J 0.22 released

They’re coming thick and fast now, I’ve just released a new version of eMusic/J.

Here are the changes:

  • Added quotes around $@ in launch script to make it work better with some temp file names. If your browser stores files in a location with a space in the path, eMusic/J probably would have had issues opening them. Now it won’t.
  • Changed default cover art name for windows and mac to ‘folder.jpg’. Works better on Mac and Windows, iTunes should automatically pick the cover art up now. It still saves as ‘cover.jpg’ on Linux because that seems to work well enough there.
  • Cover art filename can be overridden by coverArtFilename option in prefs file. If the above doesn’t suit, you can change it by providing a name in the preferences file (~/.emusicj/emusicj.prop)
  • Current download list saves when files are added, this means that the computer crashing won’t lose the current progress. Previously, the current download state was only saved when the program closed. However, if the computer crashed, the in-progress stuff was lost. Now, whenever you add files to download the list is saved, so the worst that’ll happen is that it’ll retry them.
  • Added ” and & to the stripped out characters, they may be causing issues on some file systems. I’ve had reports of files repeatedly refusing to save. It may be caused by these characters, so they’re turned to ‘_’. Hopefully that deals with it.

Go here to get yours!

Java
eMusic/J

Comments (0)

Permalink

eMusic/J 0.21 released

After a hiatus of about a year, I finally made a new release of eMusic/J. This was mostly caused by the change in the file format that eMusic provides for downloading albums. This version is (internally) quite different to the old one, as it is set up to make it easy to produce customised versions, so that one set of source code can produce both the downloader for Naxos’ Classicsonline service, and the regular eMusic/J.

The most important change in this is that it now supports both .emx files, as well as .emp files. It also now requires Java 1.5 (this is less of an issue now that Java is going properly open source), and is available for five platforms: Linux i686, Linux x86_64, Linux PPC, Windows (32-bit) and Mac OSX (Intel and PPC, but in one package). There were also numerous bugs fixed, mostly thanks to Naxos’s QA people, but nothing earth-shattering.

I also had the lead developer behind eMusic’s new download manager get in touch with me, and he provided me with some information that made this easier than it would have been otherwise, which was good.

Anyway, the new version can be found at the usual location.

Java
eMusic/J

Comments (0)

Permalink

eMusic/J for Windows, OSX

Just recently, eMusic updated their download manager to one based on XULRunner, to the outcries of many people on the forums. So I took the work I did for Naxos a while back, and built Windows and Mac OSX versions of my formerly-Linux-only eMusic/J download manager. I’ve had feedback on the Windows version saying that it’s working great for people, which is good. I don’t have a Windows or Mac machine to test either of them on, so I wasn’t terribly confident.

Anyway, they can be found here:

  • Windows version
  • Mac version

(Update: try the eMusic/J homepage for the latest version on all platforms.)

Java
Music
eMusic/J

Comments (0)

Permalink