User's Guide to Melodia / Sound Card Introduction: Most new technology, when first introduced, imitates older technology. Early photographs of people seem stilted today because they were posed like portrait paintings. Early films looked like poor imitations of plays, because the camera shots were set up as if viewing a play. More recently, early computer images looked like poor quality photos. In each of these instances, as the technology advanced people began to understand what the new medium could do that was different from the one it conceptually grew out of, and the work produced eventually took on its own unique character. Computer music tools, not surprisingly, have been following the same path. Most of the music software available today has yet to break out of the traditional, well understood approach to making music. The software gives you a computer imitation of a tape recorder, or of a score editor, or both. It still assumes humans need to make music on instruments that must be played by physical means, limited by human physical response times. More importantly, the traditional approach requires that to make good music, the musician must have spent years developing manual dexterity skills and an understanding of complex musical structures. Melodia is one of an emerging group of computer music tools known as "algorithmic composing programs." These programs generally are attempts to free musical artists from the tyranny of a tradition that grew out of the physical limitations of the medium, just as photography freed visual artists. They do not try to replace the traditional methods. They do offer a completely new medium with new rules and with different strengths and limitations. With Melodia, you concentrate on the overall patterns and sound relationships of your music. You will do best if you approach it with an open mind, unencumbered with the need to make it sound like the music that is familiar to you. By allowing the computer to do the grunt work of playing the instruments and keeping track of the math-like musical relationships, you are freed to do what humans do best: the creative part. Historical Note: Melodia is derived from a MIDI based algorithmic composing program, called MusicBox when it was first released in 1984, with later versions renamed to "Kinetic Music Machine" ("KMM"). KMM is a kind of programming language for MIDI. It is the ultimate in flexibility at the expense of ease of use at the higher levels of musical organization. KMM was developed to experiment with algorithmic music concepts, Melodia has been developed to make it easier to use these concepts to produce musical compositions. Both of these programs are deeply indebted to the work of Joseph Schillinger, who attempted to codify art in general and music in particular into a system of small whole number relationships. Although Schillinger attempted to codify traditional, mostly Western, music, his approach to rhythmic, harmonic and melodic structures are far more suitable to computer composition than to the physical limitations of human musicians and their acoustic instruments. To a large extent his work is similar to that of the mathematicians and scientists who developed theory before technology - computers in particular - had advanced sufficiently to prove it. Schillinger died in 1943, the year the first electronic computer was born. Overview: Melodia consists of three video pages: Instrument, Play, and Compose. You can combine the Play and Compose pages into one screen with the Zoom menu command, and you can flip through the pages with the "Page" command. To exit the program, save files, or manipulate the Sequencer Bank data (more about that later), you can pop up the File menu at any time. The Instrument page allows you to build your own FM instruments, or to tweak any of the 128 predefined instruments. The page is a graphical representation of the Yamaha FM chip that is found in most sound cards available today. The Play page gives you control over which instruments are playing at any given time, and their rhythms, timbres, and volumes. An instrument along with its performance controls is represented by one of 16 horizontal lines on the Play page and is called a "voice." If you are using a sound card with a stereo FM chip, generally referred to as "OPL3," you will be able to play up to all 16 voices simultaneously, and you will have left, center, and right pan. Sound cards with the older FM chips allow a maximum of 9 voices, with no pan. The top two lines of the Play Page control the playing of a composition by stepping through up to 64 stages. Each stage is a snapshot of the current settings of the Play and Compose menus. The usual process for composing a piece of music is to set up a pattern on the first stage, then to step through the following stages and progressively modify the sound: bring up more voices, fade the current ones out, etc. Selecting "Strt" will then step through the stages, playing each one for the number of measures you selected. The Compose Page is the heart and soul of Melodia. This is where you select the pitch, timing, and other relationships, where you compose your music. Although the appearance of all those numbers in neat rows seems intimidating at first, there are only seven different processes, each repeated several times. So with only seven things to learn, you will quickly find your way around. These processes are used to generate pitches and other formatting controls such as Pan and Modulation. They have been designed to be simple in concept but powerful in the virtually infinite ways they may be combined. At the bottom of the page are the Clocks, which control rhythm. There are 16 clock modules that combine to make 12 clocks. The modules combine beats to make polyrythms as simple or as complex as you like. On-line Help and Color Codes: Every active area on the Melodia screen has a built in help line that is printed at the bottom of the screen when you press the right mouse button. The rule is simple: click the right mouse button to see what an area does, click the left button to do it. You can hold the right button down and move the mouse about the screen to get a quick scan of what all the controls in the area are about. Each help line will indicate which of the three mouse gestures you need to use for the function: "Click" is simply a left mouse click. Often you will get additional feedback (such as the control changing color) if you hold the button down for a moment when you click it. "Dial" means to move the mouse left or right while holding the left button down. The control you are changing will be highlighted while you are dialing it. When you reach the desired value, release the left mouse button - the value will remain, the highlight will go away, and the mouse cursor will reappear. "Slide" is similar to Dial, except it is used on the sliding bar controls. While holding the left mouse button down, slide left or right. The value of the control will change as will its position on the bar. Release the mouse button to select the value. In addition to the on-line help, the controls have a consistent color coding that tells you at a glance how different controls function. White, green, cyan (light blue), and magenta (light purple) numbers all indicate an active control that can be changed by the mouse. Yellow and non-numeric magenta labels are informational only and cannot be changed by the mouse. Some of these are documented by the on-line help, but most of them are simply documented as: "Not an active area." The power behind Melodia's scheme is that most numeric controls take either values or connections. Values are just that, numeric values you dial in. These will be colored white. Connections are the value at the output of one of the Compose Page processes. You get these by dialing a value left past zero. It will turn green and take on the label of the process. Processes all have magenta labels that identify them, and they have cyan output fields that are the values that are returned when you have one selected as a connection. Connections are covered in detail in the Compose section of this document. Instrument Page: The Yamaha FM chip is based on the work of an American, Dr. John Chowning. It is a simple but powerful concept for designing sounds that can imitate many traditional instruments, or for designing new sounds that can only be produced electronically. The basic principle of FM synthesis is to have two simple sine wave generators, called "operators", with only one, the "carrier" operator actually producing the sound. A sine wave is the purest sound wave (or any other wave) possible. Since the sound is so pure, it is also of itself rather boring. But things start to get interesting when the other operator, the "modulator," is fed into the frequency (pitch) control of the carrier, to produce a fairly rapid tremolo called Frequency Modulation, or FM. What makes FM so powerful is that the volumes of the two operators are changed over time. This makes the carrier - the operator you hear - resemble a natural instrument in volume: a sharp rise at first followed by a moderate drop down to the sustain volume, ending with a gradual drop to silence. While the volume is changing in time, the modulator is also changing the harmonics of the carrier by sending its output to the frequency control of the carrier. You can conceptualize the amplitude envelope by thinking about striking a single key on a piano: when you first strike the key there is a rapid rise in volume and harmonics, followed by a drop in volume with an increase in purity while you continue to hold the key down, followed when you release the key by a gradual (assuming you are using the sustain pedal) drop in volume as well as an increase in purity of the tone, down to silence. This is the pattern used by the amplitude envelopes of both the carrier and the modulator in the Yamaha FM chip: an Attack time followed by an initial Decay time that drops down to a Sustain level, and finally a Release time that drops to zero. The three time components are A = Attack, D = Delay, and R = Release. The amplitude component is S = Sustain. Actually, there are two additional amplitude components that are not adjustable: Attack always rises to maximum amplitude, and Release always drops to zero. But it is the adjustable components that give the envelope its name: ADSR = Attack, Decay, Sustain, Release. What you need to keep in mind when you are tweaking an instrument is that the ADSR of the modulator controls the harmonics, while the ADSR of the carrier controls the volume. They look and operate alike but they affect the sound in very different ways. The one difference between the Modulator and the Carrier operators is that the Modulator has an additional control, FB = FeedBack. This allows an extra level of subharmonics to come out of the modulator. At its most extreme setting things get out of hand, and you get what amounts to noise. This is useful in small quantities to give a breathy quality to flute sounds, etc. Also note that when you click on the FM box at the top center of the page, the routing of the two FM operators is changed, so that both of the operators go to the output. In this case you have two carriers and no modulators (except that operator #1 continues to have feedback, so it is in effect FM'ing itself). Play Page: The Play Page is divided into two parts: the top of the page controls global parameters such as tempo and the actual sequencing of the stages. It is the computer equivalent of the conductor. The rest of the page consists of the sixteen lines that control the voices. These are like the musicians in the orchestra. Voice Controls: Starting with the orchestra, the line of text labels just above the sixteen voice lines has only one active control, the Mute/Solo switch. When in Mute ("Mut") mode, the leftmost blue numbers that identify which voice is active can have any combination of voices on or off. These combinations are remembered by the stage sequencer. When in Solo ("Sol") mode only one voice is allowed on at a time, and the switch setting is not remembered by or changed by the stage sequencer. Additionally, Solo mode connects the voice to the Instrument Page, so you can isolate a particular voice, then jump to the Instrument Page and tweak it. There are four groups of four instruments each. If you have a sound card with the older mono FM chip you can only use the first nine voices, otherwise each is identical. Starting from the left, the number that identifies the instrument is a control that turns it on or off as described above. When using the stage sequencer it is a good idea to turn the instruments on at least one stage before you need them, while the volume is zero. This avoids glitches that may be produced when the instrument first comes on-line. Using the mute as well as zero volume when you change instruments in a voice completely removes potential glitches that may be produced by loading new instrument parameters into the chip. The next three icons control the rhythmic feel of the voice. The first two of these control the actual rhythm, the third controls pitch delay that strongly influences perceived rhythm. The blinking note icon indicates the clock on and off time. You can click on it to change from a note every clock tick to a note only when the pitch changes. If you think you should be getting sound from a voice but aren't, check that you have a note icon with a double flag (new note every clock tick), not a single flag (note only when pitch changes). The letter icon next, labeled "Cl," is the Clock selector. The default is for the first voice to get clock A, the second to get B, etc. But this is arbitrary, and you can and probably should make changes. All clock selectors have a range of A-L for the 12 Clocks, "M" for the measure clock and "N" for the maximum rate clock. Next is the Pitch Delay selector. This value can be changed by dialing from 0 to 9, then A to F, a total of 16. Its purpose is to delay the pitch for the number of clock ticks given. At 0 there is no delay; at 1 there is a delay of one tick; at 2, two ticks; and so on up to a delay of 15 ticks at F. To understand this effect, set two voices to the same pitch pattern and the same clock, then dial a low number into one (only) of the two voices. You will hear the pattern bounce from one voice to another. A brief word about rhythms here: Traditional Western music rhythms were derived from Gregorian chants, which were patterned after human speech. This has worked well for us for some 600 years, but today we have computers and therefore other options. With Melodia you produce rhythmic structure by using different clocks that beat against one another. It takes some getting used to, but with a little exploring you will find rich new rhythmic structures, along with new ways to build more traditional structures. Actually the method is not all that new. Schillinger was using it to codify music in the 1930's, and for centuries before that some of the most sophisticated rhythmic music on the planet has been produced in essentially the same way by tribal African musicians. The three digit light blue number and white instrument name are a single command that selects which of the 128 instruments you want to use for a given voice. The choice is arbitrary, you can set all the voices to the same instrument, or each to a different, or any combination. You can also change instruments every time you step to a new stage, although it is usually better to change instruments during a quiet period to avoid glitches, as mentioned above. Two controls affect pitch: transpose ("Tsp"), and keyboard pitch ("Kb"). Transpose is simply an absolute offset to the keyboard pitch. Its range is that of the Yamaha FM chip: C of the 2nd octave in the MIDI note range of 0-128 (MIDI note 24), up to G of the 10th octave (MIDI note 127). Actually, transpose only goes up to the tenth octave base, C/X, otherwise there would be no room to add in the keyboard notes. When you dial the notes, notice that there are no flats. Although you can easily set up any scale in any key you wish within the 12-tone system, the 128 notes recognized by MIDI are given their absolute C-major names. The octave of middle C, for example runs consecutively from MIDI note 60 = C/5. The Keyboard input (improperly named since there is no keyboard), the Pan input and the Mod input all take either values or connections. Values are just that, numeric values you dial in. Connections are far more powerful and will be covered in detail in the Compose section. Briefly, you can connect these voice controls to any of the Compose processes. The default keyboard input for voice #1 is set to the fourth Random generator, which defaults to generating random values between 0 and 24. You will want to change this, it is intended only to give you a working sound to start with. Pan is somewhat primitive in the Stereo FM chips, and nonexistent in the earlier Mono chips. Still, it can be used to good effect. The only Pan positions are full Left, Center, and full Right. Melodia uses values of 0-20 for Left, 21-42 for Center, and 43-63 for Left. Ranges were used rather than Left, Center and Right to maintain compatibility with future versions of the FM chip. The arrow at the left of the Pan control is the polarity switch. Click on it to switch from up to down. When down, the ranges for Left and Right are switched. This is very useful to control pan of two voices so they move about but always remain symmetrical. For a simple example of this, set one of the Random processors to 63, then dial in that processor to two pan inputs of two voices, with one arrow set up and the other down. Dial the same clock into the two voices and the Random processor. You should get a very lively bounce of the sounds as they bounce left, center and right, but remain separated. Modulation ("Md") controls the Level input to the Modular operator of the FM instrument, and the Volume slider controls the Level input to the Carrier operator. However, since a particular instrument may have two Carriers and instead of a Modulator and a Carrier - which would make it possible for the Volume to be a zero and still have sound coming from the other operator - the Md control is overridden by the Volume slider at low volumes. The actual formula is: Md = MIN(2*Volume, Md). The Volume slider becomes especially useful when you start building a multiple stage composition. This is because of the Slew control to its right, which turns the Volume slider into an automated mixing console. By setting Slew values to anything other than 0, the volume slider will automatically fade from the value at the last step, toward the setting at the current step. Volumes will instantly jump to their settings if Slew = 0, or if the Halt control is clicked. Slew times increase as the value increases and are not affected by the Tempo setting. Thus, 0=instant, 1=fastest slew, 9=slowest slew. Conductor Controls: The two lines of controls at the top of the Play page are mostly for the stage sequencer. You can and probably should spend much time with Melodia without ever using the stage sequencer. But once you have mastered the basics, you will find that these controls will give you the tools to turn what was perhaps an interesting pattern into a complete composition. The idea behind the stage sequencer is to give you tools to progressively alter your music in stages that can smoothly transition from one to the next. There are up to 64 stages, each of which can last from 1 to 999 measures. You build your composition by developing your musical themes, then by copying each stage to the next, and modifying that in some way. Turn voices on, fade others out, change modulation, musical themes, etc. At any time you can insert copies of earlier stages, delete stages, and so on. Then, when you click on the Strt control, the stages will play, each for the number of measures you have specified, from start to finish. The main stage controls are the top line Strt, Stop, and Cont commands and the blue Stage control, plus the measure control. Before you can use the stage sequencer, you have to dial in the number of measures you want a stage to play. You do this by dialing a number into the rightmost green control on the second line that initially says "M=Stop." Dial to the right for a measure count, dial to the left for Stop, Exit, or Loop. When in the default Stop mode, Melodia plays the current stage until you select Halt or exit the program. Stop doesn't stop playing, it simply stops advancing stages. Halt, on the line below, stops and starts playing. Exit is the same as Stop, except it will also exit the program. It will only Exit the program if two conditions are met. First, you need to be in Play or Cont, second you need to have opened Melodia with a filename at the command line: MS MYMUSIC. By selecting Exit instead of Stop, when you load it with a file name as described above, it will start playing as soon as it is called, and exit after it is finished; you can even set up a DOS batch file that will run a series of compositions automatically. To run several pieces from a batch file, save each piece so that it ends with Exit, then edit a text file (giving it an extension of ".bat") so that each line calls MS with the file you want to run. For example, edit a file named MYCOMP.BAT to look something like this: MS PART1 MS PART2 MS PART3 MS FINALE Use "Save As.." from the DOS text editor to give the file its name ("MYCOMP.BAT"). If you used the editor from the MS File menu it will normally be put into the WORK directory, which is a subdirectory of MS. The .BAT file has to be in the MS directory, which you can do with the DOS COPY command, or by giving it the MS directory name at the outset. Then, to run your batch file, simply type its name instead of MS. If this is all confusing to you, ask DOS for help. Type "help edit," "help copy," or simply "help." If you have DOS Version 5.0 or later, it will tell you about itself. For earlier versions you will have to consult the DOS manual. The light blue number just to the right of the measure control is the readout of the current measures played on the current stage. This is set to 0 when the stage is first entered, and starts counting up according to the values defined in the tempo and time signature. Tempo, just to the right of Halt, selects the musical tempo in quarter notes per minute. The time signature selects the number of beats per measure / the note value of the beat. The default of 4/4 is four quarter notes per measure. 3/4 would be 3 quarter notes per measure. 2/8 is two eighth notes per measure. When you change these values, it will affect the total playing time of your piece. This will be indicated by the changed total time indicator on the far right of the line. To the right of the time signature is the Dots control. This turns the write protect dots on and off all at a time. The write protect dots are the little green dots just to the left of each voice line and each of the process and clock lines on the Compose page. When on (high yellow), the line is protected from being changed by Pop Top and Prev. You can use Dots to turn them all on or off, then click on the individual dots to selectively flip them. Pop, Top, and Prev are all ways to copy a previous stage onto the current one. To use Pop or Top, you will first have to Push a stage onto the stage stack. Then you can fetch it with Pop, or copy it with Top. Prev simply copies the previous stage, and is perhaps the most useful of these. Compose Page: There are two parts to the Compose page. The Process modules take up the top three fourths of the page, the Clock modules are on the bottom quarter. Clocks: As the name implies, the clocks control the timing of events. The most obvious event is a note turning on and producing sound. But some other process are also clocked - that is, the process waits until a clock ticks before producing a new value. Although the default setup runs all processes with the same clock, you should experiment with setting different clocks and different clock rates. The clocks are labeled with the red letters A - L. For the first four clocks, A-D, there are two identical clocks modules per clock beat. Both of the A clocks combine to give the A clock beat, and so on for B, C, and D. You can build complex polyrhythms by setting the individual clock modules to different rates. Clocks E - L are single module clocks. Each clock has a rate of 0 (off) to 384 (4 whole notes). These are relative clock ticks, not actual time values. For example a quarter note is always 24 ticks, an eighth note 12 ticks, and so on. The actual duration of a quarter note is set by the Tempo; however long the duration is, an eighth note will always be half that. The green controls labeled "No(te)" allow you to dial in standard note values for 32nd through Double Whole notes. You can also dial in the actual clock rate ("Rt"). Which ever one you dial, the other will also read out. If you dial a rate of 6, the note readout will say "Sn," for Sixteenth note. Dial 7, and the readout is "??," meaning there is no standard note value for that clock rate; dial 8, and the note readout becomes "E3," meaning Eighth note triplets; dial 9 and you get "S." a dotted Sixteenth note. The fastest clock rate you can dial is note value "T3," or rate of 2. This is one tick on and one tick off, two ticks total. The note value is a 32nd triplet ("T3"). Dialing a rate either of 0 or 1 effectively turns off the clock: from the No(te) column, you can dial a note value of "--" which is rate 0, which is off. In addition to the clock note value/rate, you can also control the note delay time and the sustain time. Both of these values are in percentage of total note time. Delay ("Dl") sets the time delay for when the clock is turned on. Sustain ("Su") sets how long the clock will remain on vs. how long it will be off. Clocks will always be on for at least one tick, and off for at least one tick. In the case of a clock rate of 2, that is all there is, and delay and sustain controls have no meaning. For all other clock rates, the delay value is calculated as the number of ticks before the clock will turn on, then the sustain is the number of ticks it will remain on. If the total of sustain plus delay exceeds 100%, the sustain is shortened appropriately. For example if a clock is set to a rate of 24 (a quarter note), the delay is set to 25 and the sustain is set to 50, the clock will remain off for 6 ticks (25% delay) then go on for 12 ticks (50% sustain) then go off for an additional 6 ticks (what's left). Increase the delay to 75 percent and the clock will stay off for the first 18 ticks, then go on for 5 ticks and off for the last tick. There are two additional, hidden clocks. The 13h clock, called "M" (A-L, then M and N) is the measure clock. It will go on for one clock tick at the start of a measure. At the default time signature of 4/4, this is the same a whole note. The 14th clock, "N," is the maximum rate clock. It is the same as a 32nd note triplet, a clock rate of 2. Processes: On the top 3/4th of the Compose page, each of the highlighted magenta (purple) labels are processes that may be dialed as connections in many value inputs. Connections are indicated by the value turning from a white number to a green label. The documentation line, which appears when you click on the right mouse button, will indicate whether an input can be a connection. The letter part of the label will be the first character of one of the process labels plus a number to indicate which particular process is being connected. If an input is a connection, the process module indicated by the label becomes the value of the input. For example, the Kb input of the first voice in the Play page defaults to green R4. This means that the output from Random generator #4, a number from 0 to 24 in the default setting, will be sent to the voice. If you dial voice #1's Kb connection to the right it will pass through other connection labels and eventually become a white numerical value. At a glance, the processes are: Bsq (B1 - B8): Bank Sequencers Ctl (C1 - C4): Control values Fol (F1 - F4): Follow processors Ran (R1 - R8): Random generators Ssq (S1 - S8): Switch Sequencers Tst (T1 - T4): Test processors All of the processes end in the same way: an offset value/connection followed by a Note/Value output readout. The offset (indicated by the + icon at the top of the column) adds the value or connection to the process just before it is sent to the output. The N/V column is a readout of the final result of the process, either in note or numerical readout. The process result is not changed in any way by switching from N to V: it is always seen as a numerical value to whatever is reading it. Ssq - Switch Sequencer: Each of the 16 steps in this sequencer can be either a value or a connection. When a stage is set to a value, the process acts like a simple sequencer; when a stage is set to a connection, the process acts like a switch. To set a stage input, turn the step direction (the green icon just to the right of the clock selector) to off. Dial all the way to the left, to the little green square icon. Then select a stage by sliding the number value on the blue slider area. 0=first stage, 1=2nd stage, etc. At the # input just to the right of the slider, dial in a value or - by moving the mouse far left - dial in a connection. Select the next stage with the stage slider and repeat. Ran - Random generator This processor will generate a new random value each time the clock ticks, then add up to two other values or connections to it. If you set the random limit value to 0, the random process is disabled and you have a two input mixer. The 4th Ran processor has a special use. It is the input to the "R" bank copy in the File menu. This will be covered in greater detail in the File menu section. R4 is also unique in its ability to generate values limited to the C major and C minor scales. The green icon to the left of the magenta 4 at the beginning of the processor controls this. Click on it to switch between major and minor scale, or no scale (no change of the input). This effect is done after the offset is added, so you can optionally disable the random number by setting the limit to 0, and use the offset as an input to any other processor, which will then be converted to the scale. Random generators R5-R8 have no control inputs and therefore do not appear on the screen, only the output connections are accessible. These connections deliver a new random number in the range of 0-63 every computer cycle. Since all clocked processes only "look" when their clock ticks, the rapidly changing random numbers from R5-R8 are "sampled" as needed by these processors. Bsq - Bank Sequencer The basic function of the Bank Sequencer is simple: it reads a value that you have stored at a memory location. The various ways that you can read values and the ability to store information in an automated way gives the Bank Sequencer such great utility that it will likely become the process you depend on most. There are 10 memory banks, of 10,00 memory locations each. The "B" column specifies which bank a particular process will read from. Within that bank, the high and low address ("aH" & "aL") inputs select the memory cell that will be accessed or written to. Clocks treat the address high and address low as a single address of up to 10,000 cells. The actual range is from 0 to the address specified by the End button, the column of dots labeled "E." This defaults to 24, you can set it to any address by dialing that address into the high and low address inputs, then clicking on the End button. It will change from a large green dot to a bright yellow circle. Clocks can step the high and low address up, down, up & down, random or random up/down. Up (the up arrow) will increment the address up to and including the End address, then on the next clock tick it will reset the address to 0. Down (the down arrow) does the reverse, resetting after address 0 to the End address. Up/down (the up/down arrow) does both - the address will be incremented up through the End address, then it will decrement down to 0, then increment up, etc. Random (a question mark) will select a random address from within the range of 0 to the End address. Random up/down is a special case that works like up/down, except that it will switch directions at random times. That is, it does not quite count up to the End address, then down to 0, etc. Rather it counts up for a while, then down for a while, etc. The up down cycles are weighted to be more likely to continue on the current direction than to change directions at each clock cycle. This gives an up/down wandering that is more natural and melody-like. There are times when you might want the clock to increment in steps greater than 1. The DNA text is a good example of this. DNA text is set up as sequences of characters that are grouped in three's representing the amino acids produced by the DNA. Thus, to step through the DNA you would step in increments of three. The column labeled delta (triangle icon) allows you to do this by varying the step size from 0 to 15 steps at a time. Normally this is set to 1, but in the DNA example given above, you would set this to 3. The next column is the address offset. Usually you want the address given by the high and low address inputs. But when you are clocking multiple values such as the DNA example, you would set three processors to be exactly the same, including an offset of 3; then you would leave the first of these at offset 0, which means it reads at address given; and you would set the offset to the other two at 1 and 2, to read from the given address plus 1, and at the given address plus 2. The following formula calculates the actual address of a cell within the 100,000 cell range of the Bank Sequencer: cell = (bank x 10,000) + (address high x 100) + address low + offset Setting the Delta input at 0 is a special case. This disables the clock from changing the address and enables a connection in the address high and low inputs to change address. This is a subtle but powerful feature. It allows you to use the processor as a translator as well as a sequencer. For example, to generate a random value that gives random scale values, set the first 7 values to the 7 notes of a scale, set the random processor to a limit of 7, then dial a connection to that processor to the low address input, with Delta set to 0. Unless Delta is 0, you cannot dial connections - the addresses will stop at 0. When you use connections as addresses, the End address is ignored. Any location can be addressed by combinations of high and low address input connections. You effectively have 100 sub-banks of 100 locations. The three digit readout (# icon) gives you access to the addressed memory cell. It is the contents of the cell when you read it; when you dial in a value it changes the cell to that value. If you dial left past 0, the cell becomes a connection. Fol - Follow processor: The Follow processor attempts to catch up with the input value (arrow icon). At each clock step the processor generates a value that is one step closer to the input, plus the offset (+ icon) value, minus the negative offset (- icon). By not changing the Follow input, you can use this processor simply to subtract values. Ctl - Control processor: This is essentially the same as the Volume control in the Play page. Whatever value you set in the Amount slider gets added to the offset and sent to the N/V. If you set the slew level to 0, the output is updated instantly, any other number causes the output to change over time, with higher numbers changing more slowly. Tst - Test processor: The Test processor is a switch between two inputs, with the output determined by a test of two other inputs. The inputs labeled #A and #B are the test inputs. The green icon between them, labeled T for Test, determines the test, and the output is switched from either the Y (Yes) column or the N (No) column, depending on the test results. Possible tests are: greater than, greater than or equal to, equal, less than or equal to, less than, not equal. File Menu: At its most basic level, the File menu lets you load and save a piece of music, and it lets you exit the program. Even these functions can be ignored if you wish. You can exit simply by typing the ESC key. If you have modified your music in any way, you will be notified, and you can type "S" to Save or "D" to Discard, or you can select those choices with the mouse from the pop up box. Unless you have changed the current name, your music will be given the name "Default." Next time you enter Melodia, your music will automatically be loaded. To give maximum flexibility, Melodia uses several different types of data files; to make it easy to use, different files are handled as a group by the File Menu. If you prefer, you can ignore the distinction and the program will keep track of everything automatically. Save: The Save box at the upper left of the File menu can be clicked to save your work at any time. If there is a check mark in front of Save, the file had been modified, a dot means no modification has been made since the last Save. You can click on the check mark to force it on or off. If you change a check to a dot, you will not be asked to save your file when you exit unless you make new changes to it. Be careful with this, as it could cause you to lose work. Erase: Erase will erase the music files associated with the current name. It will ask you for confirmation, giving you the name of the file set it is about to erase. If you select "OK," the files will be lost and you cannot recover them. You must always load the files into the workspace before you erase them. After you erase, the working name is set to "DEFAULT." Changing Save Name: The current working name is in the box under Save and Erase, in highlighted white text. You can change this by clicking on it and then typing a new name. If you type a DOS-illegal character, it will be changed to the $ character, which is legal for DOS filenames. If you hit a space, all characters past the space are erased. When you hit the Enter key, the new name will become your working name. If the previous workspace had been modified, you will be asked to Save or Discard it, then you will be asked whether to Load, Overwrite, or New. Load will load the existing file set, if none is found it will load the default setup. Overwrite will do nothing, so that the next time you Save, your current music will overwrite the old. It is like "Save as..." in the editor. New will erase the workspace so you have a new slate to work with. Loading Music Files: The names in the column under the current working name are music files that you can load. Click on them and they will load, after first giving you a chance to save the current workspace if it had been modified. If you have more saved files than can be seen in the box, you can scroll them with the green happy face icon on the right edge of the box. Three different files are required for a complete music workspace. These are: Instrument (.IBK) files that specify the names and parameters of the 128 instruments. These follow the same file format as the SoundBlaster .IBK files. Music (.MUS) files that set the values and connections of all 64 steps of the compose and play pages. Bank files (.BNK) that specify the data in the Bank Sequencers. Since the Bank Sequencer data area is quite large - 100,000 - bytes the bank files are normally compressed. If you want to save or load them in the uncompressed form, rename the files with an "@" as the first character of the name. After you have loaded such a file, Melodia will change the first character in the work name to "$" so that it will compress the bank when you save your work. This is to help you keep from running up your disk space unintentionally. Melodia always saves all three files, and when you load a workspace it loads all three files if it finds them. If it does not find a particular file, it will set that file's workspace to default. At any time, you can load a work file from another piece of music into your current work file. Do this by clicking on the names Instrument, Music, Bank, or Text in the box below the file area. Whichever name you click on will get a check mark and the file name area will change to show just those types of files. Click on the file name area to load that file into your current workspace, or click on the checked name to uncheck (cancel) it. Text Files: Text files are a special case. They are not actually part of the work file set. They are simply text files given the extension .TXT so that Melodia can recognize them. These files are loaded into the Bank Sequencer memory area in a special way. When you load a Text file, Melodia loads the unmodified text into Bank 2. The text is then munched on by the computer in a process called a histogram, in which the usage of each character is counted and the characters used most often are given more harmonic notes. This is put into Bank 0 in the major scale and Bank 1 in the minor scale. Bank 3 is set according to a different formula: yours. It only works if there is a value other than zero in one of the first two cells in bank 9. Since the default bank settings are 0-7 for the eight Bsq processors, you have to set the B column of one of the processors to 9 to see it. If Melodia finds something there, then bank 3 will be set accordingly. The most frequent character will be set ("mapped") in bank 3 to the value of the first cell in bank 9, the next most frequent character will be set to the value of the second cell in bank 9, and so on. Thus if you set the first 4 cells in bank 9 to 12, 7, 4, and 9 (musical intervals of an octave, perfect 5th, major 3rd, and major 6th), any text you load will be mapped into Bank 3 with every occurrence of the most often used character set to 12, every occurrence of the next most often used character set to 7, the next to 4 and the next to 9. Assuming all the other cells in bank 9 were left at 0, all other characters of your text will be mapped to 0 on Bank 3. You may use the DOS EDIT editor directly from Melodia to create and edit text files. Do this by clicking on the Edit command in the lower right of the Files Menu. Be sure to save the files with an extension of .TXT or Melodia won't recognize them. These files, as with all Melodia work files, must be in the WORK subdirectory. When you use Edit this is automatic. DNA Files: In addition to processing regular text, Melodia can also recognize DNA sequences in a text file. These are long sequences of the characters T, A, C, and G. Several DNA files have been supplied with Melodia, which are accessible by clicking a second time on "Text" in the file menu. "Text" will change to "DNA," and the file names in the file box will be changed from files that have the extension .TXT to those with extension .DNA. Any file Melodia loads that has a string of at least 9 of the DNA characters is recognized as a DNA file, whether it has a .TXT extension or a .DNA extension. DNA processing follows normal text processing, so the individual codons (the characters A, C, T, and G) will have intervals assigned to them just as normal text. Once a file is recognized as a DNA file, all the characters that are not part of the DNA string are removed. This is done before the histogram, so the discarded text will not alter the histogram. Next, the string is separated into "DNA chunks" of three characters each, which are then classified and assigned music intervals, octaves and pan settings according to which of the twenty amino acids the codon set produces. To view the specifics, and to change them, edit the text file "DNASET.DAT" in the MP (not MP/WORK) directory. It turns out that DNA sequences make rather nice and recognizable melodies, whether they are used directly or as source material. Although the background on using DNA is fairly dense, actually using is quite simple. When you load the Text file that has DNA strings, Melodia puts the DNA information into Bank 4 for the major key, and Bank 5 for the minor key. For every group of three DNA characters in the text banks, there is one associated protein data group of three cells in each of the DNA banks 4 and 5. The first cell is the musical interval associated with the protein, the second is the octave that is assigned according to the classification of the protein, and the third is a pan setting associated with the protein. So the most simple and direct way to use the DNA bank is to set up Bsq #1 in the normal way for using text, setting the "B" (bank) input to 0 for major key or 1 for minor key. Then set the next three Bsq B inputs to 4 (5 if minor key), set the deltas to 3 (so it counts by 3's), and set the 2nd and 3rd offsets to 1 and 2 respectively. Thus, Bsq #2 will get the pitch interval, Bsq #3 will get the octave (the interval + the octave will uniquely identify the protein), and Bsq #4 will get the pan. To be scientifically accurate use two clocks: The first connects to Bsq #1 and runs at a rate that is three times as fast as the second, which is connected to the other three Bsq's. Thus for every three codon values sequenced from B1, there will be one each of interval, octave, and pan for the associated protein that is contained in B2, B3, and B4. The octave and the interval were separated because you can use the octave to good effect for both the protein interval in B2 and the codon text interval in B1. Copying Data Banks: Bank data can be easily moved around from one bank to another. This is the number-arrow-number next to Bank in the file menu. Dial the source bank, the bank you want to copy from, into the first number; then dial the destination bank into the second number. When you click on the arrow the source bank is copied into the destination bank. Previous contents of the destination bank are lost. In addition to the 10 data banks, numbered 0-9, there are also four temporary holding banks, labeled A-D. These banks are not saved nor are the contents changed when a new bank or new text is loaded. When you load a new workspace or exit Melodia they are lost. You can use them to shuffle data from one file to another, to do multiple Text mappings, whatever. The final label on the source side of the arrow is R for Random. This is an unassuming little doorway into a very powerful feature of Melodia. By setting the source to R, the destination bank will be loaded from its current address to its End mark with the results of the R4 processor, calculated once for each step between the destination bank sequencer's current address and its end icon. Although you can use the R source to simply load the bank with random values, this is only the beginning of what can be done. The Ran limit value can be set to 0, turning off the random process but leaving the two offset inputs as a mixer. Thus, you can set up any process at all, however complex, and rout it through the offset inputs to R4 - which will then be calculated for each clock cycle and sent to the destination bank. By updating the current address and End address of the bank for consecutive "R" dumps, you can set multiple areas on the same bank. The only limitation is that R does not use clocks, rather it does a calculation of every processor for each step between the start and End addresses. This means you should test your runs by using the same clock rate for each process in the chain. If the End address is greater or equal to the start address, R does nothing. It is a good idea to check your address low and address high settings before using R. Usually you will want to set them to 0, to fill in the entire area between 0 and End. Speed Star: On very complex or very fast pieces a yellow star may start to blink in the lower right hand corner of the screen. This is an indication that your computer is running out of processing time. A little blink of the star from time to time is normal. However a steady showing indicates the timing is inaccurate and your music will likely run at a different speed on a faster computer. Reducing overall tempo (top of Play page), then increasing individual clock rates helps. About the Author: Melodia was written by John Dunn. John has been a pioneer in computer music and art since the 1970's when he combined microcomputers and analog sound and video synthesizers as a graduate student at the Art Institute of Chicago. He was one of the early programmers for Atari video games, and he developed the first ever professional paint program for a microcomputer, Cromemco's "Slidemaster," released in 1981. John went on to write a major paint program for the IBM-PC, called "Lumena," and founded Time Arts Inc. of Santa Rosa, California, to market "Computer Tools for Artists." In 1984 he wrote one of the first algorithmic composing programs for MIDI, "MusicBox," which was released with full source code to the public domain two years later. MusicBox is still available on CompuServe some and other data services that support MIDI. DISCLAIMER OF WARRANTY: THIS SOFTWARE IS SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE. Copyright Notice: Melodia is Copyright (c) 1993-1994 by John Dunn. All Rights Reserved. Forth nucleus Copyright 1989 LMI.