Playing a USB midi keyboard on Ubuntu Linux

I purchased a USB MIDI keyboard (the Alesis Q25) for use with my musical Tesla coil, but also wanted to use it to learn to play the keyboard/piano when traveling with my laptop.

The MIDI keyboard has no synthesizer of it’s own, so you need a computer that will take the MIDI data stream and play (synthesize) the actual sounds of a piano or other instrument so that you can “hear” what you are playing.

There are many pieces of complicated software on Linux that will allow you to compose music with a MIDI keyboard, but all I wanted was the ability to hit a key on my keyboard and have it make music.

The easiest set of software I found to do this was vmpk (virtual midi piano keyboard) combined with Qsynth (a GUI interface to fluidsynth). I started up qsynth and vmpk at the same time. Then I used the “edit->connections” menu on vmpk to set my MIDI keyboard as the incomming connection, and the “FLUID Synth (Qsynth1)” as the output connection.

To set up qsynth I hit the “setup” button and then in the MIDI tab selected the “alsa_seq” as the MIDI Driver and “qsynth” as the MIDI Client Name ID (ALSA/CoreMidi).
I also enabled the soundfront from the /user/share/sounds/sf2 folder.
I don’t know why I had to use vmpk to make this linkup between the keyboard and Qsynth, but so far I haven’t found an easy way to tell Qsynth to just listen to midi events from the keyboard directly. On the plus side, you can use the virtual keyboard that vmpk displays on the screen to play notes if you don’t actually have a physical USB MIDI keyboard.

Fixing the problem where gparted (parted) won’t see a partition due to a mac partition table

I purchased an external HD that was “mac compatable” but I used it with a linux system and used fdisk to put two partitions on it.

Later on, I wanted to use gparted to easily resize one of the partitions, but it refused to see any partitions at all on the disk.

fdisk could still see them just fine, but reported “Partition type: mac”

It turns out that the problem was that the disk originally came with a mac partition table in addition to (right after) the regular MBR Master Boot Record.

I noticed that the first partition didn’t actually start until 63 sectors into the disk (at the beginning of the 2nd cylinder).

Device Boot Start End Blocks Id System
/dev/sdb1 63 1171893554 585946746 83 Linux

So I used DD to copy the first cylinder to a file:

sudo dd bs=512 count=62 if=/dev/sdb of=firstCyl.bin
62+0 records in
62+0 records out
31744 bytes (32 kB) copied, 0.000715733 s, 44.4 MB/s

Looking at that bin file in an editor, I saw the string “Apple_partition_map” which is a dead givaway of what the problem was.

So, I wrote out all zeros to the first cylinder:

sudo dd bs=512 count=62 if=/dev/zero of=/dev/sdb
62+0 records in
62+0 records out
31744 bytes (32 kB) copied, 0.00165608 s, 19.2 MB/s

And then I copied the first sector (512 bytes) back from the firstCyl.bin file I had made:

summetj@constantine:~$ sudo dd bs=512 count=1 if=firstCyl.bin of=/dev/sdb
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00183878 s, 278 kB/s

And it worked! Now gparted is no longer confused by the apple (mac) partition table that I zeroed out, and sees my partition.

How to Root the HTC Aria on At&T

Rooting the HTC Aria on AT&T is made trivial by the program you can download at http://unrevoked.com/

So far the only good reason I have found to root your HTC Aria is so that you can enable wifi tethering, but that requires a few more steps which you can read about in my next post.

In addition to rooting your phone, the unrevoked application adds a custom recovery image to your phone (Clockworkmod recovery – http://www.clockworkmod.com/ )

This open source recovery system allows you to backup your phone to SD-card (nandroid backup), and load other ROM’s.