Saturday, 3 November 2007

Linux distros, Rosegarden, MIDI files and other jollity.

This is a brief chronicle of my battles with my computer since my last update.

I for some reason I had made a move back to Windows. However, my patience with it was as short lived as most of my houseplants. I'd also recently been using Mandriva Linux at work, which is very yummy indeed. I'd always previously used Ubuntu with Gnome at home, but the wonder of Kile for editing LaTeX tempted me towards KDE. Thus, I spent many evenings installing new distros on my geriatric laptop. First up was Mandriva, but sadly even trying to boot from a live-cd, it hangs before even starting up. I switched again, and tried Fedora. This installed okay eventually, after a few arguments with the disk partitioning. The automatic partitioner failed to wipe the windows partition from the disk, requiring some serious expletives. After a few days, I tired of Fedora as it ran so very slowly on my ancient computer, and was full of all kinds of dowithoutables. Ever faithful to my first linux love, I tried Kubuntu Edgy. It seems to work fine, but is still a little slow. Not the last word by any means- I think I'm going to have to try a tiny version of Linux, but now is not the moment. So, I cope with Kubuntu for the moment.

Now, for various reasons I require a music notation editor. After a little research, I settle for a combination of Rosegarden for the editor, with Lilypond to do my typesetting. I don't recall how I installed them.

Rosegarden seems to work all fine and dandy except one little hitch:

System timer resolution is too low! cries as it opens. Apparently my kernel timer resolution is puny and not good enough to accurately time MIDI files on playback in real time. I could switch to a low-latency kernel, but I can't be bothered. I want a quick fix and instant results. I'm happy for my sound to get a bit squished and crap, any sound will do for the moment. However, apparently I should be hearing my crappy sound even with Rosegarden's little huff. But I have silence. I conclude my problems lie deeper than this. I can't listen to my MIDI file in anyway, Amarok won't recognise it either.

I find this lovely how-to which tells me to install TiMidiy and "freepats" samples. I reproduce some of it's wisdom here for my own benefit:

timidity music.mid

typed in the commandline now lets me here the funky music! Now, I load some modules

sudo modprobe snd-seq-device
sudo modprobe snd-seq-midi
sudo modprobe snd-seq-oss
sudo modprobe snd-seq-midi-event
sudo modprobe snd-seq

and run:

timidity -iA -B2,8 -Os1l -s 44100

on the command line. This loads TiMidity as a midi server and opens 2 midi ports, 128:0 and 128:1 Now Rosegarden makes sounds! Even with it's timing huff. To get TiMidity to do it's stuff on startup, I must edit /etc/default/timidity and uncomment:


I also add


to /etc/modules.

I now remember a neat way to get sheet music- some music editors can import MIDI files and create scores from them. Rosegarden can too, hoorah. So, I boldly import my MIDI file and lo, I can see the music and hear it too! Amarok still doesn't like my MIDI file, but I shall save that battle for another day.

No comments: