165

MUSICOL: Musical Instruction
Composition Oriented Language


P. Gena




MUSICOL, a computer language for composing music, was originally developed for composers with no previous knowledge of computer programming. A thorough description of the language and its use is found in MUSICOL Manual, Version 1. To facilitate the reader's understanding of the body of this paper, a sample MUSICOL program has been included in the appendix. The mnemonics table consists of conventional musical terms of up to ten characters (for example, VIOLA, FLUTE, D, G, PIZZ, MF, QUARTER, SULPONT, REST, 8VE4), and common punctuation marks that serve as non-arithmetic expressions (for example, / ( ) * - . +). Only zero and positive integer constants are used as operands after expressions.

MUSICOL statements (instructions) have a free format, and columns 2 to 72 of each card may contain as many of them as desired by the programmer. An incomplete statement continues on the next card providing no operation code is split. Expressions and blanks are recognized as delimiters. Any character in the first column of a card will allow fields 1 to 72 to be treated as comments. Similarly, the use of a comma in any column will render the remainder of the card free from compilation. Columns 73 to 80, which are ignored by the compiler, serve as the identification field.

The MUSICOL user has the flexibility to determine the process for choosing among strings of musical parameters (pitch, duration, range, attack, timbre, dynamics, and texture) in successive blocks of time, the lengths of which are variable. A total of sixteen different instruments can be used simultaneously. These are chosen from a list of common instruments stored in the mnemonics table (such as VIOLIN, FLUTE, PIANO, VIBRAPHONE), including non-pitched percussion. In addition, there are extra codes (INSTRI, INSTR2, etc.) available for assigning instruments not included in the table, or others (XTRAI, XTRA2, etc.) for timbres and attacks not contained. The contents for the strings of the individual parametric elements to be used in the compositional process can be declared by the composer, or generated by special routines. If no parameter string is indicated by the user, elements are randomly chosen from the appropriate collection in the mnemonics table. All of these features can be selected, changed, respecified, or eliminated at any point in the user's MUSICOL program.





166 Computing in the Humanities


Selection of Musical Parameters

Total randomness, stochastic processes, and literal selection are the three general methods presently available to generate parametric content. Various aspects of these techniques can be used alone or simultaneously within a time-block to achieve desired parametric configuration. A random generator is used to some extent in all decisions, with the exception of the literals declarations. Total randomness (zeroth-order) is assumed when no specific instructions are given as to how a choice, for an instrument or group of instruments, is made from the elements belonging to a musical parameter. Hence, the parameters affected are selected randomly from the pertinent list in the stored table. If a partial list of members in the table is desired for selection at equal probability, the mnemonics may be listed in a string within the time-block. During the compositional process, only those in the declared list will be eligible for inclusion. In addition, such a list of elements can be randomly generated, and the specific choice would, in turn, be impartially made. Furthermore, a parametric string, whether determined by the composer or generated, can be shifted about. This shuffling procedure can be called at any time, repeatedly, at the discretion of the composer.

A more interesting aspect of computer-aided composition constitutes the application of stochastic methods for parametric selection. Each element belonging to a parameter-class is assigned a rank order, that is, a hierarchy is established according to the percentage representing the probability of its occurrence. The most basic stochastic process in MUSICOL determines the texture of the composition by means of a play/rest ratio. Percentages of play/rest, derived from weighted probabilities, can be set inclusively for all instruments or for each individually. If a play probability of seventy-five percent is assigned, a twenty-five percent chance of rest is automatic. The elements of a declared parametric string can be subjected to stochastic selection by the use of rank ordering. These proportional percentages are chosen according to distributions as outlined in the following paragraphs. To generate probabilities for parametric elements in a string, the basic random procedure can be weighted by merely repeating elements in accordance with their projected ranking. Since each element in a string receives equal distribution, repetition will increase its probability. In the following list:

(B A B-flat B C D-flat F B C B A C)

the pitch B (four occurrences) will have the greatest probability, that of 4/12 or 1/3, followed by C at 1/4, then A at 1/6. B-flat, D-flat and F will each have the same assignment, 1/12. This simple operation, of course, can be implemented successfully for all parameter strings. The maximum list size of twenty-four elements allows a wide range of probability manipulations.

The third type of stochastic technique used for parametric selection is a simulation of an experimental result originally pointed out by George Kingsley Zipf. Zipf performed statistical studies on the English language where words from substantial texts were listed in order of frequency of occurrence, or rank-ordered. The results of these rank orders, plotted against the frequency, show relatively linear graphs. Therefore, each rank order has a probability approximately equal to the reciprocal





