MIDI Sequencing with Rosegarden
Having successfully mastered drum programming, the next task facing our make-believe multimedia moguls is to create some believable synthesiser parts. The ability to sequence MIDI to professional standards is relatively new in the Linux arena, this may come as some surprise to veteran computer bashers who fondly remember knocking up tunes on old Ataris running Neanderthal versions of Cubase. One might ask why it has taken so long for Linux Audio Developers to crack this field, considering that the MIDI protocol is so old, well established and some might say awful, that it should by rights have been deprecated years ago?
The answer may lie in the fact that Linux tries too hard to be all things to all people on all systems. If Operating Systems could be compared to cars, Linux would be a Volvo; sturdy, reliable and built like a tank, a good all-rounder but pretty useless when it comes to speed. In the musical realm, any delay greater than about 5ms will not only be noticeable, but in itself can be enough to render a musical instrument unplayable or a piece of music unlistenable. Most people who have ever tried to make music on a PC will have come across the term 'latency'; it's the time difference between you hitting a note on the keyboard and it coming out of your speakers, it is the last thing in the world you want when making music, next to digital feedback, but it is an inevitable consequence of the original design of PC hardware and the Linux kernel.
Much work has been done to integrate the Advanced Linux Audio System into the 2.6 kernels and introduce measures to defeat latency, thanks to constant pressure and input from Linux Audio Developers. It is finally possible to get smooth real-time performance out of an unmodified Linux kernel, this is largely achieved by prioritising the audio signal at every point in both hardware and software and making all other processes wait their turn. For this reason many musicians like to use a separate, specially set-up machine for making music as this kind of configuration can interfere with networking or graphic performance.
New arrangements in the Rosegarden
When it comes to writing synth sequences there are two major players in the Linux speaking world, MusE and Rosegarden. There are other smaller sequencing applications such as the interestingly simple Seq24, which some pundits swear by for basic sequencing.
MusE is a MIDI/Audio sequencer with recording and editing capabilities written by Werner Schweer. MusE aims to be a complete multitrack virtual studio for Linux. It has among other things, support for MIDI sequencing, Audio sequencing, JACK, LASH and ALSA.
Rosegarden is a professional audio and MIDI sequencer, score editor, and general-purpose music composition and editing environment. It is an easy-to-learn, attractive application that runs on Linux, ideal for composers, musicians, music students and small studio or home recording environments.
Attracted by the promise of substantial new features in Rosegarden 1.4.0, Ashlee decided to give it a trial run. It starts up with a nice new splash screen, much better than the old picture postcard thingy and it doesn't seem to mind whether you're running JACK or not. Which is nice. The initial window presents a slightly bewildering display of icons and choices, this is the window where the arrangement of the piece is set out in segments. Happily, the online tutorial is comprehensive and readable and it didn't take Ashlee long to start making progress.
The first thing she realised is that Rosegarden doesn't make any sound itself but relies on being plugged in to an external synth, software synth or one of its own DSSI synth plugins. Once she had figured out how to assign the tracks to different instruments by right clicking on the track title in the main window, the task of creating music seemed relatively intuitive with a choice of using either the piano-roll style Matrix, traditional Notation, Percussion or Event List editors. Notes can be entered through a variety of means including using the mouse or external MIDI keyboards.
Importing the drum track
The first thing Ashlee wanted to do was to import the drum track we recorded in the previous chapter. It was not immediately apparent how to do this. After some gnashing of teeth, cursing and fishing around in the online documentation she found out that it is necessary to import the audio file into Rosegarden before it can be used; via Segments > Manage Files Associated with Audio Segments. This brings up a dialog window which allows you to import the audio file using the File > Add Audio File function. Back in the main Rosegarden window, right click on the channel you wish to use for audio and Select Audio > Audio #1, drag the Audio File into place on the main window or Action > Insert into Selected Audio Track (assuming you have one selected) and the audio file should show up on the appropriate audio track.
The drum track was recorded at 136BPM so we need to synchronise Rosegarden's sequencer. We can set the tempo using one of the methods in the Composition > Tempo and Time Signature menu. It took quite a lot of fiddling around to get the tempo to fit properly, Ashlee used the Set Tempo to Audio Duration function to get a rough idea of whether the audio track was actually playing at the correct tempo and then discovered that by selecting the drum track and pressing ALT + the right and left arrow keys it was possible to nudge the beats into alignment with the bars of the track.
Writing our first tune
In order for your soundcard to actually produce some recognisable noise it is necessary to plug a synth in. Ashlee starts up Amsynth, the simplest free standing softsynth, and uses Aconnectgui to check that the MIDI connections are all made properly. It is possible to administer the MIDI connections from inside Rosegarden, using Composition > Studio > Manage MIDI Devices to connect up the devices; in the Play Devices window set the General MIDI Device to
amSynth MIDI IN and it should be possible to play the synth from the Matrix Editor's keyboard. AmSynth can also be played from an on-screen virtual keyboard.
AmSynth's Preset > Randomise function can be useful to provide a starting point for new sounds and then the settings can be fine tuned using the array of knobs and switches provided on the synth. To save your experiments; first change its name in the Preset box and then press the Save Changes button. Ashlee manages to come up with a suitably cheesy synth sound within a few minutes of experimentation.
Ashlee right clicks on the actual track in the main window and selects Open in Matrix Editor from the context menu. The Matrix editor displays a grid with a keyboard down one side. The instrument settings for this track are on the right-hand panel. Set Grid and Quantise to 1/16 or whatever resolution you want, it may be best to keep them the same as each other for most things.
The quickest way to start composing is probably entering notes by hand using the pencil tool. The eraser, move and resize tools also do what it says on the tin. The Adjust and Tools menu have plenty of editing functions to offer and it is entirely possible to build up entire compositions this way, it is painstaking work, however, so most musicians prefer to use an external MIDI keyboard. To record a track it is necessary to go back to the main window, click on the recording light so that the led is lit on the track you wish to record, and hit the red button on the transport bar. It will almost certainly take several takes to get anything useable. Remember that the beauty of MIDI is that your mistakes are correctable, to a degree.
Ashlee gets down to creating a sequence. She decides she likes the notes she has just put in, but wants the pattern to be played at twice the speed, so using the select tool (the arrow) she selects all the notes and selects Adjust > Double Speed from the menu, then copies the pattern using Edit > Copy and positions the cursor with the left mouse button on the ruler at the point of bar 3 then Edit > Pastes the new notes into place.
The View > Show Velocity Property Ruler allows you to edit the velocities of the notes, adding degrees of light and shade or correcting misplayed notes. The Quantise function is also useful for correcting timings. Once Ashlee is happy with the first part she adds more tracks following the same process or copying and pasting sections over to new instruments. She finds out that you have to be careful whilst pasting to make sure you have selected the right track and have the cursor in the right place by clicking on the track ruler. She also noticed that tracks were prone to mysteriously disappearing whilst being moved. Fortunately Rosegarden keeps a long undo history.
Ashlee decides she wants some other sounds apart from the silly synth noise she created on amSynth. In order to do this, we have to restart Rosegarden with JACK running, which involves starting up JACK control from the desktop menu. For more information see the JACK Quickstart guide or the JACK Audio Connection Kit manual page.
If you need several audio applications to be able to access your soundcard at once then it's worth getting to know the Jack Audio Connection Kit properly. You may need to play with the settings to get the best results, although the defaults often work fine. OK your new settings and restart JACK if it is still running.
Next Ashlee starts up Qsynth, a front end for fluidsynth. It should automatically connect to the JACK server, but in order to get some sound out of Qsynth we still need to feed it a soundfont. These can be downloaded online relatively easily, then we need to make Qsynth aware of it by hitting the Set-up button and choosing the Soundfonts tab, then browsing for the soundfont you just downloaded. Check the Instrument Parameters tab, The MIDI connections are managed in the same way as before via Composition > Studio > Manage MIDI Devices to make sure the instrument settings are all correct. The soundfont provides a wide range of standard sounds that Ashlee can choose from and introduce different instrumental colours to Pengwyn Parc's debut tune.
Creating a take
The final piece can be captured using any recording software that is able to plug into JACK. Ardour would be a great choice if your system will run it alongside Rosegarden and a couple of softsynths. Ashlee decides to opt for Timemachine, a simple instant recorder, which is much easier on the system resources. Timemachine needs to be connected by hand from the Connect panel in JACK control, then just hit the big green button and start recording. Unless given other instructions by creating a configuration file in your home directory, Timemachine will dump the recordings rather unceremoniously in your home directory labelled
.w64 you'll probably want to move and rename the takes you want to keep before it all becomes horribly confusing.
It could take months to master all the possibilities provided by this application but it is still simple enough for Ashlee to immediately get on with writing tunes, while Kenny prepares to start recording guitar and vocals.