Our Team are itching to get on with making some music. This chapter will take you through preparing drum tracks; MIDI sequencing with Rosegarden and some additional information about JACK Control.
This chapter is projected to include: Audacity, editing a radio show, podcast or live stereo stream. LADSPA effects. A beginners guide to Ardour, tracking a relatively simple project. Software synthesis, with amsynth and a MIDI input. Introducing audio mastering with Jamin, and burning audio to CD.
by Kevin Donnelly
Install LinuxSampler (package linuxsampler) and the frontend Qsampler (package qsampler). Download and unrar (package rar - rar -e rarball.rar) Mats Helgesson's Maestro Concert Grand piano sample from the LinuxSampler site - http://www.linuxsampler.org. It's a 337Mb download, and unrars to 939Mb! Start JACK, and then Qsampler, which will also start LinuxSampler itself.
Go to View -> Instruments and click the New Instrument icon. Browse to the location of the Maestro sample and load it (it will go into Program 1). Close the Instrument dialogue by clicking the x in the corner.
Go to View -> Devices. Click on Audio Devices in the left-hand panel, choose JACK as the driver from the drop-down in the right-hand panel, and then click Create. A new entry, Audio JACK device 0, should appear under Audio Devices. The MIDI Devices entry can be left alone, since it shows only ALSA as the driver.
In QJackCtl, go to the Connections window. In the Audio tab, connect the LinuxSampler entry to alsa_pcm. In the MIDI tab, connect Rosegarden to LinuxSampler. Connect your input keyboard to both Rosegarden and LinuxSampler.
In Rosegarden, select the track to be recorded onto. In the Playback parameters drop-down of the Track Parameters section of the left-hand pane, select the proper entry for LinuxSampler from the Device drop-down. It may be labelled as something like "out 4 - MIDI output system device", but once you have the right one, it will show up as something like "132:0 LinuxSampler: Port 0" in the Instrument Parameters section. Press the red Record button, and play something on the keyboard.
This chapter is intended to form the basis of a more in-depth look at the JACK server
All internal Audio and MIDI connections and routing are controlled by the JACK Audio Connection Kit Control Panel (QjackCtl). These are flexible connections that can be made between all Audio/MIDI software programs, which are known as JACK clients.
The JACK GUI interface can be launched from Sound & Video > JACK Control. The connections can be viewed by pressing the Connect button.
All being well you'll see the word Started come up in the window with 0 (0) below it. The Connections panel should show alsa_pcm in both the input and output windows. If so, you're ready to make some music. This panel shows all Audio or MIDI signal sources in the left pane (Readable Clients / Output Ports) and all possible Audio or MIDI signal destinations in the right pane (Writable Clients / Input Ports).
Actual connections are established between source (Output Ports) and destination (Input Ports) by selecting one item in either side and pressing the Connect button at the bottom-left of the Connections window.
It is also possible to establish a connection by dragging an item and dropping it on to the other side (Note: it doesn't matter which side you start dragging from).
If it hass not all gone so smoothly, click on Messages, if you see anything much more complicated than:
20:19:41.579 Client activated.
20:19:41.583 Audio connection change.
20:19:41.617 Audio connection graph change.
then you're going to need to do some work to get the best out of this. If you only want to use one application at a time, you may not need to worry about JACK too much right now. However, if you want the full power of a Linux Audio system then it's worth taking the time to figure this out. The Status button also provides some slightly less verbose information.
To disconnect a currently established connection you proceed in similar manner: select each item on either side and press the Disconnect button. Actual and established connections are shown as coloured lines in between the two panes of the Connections window. Each color indicates a single and distinct source module (client) that is currently connected. It is possible to route all Audio and MIDI signals wherever you want this way.
All connections made in the JACK Control interface persist as long as the JACK session lasts. To maintain a custom and persistent connection layout you'll have to edit and activate a patchbay definition profile. Patchbay definition profiles are connection models that are edited and created on the JACK Patchbay window, which is accessed via the Patchbay button on the main JACK control panel.
The JACK Patchbay window is very similar to the Connections one. However, it is here where you prepare and set your intentional persistent connections,
not actual connections. When activated, this patchbay definition profile will keep all declared connections automatically, as long as the JACK Control Panel is kept active.
Following the JACK Patchbay model, you declare connections between sockets (clients). When two sockets are said to be connected, it is implied that each one of its plugs (ports) is declared to be connected in turn, one by one, on a one-to-one basis.
Take special note of the plug/port order in the socket plug list, as each plug and socket are connected in the order they are listed.
The qjackctl settings panel is accessed from the Setup... button.
The Server Path should be set to jackd and the Driver to alsa. For Parameters you probably want to check Realtime for most work and Softmode to start with. Softmode means that JACK doesn't quit if you get odd xruns, obviously, you won't want this if you're recording. If you know your machine only works at 16bit resolution check Force 16bit. You'll probably want to leave most settings where they are.
If you're operating in realtime, your Priority should usually be 0, but some soundcards differ. Frames/Period is worth setting at the maximum to start and then working your way down. This setting affects your latency most directly, setting it too low will result in xruns. Sample Rate probably wants to be 44100 (CD quality) but some soundcards prefer 48000 (DAT quality). Periods/Buffer almost certainly wants to be 2, but again, your soundcard may vary. Interface probably should be hw:0 or whatever you specified in your ~/.asoundrc if you use one (it is not required). Audio try Playback only if you're having trouble, mostly you'll want full Duplex. Dither - Shaped is best but CPU hungry, Triangular gives a good compromise, you don't _need_ dithering, so None will do for now. Timeout and Start Delay might want to be increased in certain situations.
OK your new settings Stop if JACK is still running and Start again. You may need to play with the settings a bit to get satisfactory results.
During recording sessions, the Messages panel in Qjackctl may report xruns. Xruns are basically an indications that while Jack is running something gets in the way of it running correctly and it becomes unable to cope with the flow of data causing dropouts in the sound.
If some other card has a higher priority then when it generates an interrupt, if it's slow responding, then possibly Jack and the sound card cannot get their job done.
# cat /proc/interrupts
and
# lspci -v
will give you some valuable information here. Generally speaking, you want your soundcard to be in the highest priority slot (9 or 10) and not sharing with anything. Solutions mostly involve physically moving the soundcard up to a higher slot and/or disabling unused hardware in the BIOS.
You can test your hard-disk performance with:
# hdparm -tT /dev/hda
(or whatever drive you use for audio) A/DeMuDi installs with optimal settings for most drives. You shouldn't need to edit /etc/hdparm.conf unless you know you do. You can cause irreversible data corruption messing with these settings. Read:
# man hdparm
before you attempt anything.
For more information:
$ zcat /usr/share/doc/jackd/FAQ.gz
Make sure you have:
tmpfs /dev/shm tmpfs defaults 0 0
in your /etc/fstab - it makes a big difference!
JACK
http://jackaudio.org/
http://jackit.sourceforge.net/docs/faq.php
http://lau.linuxaudio.org/jack/
Linux and Latency
http://www.sabi.co.uk/Notes/linuxSoundLatency.html
by Ben Powers
Ardour uses the JACK Audio Connection Kit to route audio internally between tracks and busses, and externally to and from other software and hardware devices. Refer to the JACK Quickstart Guide if you don't have JACK set up already.
Make sure JACK is running at the sample rate you require for your project, and then launch Ardour from the Sound & Video menu. The session control window will appear and present you with a number of options. For now, just choose a name for your session and a directory to store it in. Your session will be saved as a collection of files and directories, inside the directory you just selected from the drop-down menu.

It's best practice to keep your audio projects on a separate hard disc from your system disc. This is because the root filesystem is often accessed by the system, and when dealing with the large volumes of data you can expect to use in an Ardour session, throughput can suffer. Having said that, a single hard disc works fine for small to medium sized Ardour projects, as long as your system is fast enough.
Welcome to Ardour's main window. Looks good, doesn't it? Even if you have little to no experience with recording, you'll notice some familiar features right off the bat. Along the top edge of the window is the menu bar.
The first item in the menu bar is the Session menu, which is analogous to the file menu in most other programs. Some notable differences in the session menu are snapshot, Add Track/Bus and Add Existing Audio. Snapshot will save a backup of your session; add track/bus and add existing audio are self-explanatory.
The Transport menu contains a variety of controls for the system's transport. You can move the playhead, enable recording, start and stop playback. It would be well worth your effort to learn some of the keyboard shortcuts in this menu. For example, Shift+R enables recording, and ctrl+space stops and forgets the last capture.
The Edit menu contains typical editing operations, as well as controls to position the edit cursor (more on that later) and work with regions. Take a look at the keymouse operations, they can save you time when using Ardour.
The View menu has items that control the layout and positioning of elements in Ardour's editor window. At the bottom of the menu you'll notice the "Show editor mixer" option. Click on that option now and notice the editor mixer strip on the left side of the window. This is a one-strip embedded mixer window that stays attached to the editor window and shows only the mixer strip for the currently selected track. We'll discuss the details of mixer strips more in the next section.
The JACK menu is next, and it allows you to disconnect or reconnect from the JACK server. This can be useful if you need to alter your JACK server settings, or if the JACK server crashes. There's another option in this menu called latency, which is the same thing as buffer size in Jack Control's setup window.
The Windows menu contains links to all of Ardour's windows. You can also maximize editor space from here, or by pressing F11. This has the effect of hiding the controls and lists, allowing you to focus on the canvas. The Options Editor is where you should go to set the outputs for the click and audition tracks, among many other things. The Track/Bus Inspector lets you examine all the ins and outs (not to mention redirects) of a track or bus in one window. You may like to enable the big clock as well, to get a clearer view of the session's timing.
The Options menu contains various options which go beyond the scope of this tutorial. Consult the Ardour manual for more information on each one.
Lastly, the help menu provides a link to the about box. When the Ardour manual is complete, it may be referenced here as well.
To the right of the menus are various numerical indicators showing (from left to right) your sample rate, latency, playback and capture buffer sizes, processor load, amount of audio recorded for this session and time of day.
Directly below the menus are the main transport controls, including the fast forward and rewind buttons; the jog/shuttle controls; the play loop, play range/selection and play from playhead buttons; the stop button and the record enable button (the big red button). Play around with these if you aren't sure what any of them do.

Next to the transport controls are the main clocks. Clocks in Ardour can display time in four formats, which can be accessed by right-clicking on the clock face and selecting a mode. As you become more experienced with audio, you will learn the advantages and disadvantages of each format. For now, leave them on the defaults. We'll go over what some of those do later on. You can float the main toolbar into its own window by clicking on the small chevron in the top right corner of the window.

New in Ardour 2.0 are the edit mode selector, the cursor selection buttons and other controls below the transport controls. We'll go over some of these in a later section. To the right of the cursor selection buttons is the edit clock, which shows you the position of the edit cursor.

Below the controls are the rulers. These thin horizontal bars display the timelines which help you see when exactly a region or sound starts or stops. Also displayed with the rulers are the meter and tempo markers, the location markers, the range markers and the loop/punch ranges.
The tempo and meter markers help you define the speed and structure of the session's rhythms. The location markers are how you generate index marks for a CD, as well as place markers at important moments in your session. The range markers allow you to bounce or export any section of the session to an audio file. The loop/punch ranges are last; they allow you to either loop a certain section of the session or define punch ranges.
The largest and most important section of the editor window is the canvas. This is where all your recorded audio will go, and where you will spend most of your time moving, shaping and editing regions. The canvas, as you can see, is divided in columns by bar, beat, etc. It is also, as you will soon see, divided in rows by tracks.
Tracks are where your audio goes. Each track has one or more inputs which receive audio signals and one or more outputs which transmit audio signals. Before you can record or playback any sounds with Ardour, you'll need to add at least one new track.
Tracks have controls, which appear in the track list to the left of the canvas. More information about tracks and track controls is presented in the chapter on tracks later.
Regions are how audio is arranged in your tracks. Each region corresponds to a single audio file, but one audio file may have many regions associated with it.

Regions are what you will do your editing and arranging with, so it pays to get to know them. See the chapter on editing later for more information
The notebook is the name for the collection of lists on the right side of the editor window. The notebook automatically "takes notes" on everything that you've done so far. Every region, track or bus, snapshot, group or chunk that you've created or used in a track will be represented in the notebook, even if it is not displayed in the mixer or canvas. The notebook is comprised of five tabs.

Region List
The region list shows all the regions associated with the session. By right-clicking a region in the list, you can hide, audition or remove a region. Removing a region does not destroy the recorded audio on your disk, though. You can also import external audio through the region list's context menu. More on importing is in the chapter on importing audio.
Tracks/Busses List
The tracks/busses list displays a list of all tracks and busses in your session. You can show or hide tracks or busses by clicking the check-boxes to the right of their names. You can also rearrange tracks in the canvas by dragging the track names in the track/bus list.
Snapshots List
If you make any snapshots of your session, they will appear in this list. Clicking on a snapshot will load it immediately. You can rename or delete snapshots as well, by right-clicking.
Edit Groups List
In the edit group list, you can see all the edit groups you've created. Edit groups work like selections in that you can use them to perform operations on multiple tracks at once. Edit groups are going to be phased out in upcoming versions of Ardour, to be replaced with something called "named selections".
Chunks List
Chunks are sections of a playlist that you define. For instance, you may create one chunk for the verse and another for the chorus. This allows you to edit your session on a grander scale with greater ease. Chunks contain regions and silence, and can optionally span multiple tracks. Chunks don't have a visual representation, they only appear in the chunks list.
Now it's time to get better acquainted with the mixer strip that we enabled earlier on by examining each of its components. If you have disabled the editor mixer, re-enable it now by pressing Shift-E.

Mixer Strips
Ardour's mixer has a very efficient and well-built design. It's interface graphically represents the signal path of each track. Imagine the audio signal flowing downward from the input to the output, through the various widgets present in the mixer strip. Each track and bus has its own mixer strip.
Mixer strips appear by default in the order in which you create them. You can rearrange mixer strips by dragging their titles in the mixer window's track list, to the left of the mixer strips.
At the very top of each mixer strip are two buttons that hide and minimize the mixer strip, respectively. In between these two buttons is an area which clearly shows the track's colour. The button directly underneath shows the name of the track, and lets you rename, switch polarity, or assign a MIDI controller ID number.
Pre-fader Sends
Audio signals flow downwards from the input button to the pre-fader sends list. This is where sends, inserts and plugins are added (these will be discussed later). Directly below the pre-fader sends are the mute and solo buttons. Next, the signal goes through the fader.
The Fader
The fader is the primary level control for the selected track. You can adjust the fader bar with your mouse, or input a specific numerical amount in the small box directly above the fader. To the right of the fader is the meter, which will show you when your levels are peaking. The number above the meter tells you the maximum value that the track's level has reached. You can reset this counter by clicking on it. It's a good idea to keep levels below zero to prevent clipping and distortion. Below the fader, the small "M" button changes the automation mode on the selected track (more on that later).
Going down the mixer strip, the group and metering mode buttons are next. With the group button, you can assign tracks to groups to simplify editing operations on multiple tracks. The metering mode button toggles between post, pre and input modes. In post mode, the meter will display the level of the track's output, after being processed by the pre-fader sends, fader and post-fader sends. In pre mode, the meter will display the level of the track after the pre-fader sends, but before the fader. In input mode, the meter will show the level of the track's input, prior to pre-fader sends.
Post-fader Sends
After the fader comes the post-fader sends list. This one works just the same as the pre-fader sends list, only it affects the signal after it has passed through the fader. We'll get into specifics about how to use the pre- and post-fader sends lists later.
Panning
These panning controls are fairly simple to use. In a stereo track, the top controller pans the left channel, and the bottom controller pans the right channel. Mono tracks have just one controller, at the top. You can adjust the panning by dragging the green bar through the panner. The small triangular wedges at the top of each panner are bookmarks for left, right and centre panning; click on them to send the channel's panning to that location.
The link panning control button which looks like a double arrow (⇒) causes both the left and right channels to change simultaneously. Activate it and drag one of the panners back and forth to observe this effect. Now try changing the panning link direction with the arrow-shaped button to the right of the link panning control button.
The small "M" button operates in the same way as the one for the fader in controlling automation modes. We'll discuss automation more later.
Our signal's voyage through the mixer strip is soon to end. The output button controls the track's output and operates in a similar manner to the input button. Below the output button is the comments button, which you can click to leave helpful reminders on your track's comment sheet.
Signal Path Summary
Ardour's signal path is summarized in the figure below from the Ardour manual, designed by Sampo Savolainen.
Now that we are a bit more acquainted with the mixer, it's time to create a track.
You have your recording in Ardour. Mixed to perfection, tracks lined up in the correct order. Now you want to export you stuff to a Red-book CD for mastering, or if you did the mastering yourself, for duplication.
Here are the steps to follow...
1. Mark your tracks.
In the editor viewer, there is a bar, marked "CD Markers" Click and drag to mark your tracks, one by one, making sure they don't overlap...

2. Edit track details
Under the "Windows" menu, click "Locations". The following should appear:

Edit your track information for the CD-text functionality
3. Export your stuff.
In the "Session" menu, select "Export" and then "Export session to audiofile"

As in the image above, make sure you have dithering activated. Also, select the source of your export. It would normally be your "Master" channel, as in the image. Hit export, and wait.
4. Open GCDMaster, and click "Open"

In the dialogue that opens, browse to your Ardour project folder. in that folder should be an "export" folder, and in there should be the .wav export plus your .cue or.toc file created with the export. Click on the .cue or .toc file and click "Open".
Your project should load into GCDMaster, and the track markers should be visible. You can check your Project data...

5. Burn.

Click the "Record" button, select your device, select "Burn" in the radio button interface, and hit the big "Start" button. Wait. Serve hot...
Our fictional flightless friends, Pengwyn Parc are in the studio preparing for their forthcoming single release.
"We should work on the drum parts first," says Tabitha,
"We've got to get the drum track right - it's the basic groove of the song."
Baz agrees, for once "Yeah, it's common practice in multitracking situations to record the drums first, otherwise it all gets out of time really quickly."
"I've done stuff where I recorded the guitar first, then keyboards and overdubbed some percussion as an afterthought." muses Kenny.
"I bet it was a mess." sniggers Baz
"You could just as well start with a rhythm and build it all up from that." Tabitha re-iterates.
Ashlee doesn't know, "It is not a hard and fast rule, it depends on the mood of the piece you are trying to create, surely?"
The crew have to agree to disagree on that one and get on with recording, this time they'll start with the drum track. They have decided to work on one of Kenny's songs that has been going well in rehearsal, while Tabitha and Baz search for a suitable application to use for writing the drum part, Kenny strums through the song on his guitar, noting down in his creative diary how many bars each verse and chorus take, not forgetting the intro and outro and any bridge sections.
Baz and Tabi decide on Hydrogen. Its main stated goal is to provide professional yet simple and intuitive pattern-based drum programming. Sounds good enough.
Tabitha immediately gets to work in the Pattern Editor sub-window. Down the left-hand side is the list of the various components of the drum kit with an empty four-beat timeline in the main part of the window. Along the top are various boxes, which allow us to alter different parameters of the riff: The first box allows us to cycle through the patterns listed in the Song Editor and the contents of the second box change accordingly. The size box allows us to choose the pattern length, slightly confusingly in eighth notes, so the default setting of 8 gives us a 4/4 bar. Setting it to 7 would give a 7/8 bar, setting to 10 gives a 5/4 bar, go figure. Tabitha sets it to 16, which creates a double 4/4 bar pattern effectively. Resolution affects the quantisation, i.e. the number of playable beats in the bar expressed as note-length values. Tabitha chooses 16 to allow 16th notes to be played. It is also possible to select triplet quantisation, so 16T actually divides a 4 beat bar into 24. This is probably obvious to anyone who has learned to read music, but Tabitha, who plays by ear, thinks it's a bit daft.
The last panel is the recording panel. There are two ways to record into Hydrogen, real-time or by hand; for real-time work you probably want the three buttons engaged - Hear Notes, Record and Quantise - if you don't have a MIDI keyboard attached to your set-up, you can use the keys of your ASCII keyboard, if you are entering notes using the mouse then you probably don't want these functions.
Tabitha starts by laying down a basic beat; eighth notes on the closed hi-hats, bass drum on beats 1, 3, 5 and 7 and snare on 2, 4, 6 and 8. This gives a rugged, but rather basic beat, which allows Tabi a chance to check the tempo. This she does by getting Kenny to play along on his guitar while she taps the backslash key repeatedly in time with the song until they agree on the timing they want. Hydrogen then sets the BPM of the track accordingly and displays that information in the BPM indicator on the bottom bar of the main window along with the Transport controls. The BPM can be altered using the mouse wheel for incremental fine-tuning.
Next, she adjusts the pattern to fit Kenny's playing better. To start with, she thins out the hi-hats to four in a bar, adds a few grace notes and open hi-hats, and then changes the timing of one of the bass drum beats to give the second bar a bit of a 'push'. Being a drummer, Tabi knows that not all beats in the bar get the same weight, so she edits the velocities displayed along the bottom of the Pattern Editor sub-window, by clicking and dragging them to more appropriate values. Right-clicking on any of the instruments in the Pattern editor sub-window presents a sub-menu of helpful options to Mute, Lock, Solo, Fill and Clear notes relative to the grid resolution set and create pseudo-random velocities for that particular instrument. The Lock function locks the instrument belonging to a drumkit on that pattern even if you change drumkit, which allows you to mix and match drumkits. Tabitha tries playing around with random velocities.
When she's got a pattern she's happy with, Tabitha saves the song in Hydrogen's native .h2song format. So far we have a good basic beat, but this song has some odd timing changes and needs fills, so Tabi moves over to the Song Editor sub-window. The song editor lists the patterns in the left margin with the main window being a matrix-grid timeline. This allows you to arrange the patterns in sequence. At the top of the left margin is a row of buttons that control: completely deleting all patterns, creating new patterns, reordering the pattern list and switching between selection (to allow copying, pasting and moving) and draw mode. Right-clicking on the pattern names in the left margin gives you the further choices of editing the pattern in the Pattern Editor sub-window, copying and deleting the pattern, filling or clearing bars of the song sequence with that particular pattern and editing the pattern's name via the Properties option. Tabitha changes 'Pattern 1' to 'Main Riff' and then copies it to 'Main Fill 1' and 'Main Fill 2', remembering to select the pattern she wants to edit before continuing.
In order to hear how all the patterns work together it is necessary to switch to song mode using the mode selector on the transport bar. By switching backwards and forwards, copying and altering sections, Tabitha soon builds up enough parts for a complete verse and chorus. She realises that she's forgotten to make an intro bar, so she copies the bridge pattern, renaming it to 'Intro' and edits it, removing everything but the final fill. She now needs to move the pattern sequence along by one bar. By going into selection mode it is possible to click and drag to select an area of patterns and then click and drag them to the desired position.
Tabitha is bored with the default drum sound, she needs something with a more 60's feel. The Drumkit Manager can be accessed from the View > Show drumkit manager menu entry and provides a range of alternative drumkits, which can be loaded while the song is playing to allow you to easily preview the sounds. The drumkits vary quite widely in sound and can strongly affect the final feel of the track.


Next Tabi wants to add some effects to give the track some atmosphere. Effects are controlled via the Mixer sub-window. The main part of this window is laid out rather similarly to an analog mixer, each component of the drumkit gets its own strip with controls to preview, mute, solo and pan the sound, four rotary pots to control FX volume and a vertical fader for the overall volume.
The interesting controls are on the right-hand panel. Next to the Master Fader that controls the overall volume, are the Humanize functions and two buttons - the top one toggles the peak level meters on and off and the lower brings up the FX panel. Here we can have some fun. We have four effects channels available to us, Tabitha clicks on the Edit button of the first, which brings up a LADSPA properties window. She clicks on the Select FX button, which brings up a further selection window with all the possible LADSPA effects listed in the left-hand window. She selects TAP Reverberator and then turns it up using the first FX pot on the mixer strip of the snare and cymbals, leaving the bass drum dry. Less is more, exponentially so with reverb.
For an added touch of realism, Tabitha plays around with the Humanize function. It is possible to randomise the velocity and timing of each note played and also specify a swing factor - the amount of bounce or 'dottedness' applied to the rhythm, this can be essential for some swing jazz, reggae and hip-hop feels. Careful use of these controls can really bring a drum track alive and make it sound almost organic.
For more fine-grained control of the sounds, Hydrogen provides the facility to edit the individual components of the kit. View > Show instrument editor. Using this interface it is possible to create your own custom drumkits with up to 16 layered samples and apply an ADSR envelope, filter and pitch effects for each instrument.
In order for this drumtrack to be useful to other applications it is necessary to export it as a stereo audio file, in fact the only choice here is .wav. Hydrogen will export the file at whatever sample rate it is currently running at. Go to the Audio System tab of the File > Preferences dialog if you want to change settings. This same dialog allows you to control MIDI settings and the visual appearance of Hydrogen. File > Show song properties brings up a dialog that allows you to name the song and add comments. Once all the details are set, File > Export song brings up a file browser dialog where you can give it a name and then click on the Export button and wait for the progress bar to reach 100%. It is also possible to export the track as a MIDI file or hook Hydrogen up to an external MIDI source directly, so it can be run synchronously with other sequencers or multitrack recorders.
Hydrogen
http://www.hydrogen-music.org/
Jackbeat
http://www.samalyse.com/jackbeat/
Drum Patterns
http://www.linux-france.org/prj/drumpatterns/index-en.html
Smack
http://smack.berlios.de/
by Kevin Donnelly
JACK Timemachine, by Steve Harris, can capture whatever is going to the JACK server - it therefore acts as an instant sound-recorder.
The key point about Timemachine is that it does not start recording once you hit the button. It has already recorded the previous ten seconds in a pre-recording buffer, and will include those seconds in the recording as well. This means it is good for catching those fleeting moments of inspiration that you can't recreate - just click the button and they get recorded to a file retrospectively.
By default, Timemachine records in w64 format, supported only by libsndfile at present. Sweep and Audacity support libsndfile, so they can open these files for editing and convert them, but Rezound uses libaudiofile, so it doesn't. W64 format is used because it better handles long or multichannel files.
Timemachine can also record in wav format, but note that this is WAVE_FORMAT_IEEE_FLOAT, and not the more common WAVE_FORMAT_PCM. Most players (except sndfile-play) will therefore refuse to play this format until
you convert it.
If you want something other than the default settings, start Timemachine with
some arguments:
$ timemachine -f wav -p /home/myuser/music_takes -t 30
To retain these settings, use something like:
alias timemachine='timemachine -f wav -p /home/myuser/music_takes -t 30'
in your ~/.bashrc file. The above line uses -f to specify a .wav file (instead of the default w64), -p to specify a location for the recording (instead of the default home directory), and -t to specify a pre-recording buffer of 30s (instead of the default 10s).

Note that JACK must be running before you start Timemachine. Once started, you need to go to the JACK connections (in JACK Control, for intance), and manually connect the output of the desired sound-playing app to the Timemachine input. So if you have ZynAddSubFX as the client, connect it to Timemachine. Then start playing the sound-creating app, and when you want to capture some sound, click on the big green Timemachine button (it will turn red). You should see the meter levels below the button rising and falling. When complete, click the red button to stop the recording.

The recording will be saved to your home directory (change this with the -p switch - see above), under a filename beginning tm-, followed by a timestamp in ISO-8601 format (note that the timestamp reflects the pre-recording buffer, and not the time you clicked the record button).
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.
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.
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.
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 maual 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.
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 tm-<timestamp>.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.
Rosegarden
http://www.rosegardenmusic.com/
http://rosegarden.sourceforge.net/tutorial/
MusE
http://www.muse-sequencer.org/
http://www.muse-sequencer.org/wiki/index.php/Manual
amSynth
http://amsynthe.sourceforge.net/amSynth/
Hammersound (Soundfonts)
http://www.hammersound.net/cgi-bin/soundlink.pl