AlgoRhythms User Manual AlgoRhythms 2.0 Algorithmic Composition Software by Thomas E. Janzen AlgoRhythms 2.0 Copyright (c) 1990, 1991, 1992 Thomas E. Janzen 1-1-1992 Thomas E. Janzen makes no warranties, either expressed or implied, with respect to the software program recorded on the diskette or the instructions, their quality, performance, merchantability or fitness for any particular purpose. The program and instructions are distributed free "as is". The entire risk as to their quality and performance is with the user. In no event will Thomas E. Janzen be liable for direct, indirect, incidental or consequential damages resulting from any defect in the program or instructions, even if Thomas E. Janzen has been advised of the possibility of such damages. This software may be redistributed only intact with no change and only at no charge. Your comments about AlgoRhythms are very welcome as soon as you have tried the program. Your comments and questions about AlgoRhythms may be directed to: Thomas E. Janzen 58A School Street Apt. 2-L Hudson, MA 01749-2518 1 (508) 562-1295 Commodore (TM), Amiga (TM) are trademarks of Commodore Business Machines, Inc. MIDI is specified by the International MIDI Association (IMA). No part of this software may be used in whole or in part in other public domain or commercial software. No music produced by this program may be used for commercial purposes. INTRODUCTION Algorithmic composition software makes a computer into a composer. Algorithmic composition is at least 35 years old, first heard from LeJaren Hiller's Illiac Suite. Hiller's computer program wrote music in batch mode and printed it out as alpha-numeric characters, from which it was transcribed by hand onto music paper for performance by a human string quartet. In the 1960's, Greek composer Iannis Xenakis made many good modern pieces in a very formal way, and a few times used a computer to calculate the form of the piece, in a way closely related to the way that AlgoRhythms does. An alphnumeric print-out was transcribed for human players, as before. Many commercial programs for algorithmic composition have appeared recently, and usually develop melodic fragments to aid improvisation in pop music. Some can play MIDI instruments directly, and in real time. AlgoRhythms was written to avoid melodies and to avoid a regular beat. The concept of sinusoidally-varying formal parameters used by AlgoRhythms was developed in 1976 and used in two of my manually written piano pieces: "Animations" (1977) and "Lucy's Dance" (1982). Form files roughly reproducing these works are available with other examples of forms in the forms subdirectory. In AlgoRhythms, the computer chooses the pitches, durations, and dynamics (loudnesses) played to one MIDI channel so that a MIDI instrument can play the music that the Amiga "improvises." The user of the software chooses a shape for the piece. The shape of the piece is determined by how the pitches, durations, and dynamics slowly change with time while the music plays. AlgoRhythms plays music in real time while it makes choices of pitches, durations, and dynamics. The form files saved by this software are merely the parameters of the overall form of the piece, which are selected by the user. This program does not display the music in musical notation, but in a graphical notation instead. This program does not use the internal Amiga voices. It plays on up to 20 MIDI channels at a given time. This program does not receive MIDI data. It may be that in-coming data would make it crash. It is best not to have any incoming MIDI data. When the music starts, a MIDI Start command is sent. When the music is stopped by the Stop Command, a MIDI Stop command is sent. MIDI clock commands are sent about 25 times a second regardless of tempo, except when Pulse is set to zero (0), when no MIDI clocks are sent. AlgoRhythms was compiled with SAS/C.5.10b Compiler for AmigaDOS from SAS Institute, Inc. HARDWARE REQUIREMENTS AlgoRhythms probably would run on an Amiga with 512K bytes of memory. It was developed on a three mega-byte Amiga 500 with an ECE (TM) MIDI adaptor. The serial port is used to send MIDI data. Therefore a MIDI interface is required on the serial port. The serial device is not used in a shareable way by AlgoRhythms. A MIDI synthesizer must be connected to the MIDI interface. AlgoRhythms does not use internal Amiga voices. Note that AlgoRhythms uses MIDI Running status. This means that it sends out the MIDI channel (and Note On command) only when the channel changes, and when you use the Play and Continue commands. Therefore, your synthesizer must be turned on and have the correct MIDI channel selected before you use the Play or Continue commands, for AlgoRhythms to drive the synthesizer. If you forget to turn on your synth, just use the Stop and Continue commands, in that order. This will send a new status to alert your synth, if it is on the correct MIDI channel. RUNNING ALGORHYTHMS To run AlgoRhythms, click the right mouse button twice on the AlgoRhythms drawer, then click twice on the AlgoRhythms project icon. AlgoRhythms will create a window with a four-menu-strip menu, and draw a randomized starting form for the music. The beginning duration of the piece is ten minutes. The form that AlgoRhythms begins with is randomized, that is, pseudo-random numbers were used to select the periods and phases of the parameters, of which more later. The shape of the randomized form is drawn after AlgoRhythms is started. If you wish, you may play this randomized piece by selecting the Play menu item. Colors The file AlgoRhythms.Col should be in the same directory as AlgoRhythms. If it is, AlgoRhythms will read it and use it to determine screen colors. If the file is not present, default colors will be used. This file can be edited in a text editor to make custom colors. The format of the file is: R0 R1 R2 R3 R4 R4 R5 R6 R7 G0 G1 G2 G3 G4 G4 G5 G6 G7 B0 B1 B2 B3 B4 B4 B5 B6 B7 R, G and B are for for red, green and blue for 8 color registers; the number are in decimal. For example, the default colors currently: 4 15 12 7 8 15 0 15 0 15 0 9 15 15 0 0 4 15 0 15 0 15 0 15 AlgoRhythmsCLI AlgoRhythmsCLI has not been rebuilt for AlgoRhythms 2.0, plays only 16 voices, and at a lower rate than AlgoRhythms 2.0. AlgoRhythmsCLI is a CLI-only version of AlgoRhythms. It enables you to run a script file under the command line interface that plays several forms in sequence without interruption or intervention. To use this version, make the AlgoRhythms directory your default or add it to the paths, and type: 1>AlgoRhythmsCLI /forms/Animations.form This will play the Animations form in the forms subdirectory. There is no way to stop AlgoRhythmsCLI once it has started without rebooting, so be certain of what you want before starting it. USING ALGORHYTHMS The AlgoRhythms window is a Workbench window that can be re- sized. When the window is re-sized using the sizing gadget with the mouse, the graphical form curves are refreshed in the new proportions. If the close gadget is used, all playing activity is stopped and the program terminates. The front-to-back gadget works normally. The drag gadget is useful for moving the window if it is small enough to move inside the screen. THE ALGORHYTHMS MENU There are three menu strips in the AlgoRhythms menu. All of the menu selections are available whether or not music is playing. If they were all visible at once, they would look a little like this: Projects Form Scales Voices Play A-P Max Voices A-V TranspositionA-T Voice 0 Stop A-S ReDraw A-R Chromatic Voice 1 Continue A-C Pulse A-N Short Pentatonic Voice 2 Load Form A-L Duration A-D hira joshi Voice 3 Save Form A-F Pitch kumoi joshi Voice 4 Record A-I Rhythm kokin joshi Voice 5 Erase A-E Dynamics Whole Tone Voice 6 Save MIDI A-M Texture Diatonic Voice 7 About A-A Note Length Harmonic Minor Voice 8 Quit A-Q Hungarian Minor Voice 9 Diminished Voice 10 Long Pentatonic Voice 11 Mode 3 Voice 12 Mode 4 Voice 13 Mode 5 Voice 14 Mode 6 Voice 15 Mode 7 Voice 16 m3 M2 Voice 17 M3 m2 Voice 18 Quartal Voice 19 Quintal In addition, some Form menu strip items have sub menus. Pitch, Rhythm, and Dynamics have the following sub-menu: Mean Period Mean Phase Spread Period Spread Phase Randomize Texture has the sub-menu: Spread Period Spread Phase Randomize The Note Length item has the sub-menu: Minimum Maximum The Projects Menu Play A-P If you select the Play function with the mouse or by hitting the Right Amiga key and the "P" key, the music will start playing via the serial port. In addition, a line will be drawn along the Pitch curve to show time passing as the piece progresses. Before starting to play, AlgoRhythms sends a MIDI Start command. This is useful for recording AlgoRhythms with a MIDI sequencer. Notes are played with the MIDI Note On command. Before a new note is sent out to an AlgoRhythms voice, a Note Off command is sent to stop the previous note. MIDI clock commands are sent about 25 times a second regardless of the setting of Pulse. Stop A-S If you select the Stop function with the mouse or by hitting the Right Amiga key and the "S" key, the music will stop playing if it had been playing. MIDI Note Off commands are sent to notes that were on when you activated the Stop function. After all notes are stopped, a MIDI Stop command is sent. Continue A-C If you select the Continue function with the mouse or by hitting the Right Amiga key and the "C" key, the music will continue in the graph where it left off when you hit "Stop." A MIDI Continue command will be sent. Load A-L If you select the Load function with the mouse or by hitting the Right Amiga key and the "L" key, a file requester will appear. If your libs: directory includes req.library from ReqLib by Colin Fox and Bruce Dawson (cf. AmigaLibDisk 400), a full file requester will appear; otherwise, a simple string gadget will appear. If you do not have req.library, don't forget to list the forms subdirectory to see what forms have been provided. AlgoRhythms does not read or write SMUS files or read MIDI files. AlgoRhythms form files are summaries of the form or shape of the piece selected in the Form and Scales menu strips. Because form files are text files, you can edit them in a text editor and load them, but they must be in the exact form below. Form files may not have comments. The comments below are tutorial. 600.00 -- duration of the piece, in seconds 0.0 -- minimum duration for any note 2.0 -- maximum duration for any note 13 -- number of notes in the scale 48 -- the MIDI note numbers of the scale pitches 50 53 55 58 60 62 65 67 70 72 74 77 16 -- maximum number of voices playing at once 10 -- pulses per second 200.00 Pitch form -- Mean period in seconds -1.57 -- starting phase of mean in radians 200.00 -- Spread period in seconds -1.57 -- Spread starting phase in radians 200.00 Rhythm form -- Mean period in seconds 1.57 -- starting phase of mean in radians 200.00 -- Spread period in seconds -1.57 -- spread starting phase in radians 200.00 Dynamics form -- Mean period in seconds -1.57 -- starting phase of mean in radian 200.00 -- Spread period in seconds -1.57 -- spread starting phase in radians 200.00 Texture form -- Spread period in seconds -1.57 -- starting phase of spread in radians 24 96 0 1 Low Pitch, High Pitch, MIDI Channel, Walking 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 24 96 0 1 The last 20 lines give the lowest pitch, highest pitch, MIDI channel (of 0 to 15) and walking (walking=1; not walking=0) for each of the AlgoRhythms voices. These can be changed while the program is running. The lowest pitch is the lowest pitch allowed in the voice. This helps you avoid having AlgoRhythms play pitches that do not sound good for a particular sample, for example. If the voice is walking up and down the scale, it will turn around at the lowest pitch and highest pitch and head back towards the middle of the range of the instrument. If the voice is playing random notes, It will simply not play notes that are out of range, defined by the lowest note and highest note. The voice will rest for the duration of the out-of-range note. Loading edited files affords the opportunity of loading scales other than the scales in the scales menu. Transposition works on imported scales. If you select the Load function and the file does not exist, the screen will flash and a tone will beep. The form will not change. There are several example form files in the forms subdirectry. AlgoRhythms/Forms/ animations.form arctan.form circle.form cosine.form fastwalk.form loud.form lucy.form mean.form normdist.form range.form sine.form stddev.form tan.form tests.form variance.form Gamelan.form The names of the form files have no special meaning, except that Animations.form and Lucy.form represent recreations of the original works to use the formal techniques used in AlgoRhythms. Save A-F If you select the Save function with the mouse or by hitting the Right Amiga key and the "F" key, a file requester will appear into which you may type a file name for saving the form file, described above. A name similar to "file.form" is recommended. Record A-I If you select the Record function with the mouse or by hitting the Right Amiga key and the "I" key, AlgoRhythms makes an internal recording of the note events of everything it plays. It dynamically allocates memory until it runs out of memory, when it disables further recording. Erase A-E Erase clears out the recording memory activated by the Record function, above. It frees up memory in your Amiga for other applications or for more recording. Save MIDI A-M If you select the Save MIDI function with the mouse or by hitting the Right Amiga key and the "M" key, you can save a standard MIDI file of the recording made by AlgoRhythms of its own output. This MIDI file can then be loaded into commercial MIDI software packages, such as sequencers, editors, and score printers. If you have a score printing program, you could print an AlgoRhythms-created MIDI file, so that human performers could play the music composed by AlgoRhythms. You will probably find, however, that in order to make a human-playable score with AlgoRhythms, you should use AlgoRhythms voice parameters to carefully limit the pitch range for each channel, separate the players by MIDI channel, and use a commercial sequencing program to quantize rhythms and line them up with measure bars. The MIDI files created by AlgoRhythms always use 240 ticks per quarter note, and a metronome marking of 60 quarters per minute. This usually will not line up with the Pulse setting, so a good sequencer program is needed to expand/compress the note values to match a tempo marking before a neat score can be printed. The file is a type 1 (multitrack) file with one track. The track name is, roughly, "AlgoRhythms by Tom Janzen." If you wish to print a score with separate staffs, you will have to assign a different MIDI channel to voices in AlgoRhythms, and separate the channels into different tracks in the MIDI sequencer. About A-A If you select the About function with the mouse or by hitting the Right Amiga key and the "A" key, you will see a copyright notice for AlgoRhythms. Quit A-Q If you select the Quit function with the mouse or by hitting the Right Amiga key and the "Q" key, or hit the window close gadget, the music will stop and AlgoRhythms will exit. Form Menu Max Voices A-V If you select the Max Voices function with the mouse or by hitting the Right Amiga key and the "V" key, a requester with a string gadget will appear into which you can type a number from 1 to 20 for the maximum number of voices to be playing, when the waveform for Texture is at its peak. Voice 0 always plays. The low-numbered AlgoRhythms voices have precedence. If you specify three voices, voices 0, 1, and 2 play, for example. ReDraw A-R If you select the ReDraw function with the mouse or by hitting the Right Amiga key and the "R" key, the graphical representation of the form of the music will be refreshed in the AlgoRhythms window. This is useful for showing the new form after Form parameters have been changed. Pulse A-N If you select the Pulse function with the mouse or by hitting the Right Amiga key and the "N" key, a requester with a string gadget will appear into which you can type the number of pulses per second that the music should have. Values from 5 to 12 make a real difference. Numbers over 20 have little effect. Numbers over 25 would have no effect at all. Entering a zero would eliminate quantization, and the rhythm would be very fluid (also AlgoRhythms takes much more of the CPU resource from the operating system). The actual tempo lags behind the pulse setting somewhat, but this has not been characterized. Casual measurements give 6 pulses per second when 8 is chosen, and higher values seem to lag to an even greater extent. MIDI Timing Clocks are sent about 25 times a second regardless of tempo unless Pulse is set to zero, in which case no Timing Clocks are sent. Duration A-D If you select the Duration function with the mouse or by hitting the Right Amiga key and the "D" key, a requester with a string gadget will appear allowing you to enter a duration, in seconds, for the piece of music. After the music plays for this duration, the music stops. You may set any length from zero up. Pitch If you select the Pitch function with the mouse, you will activate the Pitch sub-menu. This sub-menu is the heart of the form-controlling technique used by AlgoRhythms, and is used for Rhythm and Dynamics as well. The menu items are: Mean Period Mean Phase Spread Period Spread Phase Randomize The "Periods" of the Mean and Spread are in seconds. The phases are angles. Mean Period The Mean Period is the period of the sine-wave oscillation of the rough mean value. For the Pitch menu-item, Mean Period is the length of the cycle through which the mean value for pitch moves. A sine-wave moves up and down gradually with time: ** ** * * * * * * * * ** ** The wave is shown with phase zero. Here is a sine-wave with different phases, in radians: 1 * pi radians: ** * * * * * * ** ** .5 * pi radians: * ** * * * * * * ** ** -0.5 * pi radians: ** * * * * * ** There are 2 * pi (6.28...) radians in a circle. 1 * pi (3.14159...) radians is a semi-circle. The proportional gadget for entering phase is a horizontal slider. Zero phase is in the center. Pi radians (half circle) is all the way to the right and minus Pi radians is all the way to the left. If you enter a period of 180 seconds, it will take the mean pitch three minutes to move all the way up and down the range of the scale before returning to the beginning phase. If you enter 10000 seconds for the period, the mean pitch will virtually not change at all. Sometimes you will want a form parameter to remain at one value; this is the way to do it. The equation for pitch without any spread is: pitchpoint = sin( 2 * pi * time / period + phase) pitch_index= (pitchpoint + 1) * scale_range pitch=scale(pitch_index) Spread gives a range from which the pitch is chosen using random numbers. Any pitch in the range set by the spread is allowed. Like mean values, spread has a period and starting phase. When spread is high, any pitch within the scale could be used (if mean is in the middle of the scale). When spread is low, you will hear a repeated pitch resulting from only the pitch mean and phase. If you use the walking option, none of the Pitch form parameters affect the music at all. Let's say that you set the periods of mean pitch and pitch spread to be the same, perhaps 120 seconds (two minutes), and you set the starting phase of the mean pitch to be zero, and the starting phase of the pitch spread to be zero, the separate waveforms could look like this: Mean Pitch: 120" ** * * * * * * ** Pitch Spread: ** * * * * * * ** In the graphical representation on the AlgoRhythms window, the pitch form would be respresented like this: ** ***** * * ** * ** ** This form makes the piece begin with pitches in the middle of the scale, and gradually raise in average pitch, while at the same time using a wider and wider range of pitches, until 30 seconds into the piece when the whole top of the scale is being used. Then the mean pitch falls until 1:30 into the piece when it plays only a few very low pitches. If you use the Randomize sub-item, the parameter will be randomized. Use ReDraw to see what values were chosen. The two periods will be about a couple minutes long, and the two phases could be anything from -pi to +pi. Rhythm If you select the Rhythm function with the mouse, you will activate the Rhythm sub-menu. The Rhythm sub-menu works exactly like the Pitch sub-menu. Note that the unit is time. The higher the Rhythm graph is, the longer the notes are, and the slower the music is. The wider the Rhythm graph, the greater variety of durations. If the Rhythm graph is narrow, the beat is more regular, but the voices may not play together. To get voices to play together, set the Pulse parameter (above). Dynamics If you select the Dynamics function with the mouse, you will activate the Dynamics sub-menu. Dynamics form works exactly like Pitch form and Rhythm form. The higher the graph, the louder the music. The wider the curve, the greater variety of loudnesses will be heard. A variety of dynamics tends to sound more human and rhythmic, as opposed to a single loudness level, which sounds mechanical. Texture If you select the Texture function with the mouse, you will activate the Texture sub-menu. Texture form does not have a mean, it has only spread period and spread phase. As the spread of the texture graph is greater, more voices (up to Max Voices) play. Voice priority is from voice zero up. That is, voice 0 always plays, so the MIDI channel assigned to voice 0 always plays. Voice one is selected next, two after that, and so on. Note Length If you select the Note Length menu item with the mouse, you will activate the Note Length sub-menu. Use the mouse to select the either "Minimum" or "Maximum" from the sub-menu. Type a length of time in seconds into the string gadget in the requester to set the mininum length of time a note may last or the maximum length of time a note may last. The random duration of a note is chosen in the range set by the minimum and maximum note length. The purpose of this was to allow synthesizer voices with long attacks to speak fully before ending, even if the rhythm form specified short notes. Setting the minimum note length to a few seconds and the maximum note length to something longer allows you to make slow music with long gentle attacks, decays, and releases. Scales Menu If you select a scale in the Scales menu, that scale immediately takes effect in the music. The long scales range from MIDI pitch 24 to just below 108. The short scales range about a fifth below middle C to about a twelfth above middle C. If you need more detail about these scales, see the Scales.c source code in the AlgoRhythms/source/ subdirectory. Note that you can create new scales by editing them (as MIDI note numbers) into a form file and loading the form file. See the section above on form file format. Transposition A-T If you select the Transposition item with the mouse or by hitting the Right-Amiga key and the "T" key, a requester with a string gadget will appear, permitting you to enter the number of half-steps to transpose the scale. This takes effect immediately. For example, if AlgoRhythms is playing in the diatonic scale, and you use Tranposition to tranpose the scale by +3 steps, the new scale will correspond to E-flat major instead of C-major. Chromatic This long scale is a chromatic scale of over six octaves from MIDI 24 to 107. Short Pentatonic This short scale is a pentatonic scale from the C below middle-C to the F an eleventh above middle-C, including C, D, F, G, B-flat. hira joshi kumoi joshi kokin joshi These short scales are tunings of the classical Japanese instruments, the koto. Whole Tone This long scale is a long scale including only C, D, E, F#, G#, A#. Diatonic This long scale is the white keys of the piano, which corresponds to C-major. Harmonic Minor This long scale, in C, consists of C, D, E-flat, F, G, A- flat, B. Hungarian Minor This long scale, in C, consists of C, D, E-flat, F#, G, A- flat, B. Diminished This long scale consists of C, D, E-flat, F, F#, G#, A, B. Long Pentatonic This long scale consists of C, D, F, G, B-flat. Mode 3 This is a long scale from Olivier Messiean's book "Technique of My Musical Language." Messiean designates it as mode number 3. The notes are C, D, Eb, E, F#, G, Ab, Bb, B. Mode 4 This is another long scale from Olivier Messiean's book. Messiean designates it as mode number 4. The notes are C, Db, D, F, F#, G, Ab, B. Mode 5 This is another long scale from Olivier Messiean's book. Messiean designates it as mode number 5. The notes are C, Db, F, Gb, F, B. Mode 6 This is another long scale from Olivier Messiean's book. Messiean designates it as mode number 4. The notes are C, D, E, F F#, G#, A#, B. Mode 7 This is another long scale from Olivier Messiean's book. Messiean designates it as mode number 7. The notes are C, Db, D, Eb, F, F#, G, F#, A, B. m3 M2 This is a long scale from 24 to 96 that does not repeat each octave. As it rises from note number 24, it alternates minor third, major second, minor third, major second, minor third, major second, and so on. M3 m2 This is a long scale from 24 to under 96 that does not repeat each octave. As it rises from note number 24, it alternates major third, minor second, major third, minor second, and so on. Quartal This is a long scale of all perfect fourths, rising, and does not repeat every octave of course. Quintal This is a long scale of all perfect fifths, rising, and does not repeat every octave, of course. Voices Menu When you select the Voices menu, you see 20 voices, 0 through 19. These are AlgoRhythms voices, not voices on your synthesizer. Selecting a channel number for each voice activates a requester that permits set-up for a voice: High Note WALKING ____C7_______ Low Note CANCEL ____C1_______ Channel OK ____0________ Voice Parameters "High Note" and "Low Note" define the range allowed in the voice. As explained before, a voice will not play out-of-range notes in random mode, and turns back from range boundaries in walk mode. Note that, in random notes (non-walking) mode, if your current scale has a broader range than the AlgoRhythms voices (set with High Note and Low Note), AlgoRhythms may go silent because it is selecting notes that are out of range for the voices. This is likely to happen when the pitch curve is very thin and very high. In such an instance, wait a minute for the music to return. Otherwise, stop and re-arrange parameters and ranges to avoid this situation. Click the right mouse button over the String Gadget for High Note or Low Note, and type in the note and octave, for example: C7, C#7, Db6, Ab5 are note names suitable for High Note. c0, C#1, eb2, G#3, Fb3 are suitable for Low Note. Note that C4 is middle C (ca. 261 Hz) and that the flat sign is just a 'b' or 'B' (bravo), and the sharp sign is a pound sign. In the integer gadget used for channel number, you may enter the MIDI channel you want that voice to play to. This permits separate voices to play on separate synthesizer sounds. Only the number of voices 0 to max_voices-1 (selected in the Forms menu) will play. If you wish to hear all the voices when different channels are assigned, use "OMNI ON" on your synthesizer. Any AlgoRhythms voice may be set to any MIDI channel. Two different voices may be set to the same MIDI channel. When AlgoRhythms starts, all voices are assigned to MIDI channel 0 (of 0 to 15, or channel 1 of 1 to 16). If you select the Walking item with the mouse, the voice will toggle back and forth between playing random notes in the scale, or playing notes adjacent to the last note played in each voice. A mathematical random walk allows a drunk to take any sized step in any direction. AlgoRhythms uses a walk that can do three things: it can go up a step, down a step, or not move. When the walk comes to a voice's Low Note or High Note, it turns back in the other direction. A walking voice completely disregards the Pitch form curve. Graphic output AlgoRhythms draws a graphic representation of the shape or form of the piece to be played. In the drawing there are four waveforms labeled "Pitch," "Rhythm," "Dynamics," and "Texture." As the music plays, you will see a time line move across the Pitch curve. Note the following: The higher the pitch curve, the higher the pitch (unless walking). The thicker the pitch curve, the wider the range playing (within the voice's range). The higher the Rhythm curve, the slower the music plays. The thicker the Rhythm curve, the less regular the music is. The higher the Dynamic curve, the louder the music. The thicker the Dynamic curve, the more variety in dynamics, i.e., the more accented the music sounds. The thicker the Texture curve, the more voices play, to max_voice. Getting Good Music from AlgoRhythms It is possible for AlgoRhythms to produce music which is fairly pretty, and even somewhat human-like. The music can sound as though someone is idly improvising with no pretense to melodic development. The music can sound pretty due to the "windchime effect." Windchimes with a pretty scale will produce euphony regardless of how the wind hits the chimes. The prettiest scales in AlgoRhythms are the Pentatonic scales and the hira joshi scale. In addition, by using the "walking" pitch selection, the pitches roam up and down the scale, sounding vaguely melodic. Using the Short_Pentatonic scale with walking pitch selection can produce surprisingly human results. Wider spreads of dynamics also sound more accented and rhythmic. The whole-tone scale is also fairly pretty regardless of what is played. This scale was common in French Impressionism, especially in works of Debussy. Because voice number zero has precedence, it amounts to the solo voice. The other voices function usually as accompaniment, at times overtaking the solo. Therefore, if you use multiple synthesizer voices, you may wish to assign voice zero to a soloist voice, such as a saxophone, trumpet, clarinet, or electric guitar. The middle voices (remember that you a limited by how you set max_voice) could be accompaniment instruments such as guitar, piano, and even drums. The last voices (close to max_voice) could be unusual voices that add surprising colors once in a while, because they only play when the texture curve is very thick. The sinusoid form curves used by AlgoRhythms were developed for controlling musical form by the author in 1976. The purpose was to answer the question: how can music be organized if there are no high-Q, narrow-bandwidth, musical pitches in the music? The history of Western classical music has been the history of organizing sound by pitch. Counterpoint, harmony and melodic studies were the center of musical developement for hundreds of years because the instruments used made clear pitches of narrow bandwidth. What if we used instruments of low-Q, higher bandwidth sounds? For example, filtered white noise, such as ocean surf sounds, wind sounds, drum sounds, and so on, can not be organized using either Bach's counterpoint, tonal harmony, or Schoenberg's serial technique. (It took Boulez and Stockhausen to try to arrange percussion sounds in a serial fashion.) Nevertheless, such sounds can be high or low, fast or slow, and loud or soft. I came on the idea of slowly changing the character of the music by curves that created gradual changes that never stayed in one character of music for very long. The mean and range of pitch, pace, and dynamic, were graphed on paper in 1976 almost exactly as AlgoRhythms graphs them. My musical taste at the time called for fluid non-regular rhythm, non-motivic wanderings, and gradually changing character of music. The purpose of AlgoRhythms is to implement this approach to organizing sound, even though, most of the time, it is used with high-Q musical sounds from MIDI instruments. Playing the provided form 20fastwalk.form, AlgoRhythms can play 330 notes per second. That's 660 note on's, half with a zero dynamic to turn off notes. One voice alone in this form (setting Max Voices to 1), plays about 68 notes per second. BIBLIOGRAPHY Bolognesi, T. 1983. "Automatic Composition: Experiments with Self-Similar Music." Computer Music Journal 7(1):25-36 De Furia, Steve, and Scacciaferro, Joe. 1989. MIDI Programmer's Handbook. M & T Books. Redwood City, California. Fox, Colin; Dawson, Bruce. "ReqLib." AmigaLibDisk 400. Fred Fish, ed. Tempe, AZ. 1990. Janzen, Thomas E. "AlgoRhythms." AmigaLibDisk356. Fred Fish, ed. Tempe, AZ. 1990. Janzen, Thomas E. "AlgoRhythms: Automatic Composition for a Personal Computer." IEEE Tutorial: Computer Generated Music. 1992. IEEE Press. Denis Baggi, ed. Janzen, Thomas E. "Categories of Aesthetic Appeal in Computer Music." M.I.T. Computer Music Journal 10(3), included in On the Wires of Our Nerves Heifetz, ed., Buchnell U. Press 1989 Messiean, Olivier Technique of My Musical Language. Myhill, John. 1979. "Controlled Indeterminacy: A First Step Toward a Semistochastic Music Language." M.I.T. Computer Music Journal 3(3). Included in Foundations of Computer Music, Roads and Strawn, ed. M.I.T. Press, Cambridge, 1985. Xenakis, I. 1971. Formalized Music. Bloomington: Indiana University Press. Thanks to Len Fehskens and Jack Deckard for performing initial test and offering practical suggetions, resulting in many improvements and features. APPENDIX Note Names and MIDI Numbers MIDI Pitch Frequency 12 C 0 16.35 13 C#0 17.32 14 D 0 18.35 15 D#0 19.45 16 E 0 20.60 17 F 0 21.83 18 F#0 23.12 19 G 0 24.50 20 G#0 25.96 21 A 0 27.50 22 A#0 29.14 23 B 0 30.87 24 C 1 32.70 25 C#1 34.65 26 D 1 36.71 27 D#1 38.89 28 E 1 41.20 29 F 1 43.65 30 F#1 46.25 31 G 1 49.00 32 G#1 51.91 33 A 1 55.00 34 A#1 58.27 35 B 1 61.74 36 C 2 65.41 37 C#2 69.30 38 D 2 73.42 39 D#2 77.78 40 E 2 82.41 41 F 2 87.31 42 F#2 92.50 43 G 2 98.00 44 G#2 103.83 45 A 2 110.00 46 A#2 116.54 47 B 2 123.47 48 C 3 130.81 49 C#3 138.59 50 D 3 146.83 51 D#3 155.56 52 E 3 164.81 53 F 3 174.61 54 F#3 185.00 55 G 3 196.00 56 G#3 207.65 57 A 3 220.00 58 A#3 233.08 59 B 3 246.94 60 C 4 261.63 MIDDLE C 61 C#4 277.18 62 D 4 293.66 63 D#4 311.13 64 E 4 329.63 65 F 4 349.23 66 F#4 369.99 67 G 4 392.00 68 G#4 415.30 69 A 4 440.00 70 A#4 466.16 71 B 4 493.88 72 C 5 523.25 73 C#5 554.37 74 D 5 587.33 75 D#5 622.25 76 E 5 659.26 77 F 5 698.46 78 F#5 739.99 79 G 5 783.99 80 G#5 830.61 81 A 5 880.00 82 A#5 932.33 83 B 5 987.77 84 C 6 1046.50 85 C#6 1108.73 86 D 6 1174.66 87 D#6 1244.51 88 E 6 1318.51 89 F 6 1396.91 90 F#6 1479.98 91 G 6 1567.98 92 G#6 1661.22 93 A 6 1760.00 94 A#6 1864.66 95 B 6 1975.53 96 C 7 2093.00 97 C#7 2217.46 98 D 7 2349.32 99 D#7 2489.02 100 E 7 2637.02 101 F 7 2793.83 102 F#7 2959.96 103 G 7 3135.96 104 G#7 3322.44 105 A 7 3520.00 106 A#7 3729.31 107 B 7 3951.07 108 C 8 4186.01 109 C#8 4434.92 110 D 8 4698.64 111 D#8 4978.03 112 E 8 5274.04 113 F 8 5587.65 114 F#8 5919.91 115 G 8 6271.93 116 G#8 6644.88 117 A 8 7040.00 118 A#8 7458.62 119 B 8 7902.13 120 C 9 8372.02 121 C#9 8869.85 122 D 9 9397.27 123 D#9 9956.06 124 E 9 10548.08 125 F 9 11175.30 126 F#9 11839.82 127 G 9 12543.86