GLORIA PATRI for CsoundAV and MIDI Slider Bank (2004) Arthur B. Hunkins Gloria Patri, et Filio, et Spiritui Sancto. Sicut erat in principio, et nunc, et semper, et in saecula saeculorum. Amen. The Lesser Doxology Pater noster, qui es in caelis: sanctificetur nomen tuum. Adveniat regnum tuum. Fiat voluntas tua, sicut in caelo, et in terra. The Lord's Prayer Yahweh my God, how great you are! Clothed in majesty and glory, wrapped in a robe of light! Psalm 104:1-2 GENERAL GLORIA PATRI is a meditative solo performance piece for Windows-based computer running CsoundAV. It requires, in addition, a MIDI slider or rotary-pot bank of eight or more controllers. The basic monaural version is named "gloria.csd" and features four sustained tones/bells. A stereo variant is entitled "stgloria.csd." This adds random stereo panning to the combined tone/bell sonority, but otherwise is identical to its monaural counterpart. MIDI hardware requirements are the same for mono and stereo versions. Via MIDI sliders, the performer controls the bell components of the sonority (if any), individual brightness and loudness of the tones, and (optionally) overall volume. Each bell/tone has two controls: the first is a combination of volume and brightness (varied modulation index); the second, bell components (sidebands caused by changing modulation frequency). The pure tone transforms into a bell sonority as follows: when the bell component slider is raised above zero, a single sideband (pitch) rises, another falls relative to the tone. As the slider value changes, the sidebands symmetrically vary this relationship. The result is a three- frequency bell tone with stable central pitch and opposite-moving sidebands. The performer has the option (via on-screen checkbox) of grouping the sliders by bell (four ascending pairs of sliders) or by slider function (four amplitude/brightness controls followed by four modulation frequency sliders). While the fundamental (carrier) frequency of all bells/tones is the same, the modulating frequency for each bell is progressively higher. As a result, the overall impression of pitch among the four bells is ascending. The complicated interaction of the various sidebands, however, largely obscures this impression. Additional frequencies are created as bells interweave. (In addition, the modulation controls for bells 2 and 4 actually move the modulation frequency *down* rather than up, creating a somewhat different pattern of sideband movement from bells 1 and 3.) Each modulating frequency control selects among 17 equidistant frequency ratios ("bells"). The control is not continuous, so the number of bell combinations is both finite and reproducible. A lag time setting specifies the length of time it takes to glide from one sonority to another. The 17 modulation frequencies are displayed - as ratios to fundamental/carrier frequency - in boxes in the performance window. The highest and lowest are simple ratios, producing "tones," while the more complex ratios in between represent "bells" (or sometimes "chords," if less so). The computer required for performance must be running a version of Windows - 95B or higher. (With Windows 95 you must be sure that OpenGL has been installed.) The program that executes the selected .csd file is Gabriel Maldonado's CsoundAV, v0.043 or higher. Prior to performance, be sure to close as many programs running in your Windows taskbar as possible. This will minimize any chance of audio breakup. (Depending on your system, there is a good possibility of disaster otherwise.) The monaural version of Gloria Patri lends itself well to multi-speaker sound diffusion. The stereo version does not. In diffused performances, sound placement begins front and center, and remains there until the basic texture has become fairly well established. After that, the sound can begin to move slowly and evenly through space. It continues like this throughout, never settling in one spot - and concluding wherever it finds itself. Optionally, it can return to front and center position to end. Minimum duration is 8 minutes. SETUP The performer downloads and installs the current version of Maldonado's CsoundAV from http://www.csounds.com/csoundav . The file to download is named CsoundAV_Win.exe . Please be aware that a *graphics tablet* version of this composition, indicated by a final "G" in the filename, requires the *very latest* v0.0432 CsoundAV. (For more about "G" versions of this piece, see the end of these instructions.) This latest v0.0432 may be available *only* at the URL above. To run CsoundAV (and this composition), click on the program icon, and on the popup window that appears, type the name of the desired .csd performance file into the Orc field. Alternately, drag the .csd file onto the window. Click OK, and the performance window for the piece will appear. When you run any performance file, you will be queried (via pop-up window) to specify a Portaudio OUT Device number (-+P#), and if MIDI controllers are involved, a MIDI In Device number (-+K#). Once you determine appropriate device ID's for your setup, you may add them to your CsOptions flags (as, for example, -+K0 and -+P8). (These flags are located toward the beginning of the .csd text file. You can edit them in any text editor, including Windows' Notepad.) Doing so will thereafter happily bypass the device selection process. For any problems, please consult Maldonado's CsoundAV Manual, also downloadable at http://www.csounds.com. This HTML manual comes as a zipped archive named CsoundAV_Manual.zip. See particularly its sections entitled Special Command Line Flags and Command Line Hints. (Command line flags are the same as CsOptions flags.) DIRECTSOUND If your system software includes *DirectSound*, slider/pot response time (latency) will improve substantially. DirectSound is present by default in systems running Windows 98SE and above. You also need a DirectSound driver for your soundcard. Any recently-manufactured stereo soundcard will install DirectSound drivers; "legacy" (ISA) soundcards will not. DirectSound drivers (or multichannel ASIO drivers - see below) may be available on your system. On the Portaudio OUT Device Select popup window, you'll see any and all DirectSound and ASIO (in addition to MME) drivers listed. Specify one of the DirectSound (or ASIO) numbers; if it works, add this number to your -+P flag (as, for example, -+P5). DirectSound and ASIO are *particularly* sensitive to any programs running in the background, including those in the taskbar; be sure to close as many as possible. Please note that a native *ASIO* driver is required for quad versions. Hint: If you are still having a problem getting clean, click-free sound, run a *MIDI* version of this work (it is less demanding on system resources). Also, at the slight sacrifice of some high frequency content, you can try halving the values for sr and kr (also at the top of your .csd file) to 22050 and 2205 respectively. (You cannot use ASIO drivers at these rates.) Otherwise, you may need a faster computer. PRE-PERFORMANCE The set of eight or more sliders or rotary pots needed by these versions are found on a variety of MIDI devices, including keyboards. Most of these devices are dependent on serial MIDI interfaces, usually found on sound cards. Some more recent MIDI controllers incorporate *USB* interfaces, and so are particularly appropriate for use with laptop computers (which normally lack MIDI interfaces). The performance files assume that all required sliders/pots are set to function as continuous controllers, and to output values 0-127 on channel 1 - all of which is usually true by default. In some cases, nothing will have to be programmed into the MIDI device; this is true when controller numbers for the eight-slider bank are consecutive. (The performer must consult the device documentation to learn the multiple numbering sequences that are available as "presets." Controller numbers for banks are often consecutive, in at least some preset option.) The default configuration in the on-screen performance window incorporates consecutive numbering. In the unlikely case that no such configuration is available, you'll need to program the controller numbers manually on your controller bank. (Be sure also that they all transmit on channel 1.) All MIDI versions provide for two additional controller configurations that may be rarely encountered. 1) ALL CONTROLLERS USE THE SAME CHANNEL, BUT NOT #1: Locate the line toward the beginning of the performance file - "#define CHAN #1#", and change the channel number to the one you need (from 2-16) with any text editor, such as Notepad. (This revision is active until you change it again.) Note that the "#" characters around the channel number must remain. 2) EACH CONTROL (of a hardware bank of 16) USES A UNIQUE CHANNEL, BUT WITH (channel volume) CONTROLLER #7: For this situation, either the overall Amplitude Controller # box (when applicable) or the Bank 1 1st Controller box on the performance screen includes a special, coded controller number. To enable this layout: For the Amp Controller #, select 128; for Bank 1 1st Controller #, select -1. All controllers will now be consecutive, in the order of their default numbering on screen. Note that the Amp Controller is always first. (Any optional controller, default coded to "#128", is placed last. Since 16 pots/sliders are available, optional controllers are always included here.) Nearly all the controls shown in the on-screen performance window are to be preset; they are not to be changed once sound starts. These presets include Fundamental Frequency, Random Frequency (a small amount of random frequency and amplitude modulation that introduces a kind of "jitter" to the sound), Random Modulation Index (a similar random brightness "shimmer") as well as several controller numbers. The default (and nonexistent!) Volume Controller number, found in an on-screen box, is 128; at this setting, the Stop/Start checkbox and the Fade In/Out Time are active and determine volume. If the Volume Controller number is anything but 128, the designated slider controls volume and overrides the Stop/Start checkbox. The Fade In/Out Time value is the only setting that may be changed during performance; this allows the fadeout time to be different from fadein. Note that the above Volume Controller option requires an additional MIDI controller - as does the Stereo Controller option discussed below. Both of these possibilities depend on the total number of available pots/sliders. The stereo version adds several on-screen options. The set of stereo controls works much like the volume controls just described: when the Stereo Controller number remains at its default 128, the Start/Stop Stereo checkbox and Stereo Fade Time are active. (The Stereo Fade Time can also be changed during performance - to give a different fadeout timing from fadein. Since this control has only modest audible effect, however, it can well remain as preset.) When the Start/Stop Stereo box is checked during performance, sound begins to move from (mono) front and center to a full stereo field random pan - over the Stereo Fade Time specified. Using a Stereo Controller slider, the same effect occurs when the slider is raised. It is recommended that the control be moved to maximum, in order finally to pan the entire stereo field. However, the control *may* be moved to the highest position in stages, as the pan field is gradually expanded in scope. Once the widest pan field is reached, it remains there for the remainder of the performance, except that it may optionally return to mono, or reduce its field (again, in stages, if desired) in preparation for the end. Whichever stereo fade option is selected, stereo panning is not introduced until the opening texture is well established. (This is the same requirement as for mono sound diffusion.) As a result, begin with the Start/Stop Stereo box unchecked, or the Stereo Controller slider set to zero. Overall amplitude is user-determined and preset; the external master level remains unchanged throughout the composition. Each bell has the same dynamic range. (Keep in mind that as each sonority brightens it inevitably also gets louder.) Overall performance volume should never exceed a robust moderate level. (The on-screen Start/Stop checkbox automatically fades in to maximum level - which corresponds to maximum setting of the volume fader.) If the performer elects to use a volume slider, this control should only be moved for the opening and closing fades; it too remains unchanged throughout the body of the composition. PERFORMANCE This composition is a particularly "open" one, with few specific instructions for realization. These few are: 1) After bringing up the performance window, turn all controller pots to zero, including the Volume Controller (if you are using it). Only then, set the *number* of the Volume Controller. Next, lock in your other presets (see above). The first slider of the slider pairs (which determines bell/tone volume and brightness) always starts at zero. The second slider (modulation frequency) may or may not begin at zero. (Zero is one good option.) If they are not at zero, these sliders *must be moved* to another position *after the performance window is opened*. (The pots output their lowest value - as though they were turned all the way down - until they are changed!) 2) The performance begins and ends either by checking/unchecking the on-screen Start/Stop checkbox, or fading in/out the MIDI Volume Controller. These controls vary the fundamental sine tone's loudness, modified only by Random Frequency Modulation (and amplitude) "jitter" (if any). 3) Modulation pots (the second pot of slider pairs), when set at zero and their corresponding amplitude/brightness controls raised, produce slowly- beating unisons with the fundamental. Harmonics are added as volume/ brightness controls are raised. At maximum setting, these modulation pots create octave and open fifth sonorities on the same, unchanging fundamental. These "tones" contrast markedly with the "bells" produced by intermediate settings of the modulation controls. (As mentioned above, each slider accesses 17 discrete settings and is *not* continuous.) One performance plan is to begin with the simpler "tones," move into the bells, and optionally return to the unisons, or their related octave/fifth sonorities, toward the end. A few of the intermediate frequency ratios represent sounds located somewhere between "tone" and "bell" ("chord" might even be the appropriate term for the less complex ratios). These differences in tonality and dissonance might be employed to build a performance "script" (see further below). 4) Several controls may be moved at a time - always slowly and evenly (or creating this impression). 5) Combinations of tone/bell sonorities should always be *euphonious*. Avoid raucous beating! Use of four bells simultaneously (sometimes even three) will often result in an overly intense, dissonant sound. In general, work with two- and three-bell sonorities, fading out the third bell before changing its modulation frequency or introducing the remaining bell. (Directly/abruptly altering an "offending" bell frequency can make it sound like a mistake, and interrupt the meditative character of the performance.) It is not necessary to sound all bells together, nor even three at the same time. (A perfectly good rendition could feature only two simultaneous bells.) 6) There are two ways to change the pitches of a bell sonority: either modify the modulation frequency while the bell is sounding; or fade the bell out (via the volume/brightness control), change the modulation frequency, then fade the bell back in. Your performance will likely feature one method or the other; their effects are quite different and it is important for a given performance to maintain a consistent character. Your preferred method should be reflected in your preset Lag Time setting. If you generally intend to change frequencies while a bell is sounding, select a longer Lag Time. This will create a smooth and gradual sonority shift. On the other hand, to change frequencies quickly while a bell is "off" and so minimize "off time," a short Lag Time is desirable. The default Lag (.3 seconds) is an intermediate setting that may "work" for either approach - especially if modulating frequencies are close together. 7) When changing modulation frequency, you will run into sonorities that grate against the tones already present. In such cases, as soon as possible (but not abruptly), either fade out the "offending" bell or one of the other bells. Reducing a three-voice texture to two bells will usually resolve any immediate "dissonance" issue. 8) The overall texture evolves slowly and evenly without notable climax. Performance is only optionally goal-oriented. 9) It is possible to thoroughly script a performance, especially as far as modulation frequencies are concerned. (Doing so is a sure way of eliminating raucous bell combinations.) This can be as simple as preselecting four (or fewer) bell tones and using only these throughout. Or it could be an elaborate shifting texture of changing frequencies and designated fadeins and fadeouts - even a rudimentary performance "score." At any rate, modulation frequency ratios can be monitored on-screen, with the minimal aim of creating more intentional (and desired) combination sonorities. 10) At the end, the voices fade out one by one, with the performance ending after the last voice is gone. If the performance begins with simple tones, you may also wish to end this way - with modulation sliders either at zero or maximum. 11) Practice! Become thoroughly familiar with the effect of each slider or pot. Learn the sound of the various modulating frequency combinations. Be selective, and discover how to move smoothly into new "harmonious" sonorities. Don't attempt to get too many bells sounding at once. Less is better (and safer) than more. ADDENDUM: A VERSION THAT USES A KORG KAOSS PAD (OR X/Y CONTROLLER) AS SECOND MIDI CONTROLLER Gloria4K is an additional version that duplicates gloria - except that it uses a Korg KAOSS Pad to create quad movement/placement from the originally mono signal. (It thus requires an ASIO driver.) Either a KAOSS Pad 1 or 2 will work (and in exactly the same way). The KAOSS Pad is a control surface that consists of two contiguous MIDI controllers, one representing the x coordinate, the other the y. The Pad's default controller numbers 12 and 13 are also default for these versions. (Be sure to configure the Pad to transmit *only* x- and y-axis touch panel messages - on channel 1.) The first controller number is preset in the on- screen window prior to performance. IMPORTANT: As part of initial setup (once the run has started), touch the pad in the *topmost center position*; this will place the initial sound front-and-center. The Pad is performed either by dragging a finger over the surface, or by simply touching the pad in different positions. In the latter case especially, the Pan Lag Factor control is crucial. This control is both preset on-screen to an initial desired value, and varied during performance. Activity on the KAOSS Pad can be intermittent; the only requirement is that perceived spatial movement not be sudden or jerky. Also, the KAOSS Pad can optionally be assigned to a second performer. Since Csound currently only permits a single MIDI input, the two MIDI outputs must be combined into one. Three methods are available: 1) The simplest method is available whenever one of the MIDI devices has a MIDI Thru or MIDI In connector that will accept input from the other device. For this to work, the receiving device must also be capable of *MIDI merge*; some devices have this capability, others don't. Unfortunately, neither of the KAOSS models do, so this feature must be offered by your *other* MIDI device. 2) This method is the most universal, and will work as long as you can get both MIDI signals into your computer. Download (http://www.midiox.com) and install both MidiOx and MidiYoke. These utilities are free, and simple to use. They combine two or more MIDI data streams and present them to Csound as a single MIDI input. (MidiOx does many other fascinating things too - for example, enabling the *computer keyboard* to generate MIDI data.) The key (in MIDI Yoke) is to specify the MIDI devices you wish to combine, as "MIDI *Inputs*," and MIDI Yoke Junction 1 as the "MIDI *Output*." Then, in Csound, select MIDI Yoke Junction 1 as your MIDI *In* device. 3) The third option applies only when both devices use 5-pin DIN (traditional MIDI) connectors and cables: a simple, self-powered MIDI Merge/ Thru box with at least two MIDI inputs and one MIDI output. A few of these diverse boxes even adapt MIDI output to USB. Finally, *any* MIDI device that comprises two continuous controllers (with successive numbers) could substitute for the KAOSS Pad in this version. In particular, a simple X/Y joystick will work well - especially if not spring- loaded. To convert joystick data to MIDI (which is required), run the handy (and free) MIDI Joystick v1.1 utility (by Hubi!) found at: http://members.magnet.at/hubwin/midi.html (MDJSTK11.ZIP). Set the X and Y axes for Channel 1 and Controllers 12 and 13 (or whatever pair of numbers you want to specify under "KAOSS 1st Cont #"). Select MIDI Yoke Junction 1 as "Out". Whatever spatial controller you use, be sure that sound starts in the front- and-center position, and moves smoothly throughout performance. ANOTHER KAOSS PAD SUBSTITUTE - A "G" VERSION Gloria4G is basically "poor person's KAOSS Pad substitute" that duplicates the KAOSS Pad version described above. It should be selected only when a KAOSS Pad is unavailable and quad panning is desired. Suffice it to say that you will find the KAOSS Pad version to be far more user-friendly and intuitive. (This is probably true of the X/Y joystick option as well.) The "G" stands for "graphics," and this version is performable by any graphics pad, preferably in "pen mode." It will also work, however, in "mouse mode," or indeed (when pressed into service) with *any mouse or touchpad* as spatial controller. (Since none of these controllers involve MIDI, MidiOx and MidiYoke are not required.) The following recommendations/ instructions apply: 1) The "G" version requires CsoundAV v0.0432 or later. 2) Screen resolution must be one of the following: 640x480, 800x600, 1024x768 or 1152x864 (note that these are all 4:3 aspect ratios). The default resolution for "G" version performance is 800x600. (The "G" version is the only one for which screen resolution is an issue.) If you prefer any *other* screen resolution, you must edit your .csd file by substituting the corresponding screen *width* as the init value for *giwidth* shortly after the beginning of the CsInstruments section. (Specify screen width only, not height.) 3) In Taskbar Properties, uncheck "Always on top" (and "Auto hide"). (Right-click on taskbar, choose "Properties.") 4) With graphics pad, "Pen mode" is recommended (and full-screen window). 5) All on-screen controls are *preset* in these versions. Only event "Start(/Stop)" boxes/buttons are clicked during actual performance. 6) When using a pen, set the tip feel/response to as firm as possible. This will help avoid unwanted clicks on the numerous controls present in the performance window. For the same reason, use a very soft touch when tapping the window (in contrast to dragging) during performance. 7) Avoid the extreme top and bottom of the performance window: a) the top title bar is inactive (watch out where you enter and leave it), and you can easily drag/reposition the window; b) the bottom edge is likewise (dangerously) draggable, so you can inadvertently either resize the window or minimize it (by clicking on what's below). Any of these occurrences can be fairly disastrous. 8) Before beginning, set the pointer at the top of screen, center (but not in the title bar!) This will produce initial sound front-and-center. 9) In performance, be careful to move only the pointing device (pen, mouse, touchpad) you intend. Remember that all these devices are simultaneously active. 10) In other respects, proceed as for the KAOSS Pad version.