MUSICOL: Music Composition Language 167

of its number.

Example 1
---- Rank order: 1, 2, 3, 4,
- Probability (P): 1/1, 1/2, 1/3, 1/4, ... l/n
This empirical inverse relation between probability and rank became known as Zipfs Law. It is obvious that in order to hold the running sum of probabilities (P) at unity, it is necessary to multiply the inverse of each rank order by a constant (K), equal to the reciprocal of the sum of elements 1/1 through l/n, that is:

---- K = 1/ n Pi (1)
----------------- i = 1
If n = 5:
---- (60/60 + 30/60 + 20/60 + 15/60 + 12/60) x K = 1.0
---- K = 60/137
For individual probabilities:
---- Pr = I/r x K (2)
---- P1 = .438
---- P2 = .219
---- P3 = .145
---- P4 = .11
---- P5 = .088

In MUSICOL, the declared lists can be assigned rank order numbers. The programmer decides which element is to be the first. In the following:
-------- (PPP FT MP FF MF PP P)
if PPP is the first rank order, then:
-------- (PPP FT MP FF MF PP P)
rank: 1 2 3 4 5 6 7
The first element of the string need not always be the first order. Thus in the list:
-------- (PPP FFF MP MF FF PP P FT)
if MF is the first order, then rank will be assigned as:
-------- (PPP FFF MP MF FF PP P FT)
rank: 4 3 2 1 2 3 4 5
In the last case, elements sharing the same rank order number will also be equally probable.

Example 2
---- (PPP FFF MP MF FF PP P FT)
Probabilities:
---- P(MF)= .438
---- P(MP)= . 11
---- P(FF)= . 11
---- P(FFF)= .0725
---- P(PP)= .0725
---- P(PPP)= .055
---- P(P)= .055
---- P(FT)= .088
To establish predetermined probabilities for elements, it may be necessary to repeat elements as needed.

Example 3
-------
(MF FT MF PP P MP P MF)
rank: 4 3 2 1 2 3 4 5





168 Computing in the Humanities

Probabilities:
- P(PP) = .438
--- P(P) = .1645
-P(MF) = .2525
- P(FT) = .0725
-P(MP) = .0725

It is not required that all elements of a declared list be assigned rank order numbers for individual instruments. The instruction, FLUTE = C+ *5 will submit rank orders and select from the five pitches around C-sharp as follows:
-- (C+ D F A E-B D C F+ E)
rank: 1 2 3 4 5
Thus, the five rightmost pitches will not be chosen by the flute. However, instruments may divide or share elements in a list.

Example 4
Instructions: FLUTE = C+ *5, VIOLA = E*6 and OBOE = B*3 will yield:

------ 3 2 1 2 3 ------------------- OBOE ranking
---- (C+ D F A E- B D C F+ E)
-------1 2 3 4 5 ------------------ FLUTE ranking
---------------------- 6 5 4 3 2 1 -VIOLA ranking

To increase programming flexibility, literal selection of parametric elements is available in MUSICOL. If a declared parametric string contains only one element, the element will be chosen exclusively. Also, an element can be designated as the first of only one possible rank order; its probability would be 1.0. Specific durational lengths within time-blocks can be specified for literals of any parameter for individual instruments. This frees the remaining time for the particular instrument to be controlled by other declarations pertaining to the required parameter.

Programming a composition in MUSICOL involves the logical implementation of continuous time-blocks where the previously described techniques are used to create a preconceived parametric content. It is hoped that such versatility in choosing musical parameters will allow the composer to implant his own personal style on a composition, eliminating the 'salt and pepper' effect often found in computer compositions that depend heavily upon stochastic processes to the exclusion of other controls.


Software Design

The language was originally designed to run on CDC 6000 or 7000 series computers, but can be altered to run on any medium to large computer with a FORTRAN IV compiler. The source program is constructed by means of four overlays: the main-line, the compiler, the simulator/executor, and the output routine. The binary source requires from 33,000 to 44,000 octal locations to load, depending on the CDC operating system. The majority of the routines are written in FORTRAN IV, excepting a small number of assembly language subprograms that can be easily translated. MUSICOL operation codes contain up to ten BCD characters. Obviously, the longer mnemonics must be reduced in length for computers with smaller word structure.





MUSICOL: Music Composition Language 169

