Monday, December 5, 2011

Experimenting with Rosegarden and MIDI

Some time ago I managed to get notes for the classic klezmer nigun "Dos Zekele Mit Koyln" - דאָס זעקעלע מיט קוילן (heartful thanks go to Bob Freedman and his great archive). Recently I decided to try to put them into digital MIDI format using some good music editor for Linux. Since the experience was new to me, I decided to describe the steps in case someone will find them useful (all steps were taken on the current Debian testing, so for other distributions you'll need to adjust them accordingly).

First of all, one is faced with the choice which editor to use. There is a number of them available, but since I needed something that could allow me to type in music notation, I picked Rosegarden, which has a nice and rich UI for notes editing. However using it can be rather confusing in the beginning. First of all, installing Rosegarden alone is not sufficient, I soon was learning that it also requires a synthesizer to function. I didn't bother with finding a hardware synthesizer, so I picked one of the commonly available software options - Fluidsynth (which also has a nice GUI front end Qsynth). Software synthesizers however rely on sound fonts. So one needs to install some sound fonts as well (luckily some are available for Fluidsynth).

Installing it all on Debian is actually rather easy:

sudo apt-get install rosegarden qsynth fluidsynth fluid-soundfont-gm

With next step you need to configure Fluidsynth. Run Qsynth (qsynth) and go to Setup > Sound Fonts there. Press Open and put in the path to your Fluidsynth sound fonts. In my case it was:
/usr/share/sounds/sf2/FluidR3_GM.sf2
(GM stands for General MIDI here). Also, choose appropriate MIDI driver in Setup > Midi section. I needed something simple, so I picked alsa_seq there (if you are planning on using jackd, or oss4 - make the choice accordingly).

After that, Qsynth restarts. Now, run Rosegarden, while Qsynth is running. It's the key sequence, if you run Rosegarden without Qsynth running first - you'll get no sound! I didn't really need to configure Rosegarden MIDI devices, since it picked General MIDI device which connected to correct synth port, which was provided by Fluidsynth. But probably in some cases you'll need to configure them to work together, so you can do it from Studio > Manage MIDI devices.

This should be basically enough to start editing music.

You'll see 32 tracks (channels) in Rosegarden UI by default, and for something simple you probably don't need that much. So for my test I deleted all tracks except for the first 2 (solo and bass). Just click on some track (in the column with the list of them on the left) and press Ctrl+D (or Tracks > Delete Track).









Now, switch to Draw mode (F3, or pencil button in the toolbar), and select some region in your tracks. For example a few measures for each track, and you can always stretch them to more measures switching to Select and Edit mode (F2).

 








You can now select both of your tracks in Select mode (just make a rectangle on them holding the left mouse button), and then double click on the selection. It'll open the music notation sheet at last! Edit the music as you need (it has lot's of options), and then you can export it as MIDI. 





Changing the instrument however was a bit confusing, because one part of the UI was hidden by default. In order to enable it press P or do: View > Show Special Parameters. It will open a panel in UI for instruments management. Now choose the desired track (as before) and switch your instruments in "Instruments Parameters" section.

Here is my first result - Koyln edited in Rosegarden :)

Here you can hear Koyln performed by Mishka Zinganoff in 1919:



(You can play MIDI files in VLC by the way, if you enable and configure the MIDI plugin. On Debian I also had to install vlc-plugin-fluidsynth package for that, and to set up sound fonts in VLC configuration).

No comments:

Post a Comment