PORTA COELI (Heaven's Gate) for CsoundAV (2003) Arthur B. Hunkins "Then Jacob awoke and said, 'Surely the Lord is in this place, and I wasn't even aware of it.' He was afraid and said, 'What an awesome place this is! It is none other than the house of God - the gateway to heaven!'" Genesis 28:16-17 "Open to me the gates of justice; I will enter them and give thanks to the Lord. This gate is the Lord's; the just shall enter it." Psalm 118:19-20 "The city had the radiance of a precious jewel that sparkled like a diamond. Its wall, massive and high, had twelve gates at which twelve angels were stationed. Twelve names were written on the gates, the names of the twelve tribes of Israel. During the day its gates shall never by shut, and there shall be no night. Only those shall enter whose names are inscribed in the book of the living kept by the Lamb." Revelation 21:11-12, 25, 27 GENERAL PORTA COELI is a meditative solo performance piece for Windows-based computer running CsoundAV. It exists in three basic monaural versions - all indicated by "gate" in their file name and differing only in their performance method: "gate.csd" requires no MIDI hardware; "gatem.csd" requires an external MIDI bank of eight sliders or rotary knobs; "gatem+.csd" necessitates a ninth controller to optionally manipulate frequency detuning/beating of the bell tones. There are stereo variants for each of these: "stgate.csd," "stgatem.csd" and "stgatem+.csd." They add an independent, random circulating pan to the bells (a pan that expands as harmonics rise), but otherwise are identical to their monaural counterparts. All versions use a bank of sliders or rotary pots to create bell tone sonorities that rise and fall over a common fundamental pitch. Indeed, the piece can be said to consist of a single "bell" with ever-evolving harmonic partials. 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 versions of Porta Coeli lend themselves well to multi-speaker sound diffusion. The stereo versions do not. In diffused performances, sound placement begins front and center, and remains there at least until all bell tones are introduced (see below). After that, the sound can begin to move slowly and evenly through space. It continues moving like this throughout, never settling in one spot for more than several seconds. It returns to front and center as early as the beginning of the final fade sequence, and at the latest by the start of the last bell tone fade (also see below). Duration is a minimum of 7 1/2 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 ksmps (also at the top of your .csd file) to 22050 and 10 respectively. (You cannot use ASIO drivers at these rates.) Otherwise, you may need a faster computer. PERFORMANCE The overall performance shape is that of a simple arch. All sliders are initially set to zero. Performance is begun by clicking on the Start/Stop button, after making certain performance choices available in the window. It is ended by clicking on the same button. The Start/Stop control has little audible effect; it mainly serves to eliminate any residual fundamental pitch, particularly whatever remains after all pots are turned to zero at the end. (It also guarantees absolute silence to start.) Pot movement is fairly slow and even, and for the most part continuous. Short pauses may be made on particularly attractive sonorities. Note that the *only* controls that can be varied *during performance* are the sliders/rotary pots. All others are set prior to performance. (The preset common to all versions is Fundamental Frequency, which ranges from 40-80Hz. Several other presets are required by the various versions.) Following the opening sequence (detailed below) and up until the final series of fadeouts, *two* pots may be varied at once, though the norm is one. Overall amplitude is moderate. Master level remains unchanged throughout the composition. As higher harmonics are added via the sliders/pots, the perceived volume will rise naturally. When appropriately set, the peak (with all eight bells at maximum) will be only modestly loud. The bank of eight sliders/pots controls eight frequency-modulation bell sonorities, each with the same fundamental frequency, and arranged so that the fundamentals partially or completely cancel out one another. These modulating frequencies progress from a factor of 2 to 9 in relation to the fundamental. The pots actually control the eight *modulation indices* (higher index settings produce higher harmonics). The ninth slider/pot randomly varies the modulation *frequency* to obtain a detuned beat effect; the higher the setting, the faster the beats (more detuning). The performance begins by opening frequency pot (modulation index) #1, followed (in any order) by pots #2-4, then (also in any order) by pots #5-8. All these move to a fairly low level (to which the piece returns near the end). Now vary these eight pots at will around this low level. Then begin to vary the levels progressively in an upward direction. (While the direction is generally upward, pots occasionally move in the contrary direction.) From this point, a maximum of *two* pots may be moved simultaneously. Also, if frequency Detune/Beat is to be used, it may be introduced from this point (use it in small amounts - a little at first, in general 50% or less, and possibly more only when the eight pots approach their maximum). Finally, all eight pots reach fully on, and are momentarily at this point together. They then reverse direction and head downward. Any Detune/Beat is progressively reduced to a modest level, and by the time the eight pots all return to their initial low position (*not* zero), the Detune/Beat control is turned off. A short pause precedes the final exit sequence. The eight bells individually fade to zero in any order, with a slight pause preceding the last fadeout. Following this fade, the Stop button (or its equivalent) is activated. SPECIAL INSTRUCTIONS FOR (ST)GATEM.CSD AND (ST)GATEM+.CSD These versions require external MIDI controller hardware. The set of 8 (or more) sliders or rotary pots (continuous controllers) 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). (St)gatem+.csd requires one additional slider or pot on the external MIDI device - to work as a modulation frequency Detune/Beat control. This can be part of the larger bank, or a separate controller, such as a data entry, modulation or volume control. The performance file assumes 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; the default configuration will work when the number of the first controller of the bank of eight is entered on the performance screen. (The performer must consult the device documentation to learn the default number of the first controller in the bank. Multiple numbering sequences are often available as "presets.") Controller numbers for banks are often consecutive, in at least some preset option. If no such configuration is available, you'll have to program the controllers manually to be consecutive. (Also be sure 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 8-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 on consecutive channels, starting with the Banks, then the Amp Controller, and lastly any other individual controllers. For (st)gatem+.csd, determine the number of the ninth controller (assuming you wish to use it) from the documentation, and enter it on the performance window as well. The composition's default value is controller 1, which is the modulation wheel on MIDI keyboards. The keyboard volume control (controller 7 - which sometimes doubles as the data entry slider) or an extra slider/pot in the controller bank may also be appropriated. In the latter case, the controller number can often be determined from that of the first slider/pot in the bank. Finally, there is a second option for starting and stopping these versions. Instead of clicking the on-screen checkbox, one can press any available MIDI button that can send a MIDI on and off message on channel 1. (This is the equivalent of holding down any key on a MIDI keyboard - which, if desired, can substitute as a Start/Stop control.) This may be a more convenient way for the performer to handle the beginning and end of performance, as there would then be no necessity actually to "perform" on the *computer*. (Note that, aside from the issue of Start/Stop, the ninth MIDI slider used in (st)gatem+.csd also provides for a "computer-independent" performance. In addition, if you don't need the frequency Detune/Beat feature, (st)gatem.csd can be computer-independent.) When multiple buttons are available, program one with the "Start" message, another with "Stop." Using a single button for "Start/Stop Fundamental" (Note On/Off) will require holding the button down during much of the performance, unless the button can be set to "toggle" between On and Off (which is preferable). The appropriate SysEx MIDI data string for Note On, channel one is (in hex) "90 00 01"; for Note Off, "90 (or 80) 00 00". (Buttons on the Peavey PC 1600[x] can be programmed with these MIDI messages, for example.) Otherwise, "NoteOn" event type can be selected, along with any note name or number with a positive velocity value - channel 1. (If required, "NoteOff" with same note name/number, or "NoteOn" with same note name/number *and velocity equals zero* - also channel 1 - terminates the event. "Press/release" buttons do this automatically.) SPECIAL INSTRUCTIONS FOR (ST)GATE.CSD The eight frequency (modulation index) sliders in (st)gate.csd are on- screen, and operated with the mouse (of necessity, one at a time) - optionally assisted by the cursor-left and -right keys. Controls are selected by clicking on their handles (anywhere - the value won't change). They then can be dragged at the desired speed to a new value, or the cursor- left or -right keys can be held down to move them. There is another option as well: directly clicking the mouse on a new slider value. Upon doing this, the sonority will uniformly glide to its new setting at the rate set by the preselected Glide Time (permitted range: 1-6 "seconds"). The Glide Time represents approximately *half* the number of seconds it takes to go from one value to the next. Though it is possible to alter Glide Time during performance, doing so is not recommended since it would disturb the desired steady pace of change. ADDENDUM: VERSIONS THAT USE A KORG KAOSS PAD (OR X/Y CONTROLLER) AS SECOND MIDI CONTROLLER Gate4mK and gate4m+K are two additional versions that duplicate gatem and gatem+ - except that they use a Korg KAOSS Pad to create quad movement/ placement from the originally mono signal. (They thus require 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 these versions. 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. OTHER KAOSS PAD SUBSTITUTES - THE "G" VERSIONS Gate4mK and gate4m+K are basically "poor person's KAOSS Pad substitutes" that duplicate the KAOSS Pad versions described above. They 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 versions 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 these versions are performable by any graphics pad, preferably in "pen mode." They 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" versions require 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. ("G" versions are the only ones 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 versions. 11) The KAOSS Pad and its "substitutes" *always* operate on channel one.