Now that you have a general idea how Rosegarden works, now is a good time to think about telling Rosegarden something about the MIDI equipment you wish to use. People who intend to use Rosegarden purely for audio work are free to skip this chapter entirely.
Before we get started, some of you might need some basic background information so that you can dive into this with some understanding of the concepts I am about to explain. If you are new to MIDI, or if anything in this chapter leaves you scratching your head, you might want to read through my MIDI Primer in Appendix A.
Every native Rosegarden composition (.rg) file contains a studio definition in addition to all the nuts and bolts stuff of music. The studio is a definition of every MIDI device Rosegarden can detect during the course of editing the composition. (Everything that was there at the start, plus any new devices that become available during the course of editing; as when starting something like ZynAddSubFX in the middle of working on a composition, for example.) It comprises information about the device itself, and about how data is routed into or out of it.
Rosegarden has an integrated MIDI router to manage the flow of raw MIDI events into and out of ports provided by the underlying ALSA infrastructure. You can think of this as something like the sort of router often used to share a broadband internet connection. Unlike ethernet, however, MIDI is not bidirectional over the same cable. As a consequence of this, all connections in Rosegarden are unidrectional; even if both connections belong to the same physical piece of hardware. Connections will be displayed as one of "read," "write," or "duplex." In this diagram, connections are represented by black arrows that point in the direction data will flow through them. Rosegarden's MIDI router allows you to rearrange these connections as you require, to change what is connected where.
A device is a sort of virtual model of an individual piece of MIDI equipment. Equipment, in this sense, can be full-fledged external MIDI hardware, internal hardware like the Sound Blaster Live!, or virtual hardware like QSynth or VKeybd. Each device encapsulates information about the capabilities of a piece of equipment, and allows you to make use of those capabilities from within Rosegarden. In effect, the better the job you do of describing a particular device in Rosegarden, the better control you will have over that device.
For example, if you have a nice keyboard attached to your computer, but you accept Rosegarden's default General MIDI device definition for it, you will be unable to make use of any of the keyboard's advanced features from within Rosegarden until you make your device definition more accurate. Conversely, telling Rosegarden you have a Roland JV-88 does not make it so, and if you assign any instruments to programs that are not actually available on the connected equipment, you will hear no sound. (More about instruments in the next chapter.)
A device like the following is typical of either QSynth or a Sound Blaster Live! after loading an uncomplicated soundfont. It includes a basic set of controllers (which are dependent on the capabilities of either QSynth or the Sound Blaster, both of which do support a limited number of controllers, and actually have nothing to do with the soundfont per se), a set of standard General MIDI programs loaded into bank 0 0, and a set of Roland GS-style extra drum kits loaded into bank 1 0.
A studio can consist of just one device, and perhaps for many of you that is all the complexity you will ever need. The real power, however, lies with Rosegarden's ability to manage numerous devices simultaneously. A studio is, in effect, a collection of device descriptions and a routing table ensuring that the right devices are connected to the right MIDI equipment on the other end.
Even on the comparatively simple and very inexpensive end of the hardware spectrum, it is quite possible to have more than one device to manage. The Sound Blaster Live! falls into this category, with four separate write connections available, and four separate play devices. (Actually, there are five write connections once you include the duplex external MIDI port, but that is not depicted here.) They all share the same soundfont on the hardware side, but Rosegarden doesn't know that until you configure the studio that way, by loading programs out of the soundfont into each of the four play devices. (More on that last point in a moment.)
Another typical, simple setup involves using QSynth for MIDI playback and VKeybd for input. You can start either of these after starting Rosegarden, and Rosegarden will detect them and make a play connection and a record connection available, along with an empty play device.
This is what my own studio looks like when I have QSynth, Hydrogen, and ZynAddSubFX running, along with my Roland Sound Canvas and my Sound Blaster Live!. It looks horribly complex on paper, and it would look even worse if I drew out every single bank of GS variations, and did a better job of representing the fact that, while the same soundfont happens to be loaded into both the Sound Blaster and QSynth, that doesn't have to be the case. No matter how it looks, this is actually quite simple to use day to day, believe it or not. Rosegarden makes this easy.
Notice that I have controllers for the Sound Blaster, for QSynth, and for the Roland (the "External MIDI GS Synth"), but I do not have any controllers defined for Hydrogen or ZynAddSubFX. That's because, to the best of my knowledge, neither of those soft synths knows how to do anything with controllers. They both have their own control panels that must be twiddled manually, and that sort of thing can't be automated from within Rosegarden.
I'm glad you asked. The first step in this process is to open the main Studio dialog. Composition -> Studio -> Manage MIDI Devices...
You'll be presented with a dialog that resembles this one, except, of course, that this one has already largely been configured to suit my own default studio. It is divided into two sections; one for play devices, and one for record devices, and their associated connections. It also shows you how each of these devices is connected to internal, external, and software synths. In this example, I have a device named "Roland SC-33" connected to "64:0 EMU101K MPU-401 (UART) (duplex)" and four "SB Live (?)" devices connected to each of 65:0 through 65:3, which are the four output ports on my SB Live!, with their associated write connections. I also have three generic spots reserved for soft synths, named "Soft Synth 1" through "Soft Synth 3", one of which is currently connected to KAMix, an ALSA mixer client that can be controlled via MIDI. These are empty devices that I created with the New button.
The reality of Rosegarden's MIDI router is a bit less intuitive than the diagram I presented earlier. Here is that same diagram with the ALSA port numbers included.
NOTE: The diagram does not exactly represent the same set of devices and connections depicted in the dialog box snapshot above.
You might wonder about the strange names and numbers. ALSA assigns numbers to ports in three ranges. 64: means it is an external MIDI port on the first soundcard, which might be connected to a MIDI keyboard, sound module, or other noise producing gadget through some sort of cable. 65: means it is a virtual port with a supported internal synth such as the Sound Blaster Live! on the other side. Software synths like Hydrogen, ZynAddSubFX and the like will take numbers at the time they're started, on a first-come, first served basis starting at 128:. In addition to the number, most of these will have some kind of vaguely descriptive text component, such as "Emu10k1 Port 0 (write)." These names are provided by the underlying kernel driver, and don't always make a lot of sense. That's why Rosegarden allows you give your devices a proper name.
If you have only one play device, and it only uses straight General MIDI programs, then you are probably ready to go out of the box. If you start Rosegarden with no file to open, it opens a default blank document, called autoload.rg. Initially, this will be the system default that was installed with Rosegarden. It will load a set of basic General MIDI programs and controllers, and will route output from this device to the first available play connection. The device a the top of the list is always the default device.
Typically this play connection will be routed to the correct destination for your MIDI data. If not, all you should have to do is adjust the routing table by dialing appropriate connections into the associated combo boxes. For example, if Rosegarden defaults to routing your output to "64:0 (duplex)" and you do not have any external equipment attached to your computer, you probably want to change this to point to either 65:0 or something like 128:0 as appropriate.
So that you can avoid confusion, you probably want to replace Rosegarden's default "Anonymous MIDI Device 3" type name with something more meaningful. Simply double click on the existing name and give your virtual model a more descriptive one.
Now that your "Anonymous External Device" has become a "Roland SC-33" or what have you, you probably want add a description of its available programs and controllers to Rosegarden's model.
Some equipment uses a method of sorting programs into banks in such a way that the programs in bank 0 0 are the standard General MIDI instruments, and the programs in the remaining banks are variations on those instruments. Roland's GS standard is a prime example of this. Bank 0 0, program 1 is "Piano 1" and bank 0 8, program 1 is "Piano 1w." In order to make it easy to take advantage of this relationship, Rosegarden offers the ability to display programs in secondary banks as variations. You may choose to enable this, and to show the variation list based on either the LSB or MSB value.
Rosegarden should create a few basic default controllers for you. If you have special requirements, or if some of these controllers don't function on the piece of equipment for which you're defining the device, you may wish to edit these defaults by clicking the Control Events button.
If your equipment can't use any of these controllers, you probably want to delete them. If there are controllers missing, you can add them one by one. Use the Add button. This will create a new entry using default values. Double click it, and you should be presented with a dialog similar to this one.
Most of these parameters should be obvious to you based on the particular needs of the equipment you're describing, but the last two bear special mention. The Color: parameter is the color this controller's knob will have on the Instrument Parameters box in the main window, and the position: determines whether this controller will show up, and how it will be arranged relative to the other controllers.
Before you make this document your default, you might want to have a look at some other document-specific settings. These aren't a part of the Studio, but they're saved in autoload.rg, and any new documents you create will start life with these defaults. To edit them, use Composition -> Edit -> Document Properties.
The About tab starts off with some default properties. You can modify or delete these, and you can add new properties. The four defaults will be translated into Lilypond during an export. If you wish to use any other strings in your Lilypond headers, you can add them here by creating properties of that name, then binding your custom strings with them.. For example, "instrument," "dedication," or "poet."
From the Audio tab, you can configure a new directory for audio files. Rosegarden will use this path for recording new files, and it's the first place it will look when you import audio segments. By default, this is ~/rosegarden. If this path doesn't exist, you won't be able to record audio, so either create that directory or configure Rosegarden to look somewhere else here.
You should get in the habit of creating a new audio directory for each document you create in which you intend to use audio segments, as I will detail in another chapter.
Rosegarden can colorize segments and controllers. Custom colors are defined here.