The word-packing of instructions, and so on, would also have to be adjusted accordingly. In the MUSICOL compiler, each instruction is assembled into a CDC 60-bit word, which is divided into five or six fields of a combination of six or twelve bits, depending on the instruction type. Instructions are stored as they appear in successive time-blocks for entry into the simulator. The simulator constructs a core memory for the program's MUSICOL source instructions, so that the execution of the compositional process is determined by the programmed specifics. The compiled code for each time-block remains in the simulated memory until the composing is completed for the set length, as specified in the block. Output is stored on a file as each block is processed.

Three stages of printed output result from submission of a program in MUSICOL. A compilation map, complete with mnemonic code cross-referencing, follows the source-code listing. A loader-execution map tabulates all instrumental or parametric declarations, deletions, changes, etc., and points to the respective locations of the responsible code in the source program. An extensive diagnostic system serves both the compilation and execution stages. In the event of errors incurred during execution, the working simulated-memory is dumped as an extra debugging aid. The actual listing of the resultant composition is clearly printed (in MUSICOL mnemonics) chronologically by measure numbers, beats and subdivisions. This type of output could easily serve as input to a music writing program. Currently at Northwestern, the output is being fed to SMUT (System for Music Transcription), a music-copying program using a Calcomp plotter.


Future

As an undertaking such as MUSICOL can never be completely satisfactory, plans for an improved version (2.0) are now being formulated. Though it is proposed that probabilistic techniques allow freedom to the programmer in choosing syntax, more variety is surely needed. Ideally, Markoff processes could be added to promote smoother syntactic structure, especially when using order approximations as an influence on subsequent choices. In addition, it may be desirable to cross parameters during selection, that is, certain choices in pitch may be used to prejudice those of rhythm, and so on. Other features such as I Ching and stochastic processes used by Xenakis might also be implemented as options. Harmony in version 1 is essentially a by-product of the specified linear structures taken vertically. A composer is able to influence the selection of types of chords by carefully manipulating pitch and rhythmic distributions, but a new procedure must be developed to allow direct access to controlling vertical simultaneities. There are several existing MUSICOL mnemonics that are not yet active. Most of them depend on referencing material already composed. A search and store memory access program will be developed to make all output material recursively accessible. It seems that a common goal of most composing languages or systems is to provide the user with a flexible base of directives that will insure artistic individuality. Obviously it is impossible to create a language that remains impartial to the author's aesthetic, or void of any personal compositional bias. Indeed, MUSICOL is not





170 Computing in the Humanities

without limitations in this respect, nor will future revisions render it totally objective. My philosophy behind the design is that simplicity of basic choice procedures will invite the user to re-evaluate his musical ideas in terms of probabilities. This requires considerable pre-compositional thought, a tradition that is clearly as necessary when using automated systems as it is before sitting down at a piano with a pen and manuscript paper. To this end, not until the composer understands his process objectively, will he be able to establish a degree of personal uniqueness.

References

Byrd, Donald. SMUT: System for Music Transcription. Indiana University, July, 1975.

Cherry, Colin. On Human Communication, A Review, A Survey, and A Criticism. Cambridge, Mass.: The M.I.T. Press, 1966.

Gena, Peter. "MUSICOL Manual, Version 1," Technical Report No. 7. SUNY at Buffalo, New York, 1973.

Gena, Peter. "Closed Subroutines for Musical Composition," Technical Report No. 9. SUNY at Buffalo, New York, 1975.

Hiller, Lejaren. "Information Theory and Musical Analysis," Technical Report No. 5. University of Illinois Experimental Music Studio, July, 1962.

Hiller, Lejaren. "Programming the I-Ching Oracle," Computer Studies in the Humanities and Verbal Behavior. Vol. 11I, No. 3, October, 1970. p. 130-143.

Moles, Abraham. Information Theory and Esthetic Perception. Translated by Joel E. Cohen. Urbana: University of lllinois Press, 1966.

Pierce, J.R. Symbols, Signals, and Noise. New York: Harper and Row, Inc., 1961.

Xenakis, lannis. Formalized Music, Thought and Mathematics in Composition. Translated by C. Butchers, G.W. Hopkins, and Mr. and Mrs. J. Callifour. Bloomington: Indiana University Press, 1971.

Zipf, George Kingsley. Human Behavior and the Principle of Least Effort. Cambridge, Mass.: Addison-Wesley Publishing Co., 1949.

Re Computer Music | Gena Web