Midi on Linux

So one challenge of using Linux is trying to play Midi files. For those from the windows world, this is not an issue. There are a variety of players which play midi files right out of the box, such as Winamp or Quicktime. These can typically either use built-in hardware for playing midis (either external midi devices or a sound card with built-in midi players), or they can use internal patch sets to play the files synthetically.

On Linux, the first of these cases just works out of the box. If you have sound-card-hardware, it generally just works after you enable the sequencing kernel modules. But if you are unfortunate enough to not have such hardware (and let’s face it, the vast majority of computers don’t come with midi hardware since many users don’t listen to them), it won’t work out of the box.

The good news is that there are a few pieces of software out there which can install fake “midi hardware” so that all software can use it out of the box. One of these is TiMidity++, which I had used before without issue. But when I installed it this time around, it had very mixed results. I would play files, and sometimes hear nothing, sometimes hear stuff, and sometimes I would hear only parts of what I expected to hear. Looking into this, I eventually tracked it down to the free patch set which is available as a Linux package. As it turns out, the free patch set only contains a subset of the midi voices, and so as a result, there is silence when playing voices that are missing.

Continue reading “Midi on Linux”

Migrating to a new hard drive

My laptop hard drive started showing symptoms of potential failure, so I made the decision to migrate to a new hard drive. However, since much of the windows software comes pre-installed and without a good installation disk, I needed to do so without having to re-install software.

Additionally, my laptop does not have an internal CD/DVD drive, and won’t boot off an external one unless you get the (extra-priced) one blessed by the manufacturer. Furthermore, it’s a laptop, and does not have extra IDE slots to simply plug in the new drive to do a drive copy. And finally, I did not initially have a cable to enable me to plug in a drive as an external USB device. The second time I did this I used that cable, and it did simplify things a bit.

Next I’ll describe a few pre-requisites and assumptions, then give a summary of the solution. Afterwards I’ll go into details on a few of the steps.

Continue reading “Migrating to a new hard drive”

Alternatives to powerpoint

So I have recently re-configured my laptop to dual boot Linux with Windows (before it was just Windows). I’ve found, since making the switch, that the main reason I still use Windows is to use PowerPoint for presentations or posters. I tried using OpenOffice for my presentation, and that’s reasonable as long as I don’t need complex figure animation (in particular custom motion paths). I actually had made one of my recent presentations totally in OpenOffice, switching back almost at the end to be able to use custom path animation. It was a bit of a disappointment, really.

So I’m interested in the existence of other open-source alternatives for presentations. Another limiting factor is that the presentation tool must also run in Windows, since most of the time projectors “just work” with Windows, while I haven’t figured out how to make them work with Linux yet (requires rebooting, for example). I’m aware of KPresenter and LaTeX-Beamer, but the options start getting slim after that. The main problem with the former is that it seems less mature than the open office one, while the latter is great for simple presentations, but not so much for figures or their animation.

So what do you use? What other options are there? Can you get good animations from elsewhere. I’ve heard suggestions that we should use flash for our presentations, but I can’t imagine having to learn it just to do a presentation.

Restoring email from cache

As some of you know, about a month and a half ago my server hard-drive crashed, and I lost all my data on the drive, most of which was un-backed-up.
One of the more important things I lost was my email archive. This included all email in the last two years, since I stopped using gmail. (I was using imap to keep the email synchronized across all my mail clients on different computers). The silver lining of this was that I was able to recover some fraction of my email (mainly from my inbox) by using the cache my email client maintains to make re-reading emails more efficient.

This post should serve as a simple how-to. It’s actually quite simple if you had my setup. So — using Mutt as my mail client, I have a great deal of control over the way its configured. One of the configuration items was to use a message cache:

set message_cachedir = "~/.mutt/imapcache"

This meant that as I read emails, they were downloaded to the computer I was reading them from, and saved in a file under my home directory, in the .mutt/imapcache directory. It was using a separate folder to store email from each remote mail folder. So, to restore them, all I needed to do once I had my new mail server up-and-running was:

  1. concatenate all the emails into a single file (cat * > ~/tempfolder)
  2. open the new “folder” from within mutt (<change-folder> ~/tempfolder)
  3. tag all the messages and save them to the appropriate folder on the remove server

The real trick is that each message is being stored in a standard format. Then, concatenating them together creates a mailbox format called mbox, making it easy to access them all at once. Then the mutt mail client can use imap to store them back on the remote server.

In my case, I was able to repeat this from each computer I use to read mail — there were about 3 of them. I was able to recover about half of my inbox, and a few other assorted messages which had been read recently. Not as good as having backups, but better than nothing!

Spam: Winning or Losing?

So from a research perspective, I am curious— are we winning or losing the battle against spam? On the one hand, there are reports that upwards of 80% of all email is spam. But only a small fraction of that ever sees our inboxes. Sometimes I feel that the fraction is shrinking, but other times (like now), I feel that everything is just a stop-gap, and that this is really an arms race with a huge amount of wasted resources, both in bandwidth and in person-hours.

I was discussing this with a group of colleagues, and one made the claim that this is a “solved problem” for corporate America. That is to say that when you are working at a big corporation, you don’t get spam email in your inboxes. Is it true? If so, do you know why?

What about personal mail? Does the answer change depending on whether it’s an ISP mail or a webmail? What about for preventing spam from being received by young children? I’m just not convinced we’re anywhere close to a good solution on spam. Of course, there are others who argue that spam is fundamental. I hope not.

Web scrapbook

For some time I’ve used Gallery as my gallery software of choice. (And I still do–you can find the link to my gallery along the page header). But more recently, I’ve started to think that what I’d prefer to have is software which makes it easy to create scrapbooks online. I think the key difference here is the focus on narrative instead of the pictures themselves. Pictures are used to tell the story, not to be the primary point of the content. I’m happy to have a gallery at the same time which is highly integrated with the scrapbook, but I’d like the narrative (with collections of photos related to narrative parts) to allow presentation in a scrapbook format.

If anyone is aware of such software (particularly, but not strictly, free software), please let me know.

New Tech Blog

So I’ve been thinking about this for a while, but I’ve finally decided to do it. I’m separating my “tech” blog from my “personal” blog, which I intend to keep on livejournal for the forseeable future. But instead, on this page, I will just include those more tech-based articles.