Josef Gerbrich, Petr Randula, Rudolf Růžička: "Computer program for composition and automatic notation of contemporary instrumental and vocal music" - časopis: Computers and Artificial Intelligence; vyd. Slovenská akadémia vied - Veda, Bratislava 1991, čís. 5, str. 487 - 503

 

 

   COMPUTER PROGRAM FOR COMPOSITION AND AUTOMATIC NOTATION OF  
       INSTRUMENTAL AND VOCAL PIECES OF CONTEMPORARY MUSIC     
                                                                
                                                               
Josef  G e r b r i c h ,  Programmer                           
Computer Science Department of the J.E.Purkyně University, Brno
                                                                
Petr  R a n d u l a ,  Programmer                              
Regional Institute of Design, Ustí nad Labem                   
                                                               
Rudolf  R ů ž i č k a ,  Composer                               
Janáček Academy of Performing Arts, Brno                                                                                       
                                                               
                                                                
A b s t r a c t. The contribution describes co-operation between
a composer  and  programmers  in  the  process  of  contemporary
serious  music  composition.  Generated  computer  programs  for
computer music composition can  be  used  by  both  students  of
composition and professional composers. They help them not  only
limit routine work but also choose  suitable  variations,  write
independent compositions, and find inspiration for their further
work. These methods using  random  generation  of  variants  can
support research on artificial intelligence  by  simulating  the
activity of human brain.                                       
                                                               
                                                                                                                                
1. INTRODUCTION                                                
                                                               
   The  universal  program  for  contemporary   serious    music
composition together with programs for  automatic  notation  and
traditional notation output are intended for use by students  of
composition  [1]  as  well  as  by  professional  composers   of
different orientations. The program is one of  the  examples  of
the wide use of computer in the field of art in general  and  in
the very specific field of composition in particular.          
   The program can also be used in  the  field  of  research  on
human thinking, as it is a model of human brain activity in that
it uses random operations, with  certain  limits  given  by  the
composer as well as the computer,  which  are  transformed  into
creative works of art.                                         
                                                                
   Wide knowledge is necessary for discovering all the relations
between individual elements constituting a  piece  of  music  as
well as for their description  in  the  form  of  algorithms  or
programs. The program  is  able  to  show  whether  the  defined
attributes and laws  of  a  certain  musical  style,  period  or
composer are really typical of the particular phenomenon or not.
The composer can have a part of  his  composition  generated  to
compare the result with his original idea and to add  some  more
details if required.                                           
   The element of chance or random  choice,  enabling  different
variants  of  a  traditionally  written  piece  to  come    into
existence, is represented here by the random generator.  Primary
generation is controlled by a  number  of  limiting  conditions,
which only let through a small  part  of  the  musical  material
produced by the computer.                                      
                                                                
   The system described in great detail on the  following  pages

is just one of the many systems for contemporary  serious  music
composition written during nearly 30 years of the  existence  of
computer-assisted  composition,  research  and  teaching,    and
resulting  in  a  number  of  different  kinds  of  compositions
(chamber, instrumental and vocal pieces, concertos,  symphonies,
operas, cantatas, and electroacoustic pieces).                 
   The basic composition principle of the program is the use  of
pseudorandom numbers within defined limits. Random  numbers  are
intended to simulate random processes typical of the activity of
the nature and  human  brain.  The  result  is  a  specific  and
self-contained  composition  style.  The  basic  tool  producing
random processes in computer is the random generator,  which  is
able to output a succession of numbers within the range  0  -  1
which is repeated after several millions of members.            
                                                               
                                                               
   The  program  includes  rules  restricting  the   composition
process,  similar  to  those  used  by  human    composers    of
contemporary serious music. These rules include  elimination  of
traditional  harmony,  i.e.  of  traditional  chords  and  their
combinations, elimination of classical polyphony  with  harmonic
basis, limitation of traditional rhythmical structures connected
with the division into bars (accented and non - accented  tones)
and elimination of traditional  methods  of  work  with  melody,
phrasing,  composition  structure  and  form  etc.  As  to   the
notation, contemporary music composers write each note with  its
accidental, simplify rhythmical structures and melodic  ornament
indications etc.                                               
   There is therefore a new concept of melodic line,  rhythmical
structure,  harmony  and  polyphony  involved.  The    composer,
however,  is  still  allowed  to  use  traditional  scales   and
imitations of traditional melodic ornaments, irregular  rhythms,
elements of instrumental or vocal character of melody  (accents,
glissando,  legato,  staccato  etc.)  and  traditional  notation
(division  into  bars,  clefs,  transpositions  of  instruments,
scores etc.).                                                  
                                                               
   Every classically educated composer will be able  to  prepare
data for the program, which means that even a  beginner  in  the
field of computer music will be able to work  with  the  program
and achieve good results. As there is  a  practically  unlimited
number of variants of the input data  for  the  program  and  an
unlimited  number  of  possible  results  (thanks   to    random
processes), every composer can show his individual abilities and
original approach. The possibility of  changing  the  percentage
tables of distribution of the results according to  the  demands
of  each  composer  (especially  in  the  field  of   rhythmical
structures, harmonic and melodic intervals, modes and polyphony)
is another great advantage of the  program.  With  the  help  of
appropriate parametres for pseudorandom numbers generation it is
possible to create melodic and rhythmical structures similar  to
traditional variations.                                        
   There are two written forms of music composed with  the  help
of computer: automatic notation, which is a modified version  of
the transcribed music language in a form easily decipherable  by
performers, and traditional notation in the form of a score with
the possibility of extracting any individual  part.  The  latter
can be printed either on plotter or on adapted printer.        
                                                               
   The most important feature of the program is the fact that it

does not substitute the composer's creative work. It only  helps
him to realize his intentions more quickly and eliminates a  lot
of  routine  work,  such  as  dividing  the  score  into   bars,
transposing instruments and voices, the use of different  clefs,
forming the score and writing down each individual part.       
                                                                
                                                               
2. DESCRIPTION OF THE PROGRAM  (Fig. 1.)                       
                                                               
   The length of each composition is determined by the number of
bars  or  tones  and  rests.  It  is  necessary  to  define  the
proportion of tones and rests, ornamented and normal notes,  the
proportion of tremolos (trills, rollings,  frullatos  etc.)  and
groups (leaning notes, grouplets, arpeggios etc.). The range  of
melody is determined by the lowest and the highest pitches,  the
selection of tones that should be used is defined by the type of
mode. The selection of rhythmic values,  melodic  intervals  and
intervals  between  tones  in  chords  is  based    on    chosen
distribution functions.  Tremolo  is  defined  by  the  interval
between the two tones, the number of tones in ornaments  by  the
minimum and maximum number, polyphony by the  number  of  parts.
Two  types  of  transposition  (modal  and  instrumental)  allow
modifications of the basic modes and  automatic  corrections  of
the parts for transposing instruments. The selection  of  tones,
rhythms and some other elements  is  done  through  pseudorandom
number generation according to a defined discrete  distribution.
Separate utility programs  extract  individual  parts  from  the
score using for each instrument a suitable clef  and  signs  and
allowing the use of traditional notation.                       
----------------------------------------------------------------
Fig. 1. Flow chart of main  program  and  utility  programs  for
                       automatic notation                      
----------------------------------------------------------------
                                                               
                                                               
3. NOTATION CODE                                               
                                                                
   The notation code included in this program is  based  on  the
"ALMA" language (Alphanumeric  Language  for  Musical  Analysis)
[2], [3] in a partly adapted form suitable for this program. The
notation is supposed to be produced by computer peripheries. The
basic feature of the code  is  understandability  for  musicians
accustomed  to  traditional  notation  and  legibility  for  the
computer at the same time.                                     
                                                                
3.1.                                                           
                                                               
rhythmic values (Fig. 2.A.) :                                  
           1     semibreve (whole note) or semibreve rest      
           2     minim (half note)                             
           4     crotchet  (quarter note)                      
           8     quaver (eighth note)                          
           16    semiquaver (sixteenth note)                   
           .     dot after a note or a rest                    
           ..    two dots                                      
----------------------------------------------------------------
                            Fig. 2.A.                          
----------------------------------------------------------------
P       rest                                                   
( )     irregular rhythm (triplet, quintuplet)                 

/       bar-line                                               
2:4     two-fourth time                                        
                                                               
tone names:   C, D, E, F, G, A, H                              
                                                                
accidentals:   X     sharp                                     
               B     flat                                      
               N     natural                                   
                                                                
tone systems:   A-3 ... H-3     subcontraoctave                
                C-2 ... H-2     contraoctave                   
                C-1 ... H-1     great octave                   
                C0  ... H0      small octave                   
                C1  ... H1      one-line octave                
                C2  ... H2      two-line octave                
                C3  ... H3      three-line octave               
                C4  ... H4      four-line octave               
                C5              five-line octave               
                                                               
Q     melodic ornament (grouplet,  acciacatura,  turn,  mordent,
      arpeggio etc.)                                           
+     other tones of melodic ornament                          
W     tremolo, trill, roll, frullato etc.                      
&     other tremolo or trill tones                              
*     next harmonic tone                                       
                                                               
=     tied notes                                               
< >   beginning and end of legato                               
,     separation of clefs, metre signs or rhythmic values      
                                                               
clefs (Fig. 2.B.):   KG    treble clef (G clef)                
                     KF    bass clef (F clef)                  
                     KC3   alto C clef                         
                     KC4   tenor C clef                        
----------------------------------------------------------------
                            Fig. 2.B.                           
----------------------------------------------------------------
                                                               
3.2.                                                           
                                                                
clef ::=  { KG | KC3 | KC4 | KF }                              
measure ::=  { 1 | 2 | 3 | ... } : { 1 | 2 | 4 | 8 | 16 }      
rhythm ::=  { 1 | 2..| 2.| 2 | 4..| 4.| 4 | 8.| 8 | 16 }       
irregular_rhythm ::=                                            
   { 1 | 2 | 4 | 8 }  ( { 2 | 4 | 8 | 16 } ... )               
rest ::=  { rhythm | irregular_rhythm }  P                     
                                                               
tone == basic_tone ::=  { C | D | E | F | G | A | H }          
accidental ::=  { X | B | N }                                  
octave ::=  { -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 }           
pitch ::=  [ accidental ]  tone  octave                        
set == set_of_pitches ::=  pitch  [ * pitch ] ...              
                                                               
note ::=  { rhythm | irregular_rhythm }  set                   
tremolo == trill ::=  rhythm  W  set  &  set                   
ornament == melodic_ornament ::=  Q  set  [ + set ] ... + note 
notation ::=  { note | tremolo | ornament }                    
tie == tied_tones ::=                                          
   notation  { =  [ bar-line ]  notation } ...                 
                                                                

element == basic_element_of_composition_structure ::=          
   { notation | tie | rest }  { separator | bar-line }         
legato ::=  < element ... >                                    
sector == sector_of_composition ::=  clef  separator           
   [ measure  separator ]  { element | legato } ...            
composition ::=  sector ...                                    
                                                               
3.3.                                                            
                                                               
Example of transcribed notation  output  on  the  printer  (Fig.
3.A., Fig. 3.B.)                                               
----------------------------------------------------------------
                            Fig. 3.A.                          
----------------------------------------------------------------
----------------------------------------------------------------
                            Fig. 3.B.                          
----------------------------------------------------------------
                                                               
                                                                
                                                               
4. SETTING UP PARAMETERS IN THE PROCESS OF COMPOSITION         
                                                               
   Parameters can be set either by writing  the  values  on  the
terminal screen or by preparing them beforehand and storing them
in the data file. The program is intended for the PDP 11/34  and
ADT 4500 (HP 1000) computers  and  the  FORTRAN  IV-VO2.2-5  and
FORTRAN 4X rev.2340  programming  languages.  There  is  also  a
version compatible with IBM PC.                                
                                                               
                                                               
4.1. Name                                                       
                                                               
4.1.1. HEADING - general details about the  composition  or  its
part - the maximum number of characters - 20, positions  <01-20>
in the data file                                                
                                                               
Values in parentheses are placed above the staff in the score or
part; values in square brackets are situated  in  front  of  the
staff; values separated by slashes are put one below the  other;
values that are not in brackets are not written in the score.  
                                                               
                                                               
4.2. Tone length                                                
                                                               
4.2.1. METRE - (example  2,4  -  two-four  time)  -  2  times  2
characters <21-22><23-24>                                      
                                                                
4.2.2. BAR NUMBER - (only when metre is defined in 4.2.1.)  -  3
characters <25-27>                                             
                                                               
Example (Fig. 4.) :                                             
----------------------------------------------------------------
                             Fig. 4.                           
----------------------------------------------------------------
                                                                
4.2.3. NUMBER OF RHYTHMIC VALUES  -  determines  tone  and  rest
lengths, only when no metre is defined by 4.2.1. - 3  characters
<25-27>                                                        
                                                                
4.2.4. RHYTHM - selection of rhythmic values based on percentage

tables of pseudorandom process distribution; the tables  can  be
changed and amended to meet the requirements of each  individual
composer; irregular rhythms can only be required if  4.2.3.  has
been set - 2 characters <28-29>                                
                                                               
4.2.5. " * " - multiple of basic rhythmic  values  (if  not  set
then the basic rhythmic values do not  change)  -  2  characters
<30-31>                                                        
                                                               
4.2.6. " + " - a defined rhythmic value added to the set  values
(if not set then the basic rhythmic values do not  change)  -  2
characters <32-33>                                             
                                                               
Example (Fig. 5.A., Fig. 5.B.) :                               
----------------------------------------------------------------
                            Fig. 5.A.                          
----------------------------------------------------------------
the RHYTHM percentage table 5 shows the  following  distribution
of individual tone lengths :                                   
16 - 50%, 8 - 25%, 8. - 10%, 4 - 15%;                          
the required conversion gives the following structure :        
4 - 50%, 4. - 25%, 2 - 10%, 2=8 - 15%                           
----------------------------------------------------------------
                            Fig. 5.B.                          
----------------------------------------------------------------
                                                                
Rhythmic values in the form of a single note or rest  are  often
difficult for the performer to read; notations b)  and  c)  from
the three examples given  below  are  written  in  a  much  more
comprehensible way than a). The notation shown in c)  shows  the
most cleary presented rhythmical structure; in  b)  and  c)  the
rhythmic structure is presented according to  the  metre.  (Fig.
6.)                                                            
----------------------------------------------------------------
                             Fig. 6.                           
----------------------------------------------------------------
                                                               
A special algorithm has been developed for automatic arrangement
of  rhythmical  notation  into  bars  in  a  logic  and   easily
decipherable way. (Fig. 7.)                                    
----------------------------------------------------------------
      Fig. 7.  The automatic rhythmical notation algorithm     
----------------------------------------------------------------
                                                               
t  ... the moment of a new rhythmic value appearance (t  =  0  -
       the beginning of a bar)                                  
M  ... the length of a bare                                    
l  ... a new rhythmic value input                              
l' ... a section of "l" that is going to be processed          
d  ... a section of "l'" that is to be output in the form  of  a
       single note                                             
t' ... the moment of a new note appearance                     
s  ... a step on the time axis (t' := t + s)                   
                                                                
A. if a new value is longer  than  the  remaining  part  of  the
   particular bar (t + l > M), then a shorter value will be used
   in the moment:  l' := M - t, otherwise  l' := l             
B. the first "d" value that can be used within "l'" is found  in
   the table  of  selected  values  for  the  allowed  positions
   within the bar (into "t" moment)                            

B1. if the appearance of the "d" note  corresponds  to  the  "t"
    time then the "d" value is output, the original "l" value is
    shortened (l := l - d) and if the result is  non-zero,  then
    another step A. is applied and the next note is tied to  the
    first one; the algorithm is terminated when  l = 0         
B2. if the "t'" moment of  the  "d"  note  appearance  does  not
    correspond to "t", the  l' := t' - t  section that has  been
    left out will be created first, beginning with step B.     
                                                               
4.2.7. TONE/REST - ratio of tone and rest occurrences determined
by pseudorandom occurrence tables alterable by  each  individual
composer; two and more  successive  rests  are  joined  together
(this should always be set) - 1 character <34>                 
                                                                
4.2.8. TONE/ORNAMENT - ratio of tone  and  ornament  occurrences
determined by pseudorandom occurrence tables (this should always
be set) - 1 character <35>                                     
                                                                
4.2.9. TREMOLO/GROUP - ratio  of  tremolos,  trills,  rolls  and
frullatos (from now on referred to as "tremolos" for short)  and
other ornaments  (grouplets,  leaning  notes,  turns,  mordents,
arpeggios etc.) - from now on referred to as "groups" for  short
- which are not taken as rhythmic values (set only  if  ORNAMENT
required by 4.2.8) - 1 character <36>                          
                                                                
Example (Fig. 8.A., Fig. 8.B.) :                               
----------------------------------------------------------------
                            Fig. 8.A.                          
----------------------------------------------------------------
the ratio of tone and rest  occurrences  (75%  -  tones,  25%  -
rests)  determined  by  the  percentage  occurrence   table    3
(TONE/REST);                                                   
the ratio of tone and ornament occurrences (50% - tones,  50%  -
ornaments) determined  by  the  percentage  occurrence  table  4
(TONE/ORNAMENT);                                               
the ratio of tremolo and group occurrences (25% - tremolos,  75%
- groups)  determined  by  the  percentage  occurrence  table  5
(TREMOLO/GROUP)                                                
----------------------------------------------------------------
                            Fig. 8.B.                          
----------------------------------------------------------------
                                                               
4.2.10. TREMOLO INTERVALS - determines the intervals of tremolos
according to the percentage given in the tables; the size of the
intervals is defined by the number of semitones  (interval  1  -
minor 2nd, 2 - major 2nd, 3 - minor 3rd, 4 -  major  3rd  etc.);
(set only if TREMOLO required by 4.2.9.) - 2 characters <37-38>
                                                               
4.2.11. SIZE OF GROUP - the smallest and largest number of tones
within a group (based on random choice  and  even  distribution)
including the nearest rhythmic tone following the group, in  the
case the same number is set for all groups it is  sufficient  to
input one value only (set only if GROUP required by 4.2.9.) -  2
times 2 characters <39-40><41-42>                              
                                                               
Example (Fig. 9.A., Fig. 9.B.) :                               
----------------------------------------------------------------
                            Fig. 9.A.                          
----------------------------------------------------------------
the choice of melodic intervals in tremolos is determined by the

percentage table 11 (TREM.INTERVALS) approximate occurrences:  
1 - 25%, 2 - 35%, 3 - 20%, 4 - 20%;                            
in SIZE OF GROUP the groups of 6 to 10 are  evenly  distributed,
each forming 20%                                               
----------------------------------------------------------------
                            Fig. 9.B.                          
----------------------------------------------------------------
                                                               
                                                                
4.3. Tone pitch                                                
                                                               
4.3.1. AMBIT OF MELODY - allowed range of  pitches;  the  lowest
and the highest tone that can be used in a  composition  or  its
part and that falls within the basic,  non-transposed  sound  of
the  instrument  (this  should  always  be  set)  -  2  times  4
characters <43-46><47-50>                                      
                                                                
Example (Fig. 10.) :                                           
----------------------------------------------------------------
                            Fig. 10.                           
----------------------------------------------------------------
the setting BH-1,XF3 defines the range by the limits of  B  flat
in great octave and F sharp in three-line octave               
                                                               
4.3.2. MODES - the enumeration of tones that can be used in  the
composition - can be altered and augmented by the  composer;  if
the mode is not repeated after an octave is completed,  then  C1
is the beginning (this should always  be  set)  -  2  characters
<51-52>                                                        
                                                               
Survey of the modes used (includes definitions of all  common  5
to 12-tone modes beginning with the oldest  historic  pentatonic
mode and including the whole-tone and diatonic modes, Messiaen's
modes, chromatic scale and all modes with the period other  than
octave and the interval combinations  1,2,3,4  and  the  maximum
number of 3 intervals of the same or different size). (Fig. 11.)
----------------------------------------------------------------
                      Fig. 11. Modes table                     
----------------------------------------------------------------
                                                                
Mode definition is based on ascribing 0 or 1 to each tone of the
tone system (0 - tone will not be used in the  mode,  1  -  tone
will be used); the first value defining the period of  the  mode
is denoted C1 (or transposed  C1)  and  the  other  values  then
correspond to the successive semitones. After the defined period
is completed the values are repeated automatically  in  both  up
and down directions from the basic period.                     
                                                                
Example (Fig. 12.A., Fig. 12.B.) :                             
----------------------------------------------------------------
                           Fig. 12.A.                          
----------------------------------------------------------------
----------------------------------------------------------------
Fig. 12.B. Graphic presentation of mode  28  with  the  help  of
                            keyboard                           
----------------------------------------------------------------
                                                               
4.3.3. DIRECTION OF MELODY -  forced  melody  direction  (up  or
down) based on percentage limitation chosen by the composer;  if
a next tone in the defined direction exceeds the allowed  range,

it is not accepted and another suitable tone is  generated;  the
result is that melody runs within the defined part of the  range
- to realize this intention the first 50 tones of the melody are
ignored (this should always be set) - 1 character <53>         
                                                               
Example (Fig. 13.A., Fig. 13.B.) :                             
----------------------------------------------------------------
                           Fig. 13.A.                          
----------------------------------------------------------------
the ratio of rising and  falling  intervals  of  the  melody  is
determined by the percentage table 6 (DIRECTION):              
rising intervals - 75%, falling intervals - 25%                
----------------------------------------------------------------
                           Fig. 13.B.                          
----------------------------------------------------------------
                                                                
4.3.4. NUMBER OF VOICES - maximum number of voices that  are  to
form a  many-part  harmony;  the  lowest  part  -  melody  -  is
generated according to the parametres set by 4.2.1. to  4.2.11.,
4.3.1. to 4.3.3. and 4.3.7.; when  any  of  the  other  harmonic
parts exceeds the range  defined  by  4.3.1.  the  tone  is  not
realized (if the number of parts is not set to be 2 or more then
no polyphony is generated) - 2 characters <54-55>              
                                                                
4.3.5. HARMONY - the character of harmony  and  tremolos  within
and outside the limits of the defined mode and range of  melody;
when a required harmonic or tremolo tone is not found within the
defined mode after 1000 attempts have been made, the tone is not
realized (this is only set when TREMOLO is required by 4.2.9. or
when the number of voices is set do be 2 or more by 4.3.4.) -  1
character <56>                                                  
                                                               
The character of harmony and tremolos is defined with  the  help
of code numbers 1 to 4 :                                       
1 - generation of tones is controlled  by  a  defined  mode  and
    range of melody                                            
2 - generation of tones is controlled by a defined mode        
3 - generation of tones is controlled by a defined range       
4 - generation of tones is not limited                          
                                                               
4.3.6. HARMONIC INTERVALS - pseudorandom percentage tables limit
the occurrences of intervals in the many-part structure (this is
only set when the number of parts is set to  be  2  or  more  by
4.3.4.) - 2 characters <57-58>                                 
                                                               
4.3.7. MELODIC INTERVALS - pseudorandom percentage tables  limit
the occurrences of melodic intervals (this should always be set)
- 2 characters <59-60>                                         
                                                               
Example (Fig. 14.A., Fig. 14.B.) :                             
----------------------------------------------------------------
                           Fig. 14.A.                          
----------------------------------------------------------------
percentage table 6  (HARM.INTERVALS)  determines  the  ratio  of
intervals in the many-part structure:                          
interval 3 - 50%, interval 4 - 50%;                            
percentage table  3  (MEL.INTERVALS)  determines  the  ratio  of
melodic intervals :                                            
interval 0 - 20%, 1 - 17.1%, 2 - 14.5%, 3 - 12%, 4 - 9.9%,  5  -
7.9%, 6 - 6.15%, 7 - 4.6%, etc.                                

----------------------------------------------------------------
                           Fig. 14.B.                          
----------------------------------------------------------------
                                                               
4.3.8. TRANSPOSITION - the first value determines the number  of
semitones by which the mode is to be transposed without changing
the  melody  range;  the  second  value  determines   instrument
transposition resulting in the change in the melody range set by
4.3.1. - 2 times 3 characters <61-63><64-66>                   
                                                               
Example (Fig. 15.) :                                           
----------------------------------------------------------------
                            Fig. 15.                           
----------------------------------------------------------------
the setting -8,14 defines mode transposition by minor 6th in the
downward direction and instrument transposition by major 9th  in
the upward direction (for example with the B flat bass clarinet)
                                                               
                                                                
4.4. Initialisation                                            
                                                               
Initial parametres for the pseudorandom generator (the first  of
each pair of numbers should be set,  the  second  number  always
being 0) should be set separately  for  tone  lengths  and  tone
pitches, the advantage of this is the possibility of  generating
classical variation sections of  the  compositions;  to  achieve
even distribution of pseudorandom numbers the first  50  numbers
are eliminated.                                                
                                                               
4.4.1. RHYTHM-RANDOM - initial parametres of  pseudorandom  data
for 4.2.4., 4.2.7 to 4.2.11. (these should always be  set)  -  4
characters <67-70>                                             
                                                               
4.4.2. MELODY-RANDOM - initial parametres of  pseudorandom  data
for 4.3.3., 4.3.6., 4.3.7. (these should  always  be  set)  -  4
characters <71-74>                                             
                                                               
                                                                
4.5. Notation                                                  
                                                               
Notation  observes  traditional  rules  connected    with    the
arrangement of the score and  individual  parts  with  the  only
exception of accidentals with each individual  note  (only  tied
notes have one common accidental); graphic form of ornaments  is
simpler than the traditional one, ornaments are notated by black
note-heads placed into the particular beat;  tremolo  tones  are
placed in square brackets and their rhythmic values  are  signed
separately.                                                    
                                                               
A special algorithm has been developed for automatic notation of
accidentals in a logic and easily decipherable way. (Fig. 16.) 
----------------------------------------------------------------
              Fig. 16. Automatic notation algorithm            
----------------------------------------------------------------
N  ... notes  C D E F G A H  (without accidentals)             
X  ... notes  XC XD XF XG XA  (with sharps)                    
B  ... notes  BD BE BG BA BH  (with flats)                     
                                                                
I1  ... intervals  {1,3,5,8,10} + 12 * o;  o = 0,1,2,3,4,5,6,7 
I2  ... intervals  {2,4,7,9,11} + 12 * o                       

I3  ... intervals  {6} + 12 * o                                
I4  ... intervals  1,3,5                                        
I5  ... intervals  2,4,7                                       
                                                               
A1. X is followed by X or N                                    
A2. B is followed by B or N                                     
B. if N is followed by X or B, then:                           
B1. for I1 in  the  upward  direction  or  I2  in  the  downward
    direction, if the nearest successive "N" follows I4  in  the
    upward direction or  I5  in  the  downward  direction,  then
    select "X", otherwise select "B"                           
B2. for I1 in  the  downward  direction  or  I2  in  the  upward
    direction, if the nearest successive "N" follows I4  in  the
    downward direction or  I5  in  the  upward  direction,  then
    select "B", otherwise select "X"                           
B3. for I3 in the upward or downward direction, if  the  nearest
    successive "N" follows I1 in the upward direction or  I2  in
    the downward direction, then select "X",  if  "N"  does  not
    follow, select one of the notes {XC, BE, XF, XG, BH}       
B4. for I3 in the upward or downward direction, if  the  nearest
    successive "N" follows I1 in the downward direction or I2 in
    the upward direction, then  select  "B",  if  "N"  does  not
    follow, select one of the notes {XC, BE, XF, XG, BH}       
C. for polyphony within one single staff or tremolo:           
C1. the lowest tones are governed by the rules A1. - A2. and B1.
    - B4.                                                      
C2. the rest is governed by the same rules but the highest  tone
    of the polyphony or the basic tone of the  tremolo  is  only
    significant as the last melodic tone                       
                                                                
4.5.1. STAVES -  automatic  distribution  of  polyphony  into  a
defined number of staves based on higher part priority (this  is
only set  if  more  than  1  part  required  by  4.3.4.  and  if
more-stave notation selected); codes -1 to -4 are used to define
notation using staves with less than  5  lines  (for  percussion
instruments) - 2 characters <75-76>                            

If the polyphony contains fewer parts then set (see  notes  with
4.3.4. and 4.3.5.) or if the number of parts is smaller than the
number of staves then the tones available  will  be  distributed
evenly  among  the  available  staves  (for  example  a    chord
consisting of 3 tones will be distributed among 6 staves in  the
following way: lines 1 and 2 will hold the highest tone, lines 3
and 4 the middle tone and lines 5 and 6  the  lowest  tone);  if
even distribution is not possible  then  higher  tones  will  be
duplicated (for example 4 tones of a chord will  be  distributed
among 6 stanes in the following way: lines 1 - 2 - highest tone,
lines 3 - 4 second highest tone, lines 5 - 6 the  remaining  two
tones of the chord).                                           
                                                                
4.5.2. CLEFS - automatic selection of clefs used with the  given
instrument (if not set,  no  clef  is  used  -  especially  with
percussion instruments) - 1 character <77>                     
                                                                
The code 1, 2, 3, 7, 9 defines the use of clefs :              
1 - treble G clef (KG)                                         
2 - bass F clef (KF)                                           
3 - treble and bass clefs (KG + KF)                             
4 - tenor C clef (KC4)                                         
7 - treble, tenor and bass clefs (KG + KC4 + KF)               

8 - alto C clef (KC3)                                          
9 - treble and alto clefs (KG + KC3)                           
                                                               
There is a special algorithm for the use of two or  three  clefs
within a staff:                                                
                                                                
For code 3 :                                                   
A1. if the composition or its part begins with the C1  pitch  or
    any higher pitch, then use KG                              
A2. if the composition or its part begins with the H0  pitch  or
    any lower pitch, then use KF                               
B1. for pitches from BG0 up use KG, for pitches  from  XF0  down
    introduce KF                                               
B2. for pitches from  XF1  down  use  KF,  for  pitches  BG1  up
    introduce KG                                               
                                                               
For code 7 :                                                   
A1. if the composition or its part begins with the F1  pitch  or
    any higher pitch, then use KG                              
A2. if the composition or its part begins with  any  pitch  from
    the range F0 to E1, then use KC4                           
A3. if the composition or its part begins with the E0  pitch  or
    any lower pitch, then use KF                               
B1. for pitches from BH0 up use KG, for  the  pitches  from  XA0
    down introduce KC4                                         
B2. for pitches within the  range  BA-1  to  XC2  use  KC4,  for
    pitches from BD2 up introduce KG and for pitches  from  XG-1
    down introduce KF                                          
B3. for pitches from XF1 down use KF, for pitches  from  BG1  up
    introduce KC4                                              
                                                               
For code 9 :                                                   
A1. if the composition or its part begins with the F1  pitch  or
    any higher pitch, then use KG                              
A2. if the composition or its part begins with the E1  pitch  or
    any lower pitch, then use KC3                              
B1. for pitches from BH0 up use KG, for  the  pitches  from  XA0
    down introduce KC3                                         
B2. for pitches from E2 down use KC3 clef,  for  pitches  F2  up
    introduce KG                                               
                                                                
C. rules of clef selection in codes 3, 7  and  9  for  polyphony
   written in a single staff:                                  
C1. for the beginning of a composition or its  part  use  A1.  -
    A3.; if rules defined by A1. - A3. cannot be applied to  all
    tones of the polyphony or  tremolo  then  the  selection  of
    clefs is detremined by the highest or the lowest tone in the
    greatest interval distance from the tone given by A1. - A3.;
    if the rules still cannot be applied then the nearest  lower
    clef is selected                                           
C2. a new clef is introduced when any of the limits  defined  by
    B1. - B3. is exceeded; for KG the  lowest  written  tone  is
    significant, for KF and KC3 the highest written tone of  the
    polyphony is significant, KC4 is only used  if  all  written
    tones of the polyphony or tremolo  are  within  the  defined
    range                                                      
                                                                
The use of OTTAVA and QUINTADECIMA SOPRA or OTTAVA  BASSA  signs
is determined (for all codes) in the following way:            
A. without any sign in KG up to XF3, selection of 8va sopra  for

   BG3 and any higher pitch up to C3, deselection of  8va  sopra
   for H2 and any lower pitch                                  
B. selection of 8 va sopra in GK up to XF4, 15ma sopra from  BG4
   up to C4, deselection of 15ma sopra and  reselection  of  8va
   sopra from H3 down                                           
C. without any sign in KF down to BG-3, selection of  8va  bassa
   from XF-3 down to XC-2, deselection of 8va bassa from BD-2 up
D. for polyphony or tremolo within one staff the highest written
   tone is significant with GK and the lowest  written  tone  is
   significant with KF while A., B., and C. are applied        
                                                               
4.5.3. LEGATO - the first value is the number of  legato  tones,
the second value is the maximum number of semitones  determining
the interval for which the legato is allowed (if not set then no
legato is signed) - 2 times 2 characters <78-79><80-81>        
                                                               
The defined legato group is terminated by a repeated  tone,  the
end of a group or an interval exceeding the allowed  limit;  the
termination resets the currently defined number of legato tones;
tremolo is one legato  tone;  with  polyphony  or  tremolos  the
interval is determined with regard to the lowest tone.         
                                                               
4.5.4. INTERPUNCTION 1.  -  defines  other  possible  signs  for
phrasing and melody arrangement (if not set, no interpunction is
used) - 2 characters <78-79>                                   
                                                               
The -1 to -9 code is used  for  each  melodic  note  phrasing :
-1 - accent                                                    
-2 - staccato                                                  
-3 - accentuated staccato                                      
-4 - tenuto                                                    
-5 - accentuated tenuto                                        
-6 - portamento                                                
-7 - accentuated portamento                                    
-8 - glissando towards the nearest successive tone             
-9 - accentuated glissando                                     
                                                                
4.5.5. INTERPUNCTION  2.  -  selection  of  tones  for  phrasing
defined by 4.5.4. (if not set then all tones are affected by the
phrasing) - 2 characters <80-81>                               
                                                               
The -1 to -9 code is used for the tone selection :             
-1 - phrasing applies to groups only                           
-2 - phrasing applies to rhythmic values 8 and 16 (notes only) 
-3 - phrasing applies to groups and notes of 8 and 16 values   
-4 - phrasing applies to rhythmic values 4 to 16               
-5 - phrasing applies to groups and notes of 4 to 16 values    
-6 - phrasing applies to rhythmic values 1 to 4                 
-7 - phrasing applies to rhythmic values 1 to 4.               
-8 - phrasing applies to rhythmic values 1 to 2                
-9 - phrasing applies to rhythmic values 2 to 4                
                                                                
4.5.6. INTERPUNCTION 3. - further possibilities of tone and rest
interpunction as required by each individual composer (these can
only be set if no interpunction set by 4.5.4.)  -  2  characters
<80-81>                                                         
                                                               
Code 1 - 99 is used for INTERPUNCTION 3.                       
                                                               
4.5.7.  INSTRUCTIONS  -    further    instructions    concerning

expression, tempo, phrasing,  dynamics,  performance,  notation,
etc. - number of characters not limited <82-...>               
                                                               
These instructions are placed below staves,  if  in  parentheses
then placed above  staves  and  below  the  information  set  by
4.1.1., if in angle brackets then  placed  at  the  end  of  the
notated section, if separated by slashes then put one below  the
other.                                                          
                                                               
                                                               
                                                               
5. EXAMPLES SHOWING PARTS OF COMPOSITIONS IN THE  CODE  LANGUAGE
                FORM AND NOTES PRINTED ON PLOTTER              
                                                               
5.1. Score notation (Fig. 17.A., Fig. 17.B., Fig. 17.C.)       
----------------------------------------------------------------
                           Fig. 17.A.                          
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 17.B.                          
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 17.C.                          
----------------------------------------------------------------
                                                               
5.2. Monophonic notation (Fig. 18.A., Fig. 18.B., Fig. 18.C.)  
----------------------------------------------------------------
                           Fig. 18.A.                          
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 18.B.                          
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 18.C.                          
----------------------------------------------------------------
                                                                
5.3. Chord notation (Fig. 19.A., Fig. 19.B., Fig. 19.C.)       
----------------------------------------------------------------
                           Fig. 19.A.                          
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 19.B.                          
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 19.C.                          
----------------------------------------------------------------
                                                                
                                                               
                                                               
6. CONCLUSIONS                                                 
                                                                
   Computer can never replace man,  neither  in  the  sphere  of
science nor in the sphere of art. For the composer computer  may
be means for quickening the realization of  his  ideas  and  for
doing the unpleasant, uncreative and repetitive routine work for
him.                                                           
                                                               
   The program for instrumental and vocal music composition will
be extended to include the  possibility  of  changing  the  mode
within a section of a composition, generating the  next  melodic

tone with regard to more  than  one  preceding  tone,  selecting
rhythmic values in a different way  for  each  individual  beat,
using traditional harmony  in  a  more  complex  way  and  other
things. Notation will be  developed  further  to  correspond  to
contemporary notation requirements.                            
   The composer will be able to hear the  composition  generated
by the computer even before it is printed. This will be  enabled
by a many-part sound output using microcomputer, synthesizer and
the "MIDI" system (Musical Instrument  Digital  Interface)  [4],
adapted for the  purposes  of  the  program.  In  this  way  the
computer will provide a source of inspiration for the  composer,
being in direct interactive contact with him.                  
   The composer will then  be  able  to  enter  the  process  of
composition at any moment to realize better his ideas.         
                                                                
                                                               
                                                               
REFERENCES                                                     
                                                                
[1]  RUZICKA,  R.:  Využití  samočinných  počítačů  při   vzniku
uměleckých děl  se  zvláštním  zaměřením  na  hudbu  a  soudobou
hudební kompozici. [The Use of Computers in  Creating  Works  of
Art with Special Regard  to  Music  and  to  Contemporary  Music
Composition.] Ediční středisko JAMU, Brno 1980 (in Czech)      
                                                               
[2]  GOULD, M. J. - LOGEMANN, G. W.:  ALMA, Alphameric  Language
for Music Analysis. Musicology and the Computer, New York  1970,
pp. 57 - 90                                                    
                                                               
[3]  BALLOVA,  L'.:  Totožnos a  podobnos  melódií.  [Identity
and Similarity of Melodies.] Opus, Bratislava 1982, pp. 71 -  87
(in Slovak)                                                    
                                                               
[4]  LOY, G.:  Musicians Make a Standard: The  MIDI  Phenomenon.
Computer Music Journal, 1985, Vol. 9, No. 4, pp. 8 - 26        

 

 

 

 

 

 

 

 

 

 

 

 

.vř 3
.ds 80
   COMPUTER PROGRAM FOR COMPOSITION AND AUTOMATIC NOTATION OF
       INSTRUMENTAL AND VOCAL PIECES OF CONTEMPORARY MUSIC
 
 
Josef  GERBRICH,  Programmer
Institute of Computer Science of the J.E.Purkyně University,
Brno
 
Petr  RANDULA,  Programmer
Regional Institute of Design, Ustí nad Labem
 
Rudolf  RŮŽIČKA,  Composer

Janáček Academy of Performing Arts, Brno
 
 
A b s t r a c t. The contribution describes co-operation between
a composer  and  programmers  in  the  process  of  contemporary
serious  music  composition.  Generated  computer  programs  for
computer music composition can  be  used  by  both  students  of
composition and professional composers. They help them not  only
limit routine work but also choose  suitable  variations,  write
independent compositions, and find inspiration for their further
work. These methods using  random  generation  of  variants  can
support research on artificial intelligence  by  simulating  the
activity of human brain.
 
 
1. INTRODUCTION
 
   The  universal  program  for  contemporary   serious    music
composition together with programs for  automatic  notation  and
traditional notation output are intended for use by students  of
composition  [1]  as  well  as  by  professional  composers   of
different orientations. The program is one of  the  examples  of
the wide use of computer in the field of art in general  and  in
the very specific field of composition in particular.
   The program can also be used in  the  field  of  research  on
human thinking, as it is a model of human brain activity in that
it uses random operations, with  certain  limits  given  by  the
composer as well as the computer,  which  are  transformed  into
creative works of art.
 
   Wide knowledge is necessary for discovering all the relations
between individual elements constituting a  piece  of  music  as
well as for their description  in  the  form  of  algorithms  or
programs. The program  is  able  to  show  whether  the  defined
attributes and laws  of  a  certain  musical  style,  period  or
composer are really typical of the particular phenomenon or not.
The composer can have a part of  his  composition  generated  to
compare the result with his original idea and to add  some  more
details if required.
   The element of chance or random  choice,  enabling  different
variants  of  a  traditionally  written  piece  to  come    into
existence, is represented here by the random generator.  Primary
generation is controlled by a  number  of  limiting  conditions,
which only let through a small  part  of  the  musical  material
produced by the computer.
 
   The system described in great detail on the  following  pages
is just one of the many systems for contemporary  serious  music
composition written during nearly 30 years of the  existence  of
computer-assisted  composition,  research  and  teaching,    and
resulting  in  a  number  of  different  kinds  of  compositions
(chamber, instrumental and vocal pieces, concertos,  symphonies,
operas, cantatas, and electroacoustic pieces).
   The basic composition principle of the program is the use  of
pseudorandom numbers within defined limits. Random  numbers  are
intended to simulate random processes typical of the activity of
the nature and  human  brain.  The  result  is  a  specific  and
self-contained  composition  style.  The  basic  tool  producing
random processes in computer is the random generator,  which  is
able to output a succession of numbers within the range  0  -  1

which is repeated after several millions of members.
 
 
   The  program  includes  rules  restricting  the   composition
process,  similar  to  those  used  by  human    composers    of
contemporary serious music. These rules include  elimination  of
traditional  harmony,  i.e.  of  traditional  chords  and  their
combinations, elimination of classical polyphony  with  harmonic
basis, limitation of traditional rhythmical structures connected
with the division into bars (accented and non - accented  tones)
and elimination of traditional  methods  of  work  with  melody,
phrasing,  composition  structure  and  form  etc.  As  to   the
notation, contemporary music composers write each note with  its
accidental, simplify rhythmical structures and melodic  ornament
indications etc.
   There is therefore a new concept of melodic line,  rhythmical
structure,  harmony  and  polyphony  involved.  The    composer,
however,  is  still  allowed  to  use  traditional  scales   and
imitations of traditional melodic ornaments, irregular  rhythms,
elements of instrumental or vocal character of melody  (accents,
glissando,  legato,  staccato  etc.)  and  traditional  notation
(division  into  bars,  clefs,  transpositions  of  instruments,
scores etc.).
 
   Every classically educated composer will be able  to  prepare
data for the program, which means that even a  beginner  in  the
field of computer music will be able to work  with  the  program
and achieve good results. As there is  a  practically  unlimited
number of variants of the input data  for  the  program  and  an
unlimited  number  of  possible  results  (thanks   to    random
processes), every composer can show his individual abilities and
original approach. The possibility of  changing  the  percentage
tables of distribution of the results according to  the  demands
of  each  composer  (especially  in  the  field  of   rhythmical
structures, harmonic and melodic intervals, modes and polyphony)
is another great advantage of the  program.  With  the  help  of
appropriate parametres for pseudorandom numbers generation it is
possible to create melodic and rhythmical structures similar  to
traditional variations.
   There are two written forms of music composed with  the  help
of computer: automatic notation, which is a modified version  of
the transcribed music language in a form easily decipherable  by
performers, and traditional notation in the form of a score with
the possibility of extracting any individual  part.  The  latter
can be printed either on plotter or on adapted printer.
 
   The most important feature of the program is the fact that it
does not substitute the composer's creative work. It only  helps
him to realize his intentions more quickly and eliminates a  lot
of  routine  work,  such  as  dividing  the  score  into   bars,
transposing instruments and voices, the use of different  clefs,
forming the score and writing down each individual part.
 
 
2. DESCRIPTION OF THE PROGRAM  (Fig. 1.)
 
   The length of each composition is determined by the number of
bars  or  tones  and  rests.  It  is  necessary  to  define  the
proportion of tones and rests, ornamented and normal notes,  the
proportion of tremolos (trills, rollings,  frullatos  etc.)  and

groups (leaning notes, grouplets, arpeggios etc.). The range  of
melody is determined by the lowest and the highest pitches,  the
selection of tones that should be used is defined by the type of
mode. The selection of rhythmic values,  melodic  intervals  and
intervals  between  tones  in  chords  is  based    on    chosen
distribution functions.  Tremolo  is  defined  by  the  interval
between the two tones, the number of tones in ornaments  by  the
minimum and maximum number, polyphony by the  number  of  parts.
Two  types  of  transposition  (modal  and  instrumental)  allow
modifications of the basic modes and  automatic  corrections  of
the parts for transposing instruments. The selection  of  tones,
rhythms and some other elements  is  done  through  pseudorandom
number generation according to a defined discrete  distribution.
Separate utility programs  extract  individual  parts  from  the
score using for each instrument a suitable clef  and  signs  and
allowing the use of traditional notation.
----------------------------------------------------------------
Fig. 1. Flow chart of main  program  and  utility  programs  for
                       automatic notation
----------------------------------------------------------------
 
 
3. NOTATION CODE
 
   The notation code included in this program is  based  on  the
"ALMA" language (Alphanumeric  Language  for  Musical  Analysis)
[2], [3] in a partly adapted form suitable for this program. The
notation is supposed to be produced by computer peripheries. The
basic feature of the code  is  understandability  for  musicians
accustomed  to  traditional  notation  and  legibility  for  the
computer at the same time.
 
3.1.
 
rhythmic values (Fig. 2.A.) :
           1     semibreve (whole note) or semibreve rest
           2     minim (half note)
           4     crotchet  (quarter note)
           8     quaver (eighth note)
           16    semiquaver (sixteenth note)
           .     dot after a note or a rest
           ..    two dots
----------------------------------------------------------------
                            Fig. 2.A.
----------------------------------------------------------------
P       rest
( )     irregular rhythm (triplet, quintuplet)
/       bar-line
2:4     two-fourth time
 
tone names:   C, D, E, F, G, A, H
 
accidentals:   X     sharp
               B     flat
               N     natural
 
tone systems:   A-3 ... H-3     subcontraoctave
                C-2 ... H-2     contraoctave
                C-1 ... H-1     great octave
                C0  ... H0      small octave

                C1  ... H1      one-line octave
                C2  ... H2      two-line octave
                C3  ... H3      three-line octave
                C4  ... H4      four-line octave
                C5              five-line octave
 
Q     melodic ornament (grouplet,  acciacatura,  turn,  mordent,
      arpeggio etc.)
+     other tones of melodic ornament
W     tremolo, trill, roll, frullato etc.
&     other tremolo or trill tones
*     next harmonic tone
 
=     tied notes
< >   beginning and end of legato
,     separation of clefs, metre signs or rhythmic values
 
clefs (Fig. 2.B.):   KG    treble clef (G clef)
                     KF    bass clef (F clef)
                     KC3   alto C clef
                     KC4   tenor C clef
----------------------------------------------------------------
                            Fig. 2.B.
----------------------------------------------------------------
 
3.2.
 
clef ::=  { KG | KC3 | KC4 | KF }
measure ::=  { 1 | 2 | 3 | ... } : { 1 | 2 | 4 | 8 | 16 }
rhythm ::=  { 1 | 2..| 2.| 2 | 4..| 4.| 4 | 8.| 8 | 16 }
irregular_rhythm ::=
   { 1 | 2 | 4 | 8 }  ( { 2 | 4 | 8 | 16 } ... )
rest ::=  { rhythm | irregular_rhythm }  P
 
tone == basic_tone ::=  { C | D | E | F | G | A | H }
accidental ::=  { X | B | N }
octave ::=  { -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 }
pitch ::=  [ accidental ]  tone  octave
set == set_of_pitches ::=  pitch  [ * pitch ] ...
 
note ::=  { rhythm | irregular_rhythm }  set
tremolo == trill ::=  rhythm  W  set  &  set
ornament == melodic_ornament ::=  Q  set  [ + set ] ... + note
notation ::=  { note | tremolo | ornament }
tie == tied_tones ::=
   notation  { =  [ bar-line ]  notation } ...
 
element == basic_element_of_composition_structure ::=
   { notation | tie | rest }  { separator | bar-line }
legato ::=  < element ... >
sector == sector_of_composition ::=  clef  separator
   [ measure  separator ]  { element | legato } ...
composition ::=  sector ...
 
3.3.
 
Example of transcribed notation  output  on  the  printer  (Fig.
3.A., Fig. 3.B.)
----------------------------------------------------------------
                            Fig. 3.A.

----------------------------------------------------------------
----------------------------------------------------------------
                            Fig. 3.B.
----------------------------------------------------------------
 
 
 
4. SETTING UP PARAMETERS IN THE PROCESS OF COMPOSITION
 
   Parameters can be set either by writing  the  values  on  the
terminal screen or by preparing them beforehand and storing them
in the data file. The program is intended for the PDP 11/34  and
ADT 4500 (HP 1000) computers  and  the  FORTRAN  IV-VO2.2-5  and
FORTRAN 4X rev.2340  programming  languages.  There  is  also  a
version compatible with IBM PC.
 
 
4.1. Name
 
4.1.1. HEADING - general details about the  composition  or  its
part - the maximum number of characters - 20, positions  <01-20>
in the data file
 
Values in parentheses are placed above the staff in the score or
part; values in square brackets are situated  in  front  of  the
staff; values separated by slashes are put one below the  other;
values that are not in brackets are not written in the score.
 
 
4.2. Tone length
 
4.2.1. METRE - (example  2,4  -  two-four  time)  -  2  times  2
characters <21-22><23-24>
 
4.2.2. BAR NUMBER - (only when metre is defined in 4.2.1.)  -  3
characters <25-27>
 
Example (Fig. 4.) :
----------------------------------------------------------------
                             Fig. 4.
----------------------------------------------------------------
 
4.2.3. NUMBER OF RHYTHMIC VALUES  -  determines  tone  and  rest
lengths, only when no metre is defined by 4.2.1. - 3  characters
<25-27>
 
4.2.4. RHYTHM - selection of rhythmic values based on percentage
tables of pseudorandom process distribution; the tables  can  be
changed and amended to meet the requirements of each  individual
composer; irregular rhythms can only be required if  4.2.3.  has
been set - 2 characters <28-29>
 
4.2.5. " * " - multiple of basic rhythmic  values  (if  not  set
then the basic rhythmic values do not  change)  -  2  characters
<30-31>
 
4.2.6. " + " - a defined rhythmic value added to the set  values
(if not set then the basic rhythmic values do not  change)  -  2
characters <32-33>
 

Example (Fig. 5.A., Fig. 5.B.) :
----------------------------------------------------------------
                            Fig. 5.A.
----------------------------------------------------------------
the RHYTHM percentage table 5 shows the  following  distribution
of individual tone lengths :
16 - 50%, 8 - 25%, 8. - 10%, 4 - 15%;
the required conversion gives the following structure :
4 - 50%, 4. - 25%, 2 - 10%, 2=8 - 15%
----------------------------------------------------------------
                            Fig. 5.B.
----------------------------------------------------------------
 
Rhythmic values in the form of a single note or rest  are  often
difficult for the performer to read; notations b)  and  c)  from
the three examples given  below  are  written  in  a  much  more
comprehensible way than a). The notation shown in c)  shows  the
most cleary presented rhythmical structure; in  b)  and  c)  the
rhythmic structure is presented according to  the  metre.  (Fig.
6.)
----------------------------------------------------------------
                             Fig. 6.
----------------------------------------------------------------
 
A special algorithm has been developed for automatic arrangement
of  rhythmical  notation  into  bars  in  a  logic  and   easily
decipherable way. (Fig. 7.)
----------------------------------------------------------------
      Fig. 7.  The automatic rhythmical notation algorithm
----------------------------------------------------------------
 
t  ... the moment of a new rhythmic value appearance (t  =  0  -
       the beginning of a bar)
M  ... the length of a bare
l  ... a new rhythmic value input
l' ... a section of "l" that is going to be processed
d  ... a section of "l'" that is to be output in the form  of  a
       single note
t' ... the moment of a new note appearance
s  ... a step on the time axis (t' := t + s)
 
A. if a new value is longer  than  the  remaining  part  of  the
   particular bar (t + l > M), then a shorter value will be used
   in the moment:  l' := M - t, otherwise  l' := l
B. the first "d" value that can be used within "l'" is found  in
   the table  of  selected  values  for  the  allowed  positions
   within the bar (into "t" moment)
B1. if the appearance of the "d" note  corresponds  to  the  "t"
    time then the "d" value is output, the original "l" value is
    shortened (l := l - d) and if the result is  non-zero,  then
    another step A. is applied and the next note is tied to  the
    first one; the algorithm is terminated when  l = 0
B2. if the "t'" moment of  the  "d"  note  appearance  does  not
    correspond to "t", the  l' := t' - t  section that has  been
    left out will be created first, beginning with step B.
 
4.2.7. TONE/REST - ratio of tone and rest occurrences determined
by pseudorandom occurrence tables alterable by  each  individual
composer; two and more  successive  rests  are  joined  together
(this should always be set) - 1 character <34>

 
4.2.8. TONE/ORNAMENT - ratio of tone  and  ornament  occurrences
determined by pseudorandom occurrence tables (this should always
be set) - 1 character <35>
 
4.2.9. TREMOLO/GROUP - ratio  of  tremolos,  trills,  rolls  and
frullatos (from now on referred to as "tremolos" for short)  and
other ornaments  (grouplets,  leaning  notes,  turns,  mordents,
arpeggios etc.) - from now on referred to as "groups" for  short
- which are not taken as rhythmic values (set only  if  ORNAMENT
required by 4.2.8) - 1 character <36>
 
Example (Fig. 8.A., Fig. 8.B.) :
----------------------------------------------------------------
                            Fig. 8.A.
----------------------------------------------------------------
the ratio of tone and rest  occurrences  (75%  -  tones,  25%  -
rests)  determined  by  the  percentage  occurrence   table    3
(TONE/REST);
the ratio of tone and ornament occurrences (50% - tones,  50%  -
ornaments) determined  by  the  percentage  occurrence  table  4
(TONE/ORNAMENT);
the ratio of tremolo and group occurrences (25% - tremolos,  75%
- groups)  determined  by  the  percentage  occurrence  table  5
(TREMOLO/GROUP)
----------------------------------------------------------------
                            Fig. 8.B.
----------------------------------------------------------------
 
4.2.10. TREMOLO INTERVALS - determines the intervals of tremolos
according to the percentage given in the tables; the size of the
intervals is defined by the number of semitones  (interval  1  -
minor 2nd, 2 - major 2nd, 3 - minor 3rd, 4 -  major  3rd  etc.);
(set only if TREMOLO required by 4.2.9.) - 2 characters <37-38>
 
4.2.11. SIZE OF GROUP - the smallest and largest number of tones
within a group (based on random choice  and  even  distribution)
including the nearest rhythmic tone following the group, in  the
case the same number is set for all groups it is  sufficient  to
input one value only (set only if GROUP required by 4.2.9.) -  2
times 2 characters <39-40><41-42>
 
Example (Fig. 9.A., Fig. 9.B.) :
----------------------------------------------------------------
                            Fig. 9.A.
----------------------------------------------------------------
the choice of melodic intervals in tremolos is determined by the
percentage table 11 (TREM.INTERVALS) approximate occurrences:
1 - 25%, 2 - 35%, 3 - 20%, 4 - 20%;
in SIZE OF GROUP the groups of 6 to 10 are  evenly  distributed,
each forming 20%
----------------------------------------------------------------
                            Fig. 9.B.
----------------------------------------------------------------
 
 
4.3. Tone pitch
 
4.3.1. AMBIT OF MELODY - allowed range of  pitches;  the  lowest
and the highest tone that can be used in a  composition  or  its

part and that falls within the basic,  non-transposed  sound  of
the  instrument  (this  should  always  be  set)  -  2  times  4
characters <43-46><47-50>
 
Example (Fig. 10.) :
----------------------------------------------------------------
                            Fig. 10.
----------------------------------------------------------------
the setting BH-1,XF3 defines the range by the limits of  B  flat
in great octave and F sharp in three-line octave
 
4.3.2. MODES - the enumeration of tones that can be used in  the
composition - can be altered and augmented by the  composer;  if
the mode is not repeated after an octave is completed,  then  C1
is the beginning (this should always  be  set)  -  2  characters
<51-52>
 
Survey of the modes used (includes definitions of all  common  5
to 12-tone modes beginning with the oldest  historic  pentatonic
mode and including the whole-tone and diatonic modes, Messiaen's
modes, chromatic scale and all modes with the period other  than
octave and the interval combinations  1,2,3,4  and  the  maximum
number of 3 intervals of the same or different size). (Fig. 11.)
----------------------------------------------------------------
                      Fig. 11. Modes table
----------------------------------------------------------------
 
Mode definition is based on ascribing 0 or 1 to each tone of the
tone system (0 - tone will not be used in the  mode,  1  -  tone
will be used); the first value defining the period of  the  mode
is denoted C1 (or transposed  C1)  and  the  other  values  then
correspond to the successive semitones. After the defined period
is completed the values are repeated automatically  in  both  up
and down directions from the basic period.
 
Example (Fig. 12.A., Fig. 12.B.) :
----------------------------------------------------------------
                           Fig. 12.A.
----------------------------------------------------------------
----------------------------------------------------------------
Fig. 12.B. Graphic presentation of mode  28  with  the  help  of
                            keyboard
----------------------------------------------------------------
 
4.3.3. DIRECTION OF MELODY -  forced  melody  direction  (up  or
down) based on percentage limitation chosen by the composer;  if
a next tone in the defined direction exceeds the allowed  range,
it is not accepted and another suitable tone is  generated;  the
result is that melody runs within the defined part of the  range
- to realize this intention the first 50 tones of the melody are
ignored (this should always be set) - 1 character <53>
 
Example (Fig. 13.A., Fig. 13.B.) :
----------------------------------------------------------------
                           Fig. 13.A.
----------------------------------------------------------------
the ratio of rising and  falling  intervals  of  the  melody  is
determined by the percentage table 6 (DIRECTION):
rising intervals - 75%, falling intervals - 25%
----------------------------------------------------------------

                           Fig. 13.B.
----------------------------------------------------------------
 
4.3.4. NUMBER OF VOICES - maximum number of voices that  are  to
form a  many-part  harmony;  the  lowest  part  -  melody  -  is
generated according to the parametres set by 4.2.1. to  4.2.11.,
4.3.1. to 4.3.3. and 4.3.7.; when  any  of  the  other  harmonic
parts exceeds the range  defined  by  4.3.1.  the  tone  is  not
realized (if the number of parts is not set to be 2 or more then
no polyphony is generated) - 2 characters <54-55>
 
4.3.5. HARMONY - the character of harmony  and  tremolos  within
and outside the limits of the defined mode and range of  melody;
when a required harmonic or tremolo tone is not found within the
defined mode after 1000 attempts have been made, the tone is not
realized (this is only set when TREMOLO is required by 4.2.9. or
when the number of voices is set do be 2 or more by 4.3.4.) -  1
character <56>
 
The character of harmony and tremolos is defined with  the  help
of code numbers 1 to 4 :
1 - generation of tones is controlled  by  a  defined  mode  and
    range of melody
2 - generation of tones is controlled by a defined mode
3 - generation of tones is controlled by a defined range
4 - generation of tones is not limited
 
4.3.6. HARMONIC INTERVALS - pseudorandom percentage tables limit
the occurrences of intervals in the many-part structure (this is
only set when the number of parts is set to  be  2  or  more  by
4.3.4.) - 2 characters <57-58>
 
4.3.7. MELODIC INTERVALS - pseudorandom percentage tables  limit
the occurrences of melodic intervals (this should always be set)
- 2 characters <59-60>
 
Example (Fig. 14.A., Fig. 14.B.) :
----------------------------------------------------------------
                           Fig. 14.A.
----------------------------------------------------------------
percentage table 6  (HARM.INTERVALS)  determines  the  ratio  of
intervals in the many-part structure:
interval 3 - 50%, interval 4 - 50%;
percentage table  3  (MEL.INTERVALS)  determines  the  ratio  of
melodic intervals :
interval 0 - 20%, 1 - 17.1%, 2 - 14.5%, 3 - 12%, 4 - 9.9%,  5  -
7.9%, 6 - 6.15%, 7 - 4.6%, etc.
----------------------------------------------------------------
                           Fig. 14.B.
----------------------------------------------------------------
 
4.3.8. TRANSPOSITION - the first value determines the number  of
semitones by which the mode is to be transposed without changing
the  melody  range;  the  second  value  determines   instrument
transposition resulting in the change in the melody range set by
4.3.1. - 2 times 3 characters <61-63><64-66>
 
Example (Fig. 15.) :
----------------------------------------------------------------
                            Fig. 15.

----------------------------------------------------------------
the setting -8,14 defines mode transposition by minor 6th in the
downward direction and instrument transposition by major 9th  in
the upward direction (for example with the B flat bass clarinet)
 
 
4.4. Initialisation
 
Initial parametres for the pseudorandom generator (the first  of
each pair of numbers should be set,  the  second  number  always
being 0) should be set separately  for  tone  lengths  and  tone
pitches, the advantage of this is the possibility of  generating
classical variation sections of  the  compositions;  to  achieve
even distribution of pseudorandom numbers the first  50  numbers
are eliminated.
 
4.4.1. RHYTHM-RANDOM - initial parametres of  pseudorandom  data
for 4.2.4., 4.2.7 to 4.2.11. (these should always be  set)  -  4
characters <67-70>
 
4.4.2. MELODY-RANDOM - initial parametres of  pseudorandom  data
for 4.3.3., 4.3.6., 4.3.7. (these should  always  be  set)  -  4
characters <71-74>
 
 
4.5. Notation
 
Notation  observes  traditional  rules  connected    with    the
arrangement of the score and  individual  parts  with  the  only
exception of accidentals with each individual  note  (only  tied
notes have one common accidental); graphic form of ornaments  is
simpler than the traditional one, ornaments are notated by black
note-heads placed into the particular beat;  tremolo  tones  are
placed in square brackets and their rhythmic values  are  signed
separately.
 
A special algorithm has been developed for automatic notation of
accidentals in a logic and easily decipherable way. (Fig. 16.)
----------------------------------------------------------------
              Fig. 16. Automatic notation algorithm
----------------------------------------------------------------
N  ... notes  C D E F G A H  (without accidentals)
X  ... notes  XC XD XF XG XA  (with sharps)
B  ... notes  BD BE BG BA BH  (with flats)
 
I1  ... intervals  {1,3,5,8,10} + 12 * o;  o = 0,1,2,3,4,5,6,7
I2  ... intervals  {2,4,7,9,11} + 12 * o
I3  ... intervals  {6} + 12 * o
I4  ... intervals  1,3,5
I5  ... intervals  2,4,7
 
A1. X is followed by X or N
A2. B is followed by B or N
B. if N is followed by X or B, then:
B1. for I1 in  the  upward  direction  or  I2  in  the  downward
    direction, if the nearest successive "N" follows I4  in  the
    upward direction or  I5  in  the  downward  direction,  then
    select "X", otherwise select "B"
B2. for I1 in  the  downward  direction  or  I2  in  the  upward
    direction, if the nearest successive "N" follows I4  in  the

    downward direction or  I5  in  the  upward  direction,  then
    select "B", otherwise select "X"
B3. for I3 in the upward or downward direction, if  the  nearest
    successive "N" follows I1 in the upward direction or  I2  in
    the downward direction, then select "X",  if  "N"  does  not
    follow, select one of the notes {XC, BE, XF, XG, BH}
B4. for I3 in the upward or downward direction, if  the  nearest
    successive "N" follows I1 in the downward direction or I2 in
    the upward direction, then  select  "B",  if  "N"  does  not
    follow, select one of the notes {XC, BE, XF, XG, BH}
C. for polyphony within one single staff or tremolo:
C1. the lowest tones are governed by the rules A1. - A2. and B1.
    - B4.
C2. the rest is governed by the same rules but the highest  tone
    of the polyphony or the basic tone of the  tremolo  is  only
    significant as the last melodic tone
 
4.5.1. STAVES -  automatic  distribution  of  polyphony  into  a
defined number of staves based on higher part priority (this  is
only set  if  more  than  1  part  required  by  4.3.4.  and  if
more-stave notation selected); codes -1 to -4 are used to define
notation using staves with less than  5  lines  (for  percussion
instruments) - 2 characters <75-76>
 
4.5.2. CLEFS - automatic selection of clefs used with the  given
instrument (if not set,  no  clef  is  used  -  especially  with
percussion instruments) - 1 character <77>
 
The code 1, 2, 3, 7, 9 defines the use of clefs :
1 - treble G clef (KG)
2 - bass F clef (KF)
3 - treble and bass clefs (KG + KF)
4 - tenor C clef (KC4)
7 - treble, tenor and bass clefs (KG + KC4 + KF)
8 - alto C clef (KC3)
9 - treble and alto clefs (KG + KC3)
 
4.5.3. LEGATO - the first value is the number of  legato  tones,
the second value is the maximum number of semitones  determining
the interval for which the legato is allowed (if not set then no
legato is signed) - 2 times 2 characters <78-79><80-81>
 
The defined legato group is terminated by a repeated  tone,  the
end of a group or an interval exceeding the allowed  limit;  the
termination resets the currently defined number of legato tones;
tremolo is one legato  tone;  with  polyphony  or  tremolos  the
interval is determined with regard to the lowest tone.
 
4.5.4. INTERPUNCTION 1.  -  defines  other  possible  signs  for
phrasing and melody arrangement (if not set, no interpunction is
used) - 2 characters <78-79>
 
The -1 to -9 code is used  for  each  melodic  note  phrasing :
-1 - accent
-2 - staccato
-3 - accentuated staccato
-4 - tenuto
-5 - accentuated tenuto
-6 - portamento
-7 - accentuated portamento

-8 - glissando towards the nearest successive tone
-9 - accentuated glissando
 
4.5.5. INTERPUNCTION  2.  -  selection  of  tones  for  phrasing
defined by 4.5.4. (if not set then all tones are affected by the
phrasing) - 2 characters <80-81>
 
The -1 to -9 code is used for the tone selection :
-1 - phrasing applies to groups only
-2 - phrasing applies to rhythmic values 8 and 16 (notes only)
-3 - phrasing applies to groups and notes of 8 and 16 values
-4 - phrasing applies to rhythmic values 4 to 16
-5 - phrasing applies to groups and notes of 4 to 16 values
-6 - phrasing applies to rhythmic values 1 to 4
-7 - phrasing applies to rhythmic values 1 to 4.
-8 - phrasing applies to rhythmic values 1 to 2
-9 - phrasing applies to rhythmic values 2 to 4
 
4.5.6. INTERPUNCTION 3. - further possibilities of tone and rest
interpunction as required by each individual composer (these can
only be set if no interpunction set by 4.5.4.)  -  2  characters
<80-81>
 
Code 1 - 99 is used for INTERPUNCTION 3.
 
4.5.7.  INSTRUCTIONS  -    further    instructions    concerning
expression, tempo, phrasing,  dynamics,  performance,  notation,
etc. - number of characters not limited <82-...>
 
These instructions are placed below staves,  if  in  parentheses
then placed above  staves  and  below  the  information  set  by
4.1.1., if in angle brackets then  placed  at  the  end  of  the
notated section, if separated by slashes then put one below  the
other.
 
 
5. EXAMPLES SHOWING PARTS OF COMPOSITIONS IN THE  CODE  LANGUAGE
                FORM AND NOTES PRINTED ON PLOTTER
 
5.1. Score notation (Fig. 17.A., Fig. 17.B., Fig. 17.C.)
----------------------------------------------------------------
                           Fig. 17.A.
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 17.B.
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 17.C.
----------------------------------------------------------------
 
5.2. Monophonic notation (Fig. 18.A., Fig. 18.B., Fig. 18.C.)
----------------------------------------------------------------
                           Fig. 18.A.
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 18.B.
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 18.C.
----------------------------------------------------------------

 
5.3. Chord notation (Fig. 19.A., Fig. 19.B., Fig. 19.C.)
----------------------------------------------------------------
                           Fig. 19.A.
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 19.B.
----------------------------------------------------------------
----------------------------------------------------------------
                           Fig. 19.C.
----------------------------------------------------------------
 
 
 
6. CONCLUSIONS
 
   Computer can never replace man,  neither  in  the  sphere  of
science nor in the sphere of art. For the composer computer  may
be means for quickening the realization of  his  ideas  and  for
doing the unpleasant, uncreative and repetitive routine work for
him.
 
   The program for instrumental and vocal music composition will
be extended to include the  possibility  of  changing  the  mode
within a section of a composition, generating the  next  melodic
tone with regard to more  than  one  preceding  tone,  selecting
rhythmic values in a different way  for  each  individual  beat,
using traditional harmony  in  a  more  complex  way  and  other
things. Notation will be  developed  further  to  correspond  to
contemporary notation requirements.
   The composer will be able to hear the  composition  generated
by the computer even before it is printed. This will be  enabled
by a many-part sound output using microcomputer, synthesizer and
the "MIDI" system (Musical Instrument  Digital  Interface)  [4],
adapted for the  purposes  of  the  program.  In  this  way  the
computer will provide a source of inspiration for the  composer,
being in direct interactive contact with him.
   The composer will then  be  able  to  enter  the  process  of
composition at any moment to realize better his ideas.
 
 
 
REFERENCES
 
[1]  RŮŽIČKA, R.: Využití samočinných počítačů při vzniku
     uměleckých děl se zvláštním zaměřením na hudbu a
     soudobou hudební kompozici [The Use of Computers in
     Creating Works of Art with Special Regard to Music and
     to Contemporary Music Composition]. Ediční středisko
     JAMU, Brno 1980 (in Czech)
 
[2]  GOULD, M. J. - LOGEMANN, G. W.: ALMA, Alphameric
     Language for Music Analysis. Musicology and the
     Computer, New York 1970, pp. 57-90
 
[3]  BALLOVÁ, L'.: Totožnosť a podobnosť melódií [Identity
     and Similarity of Melodies]. Opus, Bratislava 1982, pp.
     71-87 (in Slovak)
 
[4]  LOY, G.: Musicians Make a Standard: The MIDI

     Phenomenon. Computer Music Journal, 1985, Vol. 9, No.
     4, pp. 8-26
 
LITERATURE
 
[5]  TJEPKEMA, S. L.: A Bibliography of Computer Music.
     University of Iowa Press, Iowa City 1981
 
[6]  Foundations of Computer Music, edited by C. Roads &
     J. Strawn, MIT Press, Cambridge 1985
 
[7]  Musical Thought at IRCAM, edited by T. Machover,
     Contemporary Music Review, Part I, 1984, Harwood
     Academic Publishers, London
 
[8]  DODGE, C. - JERSE, T. A.: Computer Music. Synthesis,
     Composition, and Performance. Schirmer Books, New York
     1985
 
[9]  BATEL, G. - KLEINEN, G. - SALBERT, D.: Computermusik.
     Laaber Verlag, Laaber 1987 (in German)
 
[10] ZARIPOV, R., C.: Mashinniy poisk variantov pri
     modelirovaniyi tvorcheskogo processa [The Machine Search of
     Variants with the Imitating Creative Process]. Nauka,
     Moskva 1983 (in Russian)
 
[11] MANNING, P.: Electronic and Computer Music. Clarendon
     Press, Oxford 1987
 
[12] Musik und Mathematik. Salzburger Musikgesprach unter
     Vorsitz von H. v. Karajan. Springer-Verlag Berlin,
     Heidelberg 1985 (in German).vř 3

 

 

 

 

 

 

 

 

 

 

  COMPUTER PROGRAM FOR COMPOSITION AND AUTOMATIC NOTATION
   OF INSTRUMENTAL AND VOCAL PIECES OF CONTEMPORARY MUSIC
 
Josef Gerbrich, Programmer
Institute of Computer Science of the J.E.Purkyně University,
Brno
 
Petr Randula, Programmer
Regional Institute of Design, Ústí nad Labem
 
Rudolf Růžička, Composer
Janáček Academy of Performing Arts, Brno
 
 
     Abstract.   The   contribution  describes  co-operation
between  a  composer  and  programmers  in  the  process  of

contemporary  serious  music composition. Generated computer
programs  for computer music composition can be used by both
students  of  composition  and  professional composers. They
help  them  not  only  limit  routine  work  but also choose
suitable  variations,  write  independent  compositions, and
find inspiration for their further work. These methods using
random  generation  of  variants  can  support  research  on
artificial  intelligence by simulating the activity of human
brain.
.ns
     1. INTRODUCTION
 
     The  universal  program  for contemporary serious music
composition  together  with  programs for automatic notation
and  traditional  notation  output  are  intended for use by
students  of  composition  [1]  as  well  as by professional
composers  of  different orientations. The program is one of
the examples of the wide use of computer in the field of art
in  general and in the very specific field of composition in
particular.
     The  program  can also be used in the field of research
on  human thinking, as it is a model of human brain activity
in that it uses random operations, with certain limits given
by   the  composer  as  well  as  the  computer,  which  are
transformed into creative works of art.
     Wide  knowledge  is  necessary  for discovering all the
relations  between  individual elements constituting a piece
of  music  as  well  as for their description in the form of
algorithms  or programs. The program is able to show whether
the  defined attributes and laws of a certain musical style,
period  or  composer  are  really  typical of the particular
phenomenon  or  not.  The  composer  can  have a part of his
composition   generated  to  compare  the  result  with  his
original idea and to add some more details if required.
     The  element  of  chance  or  random  choice,  enabling
different  variants of a traditionally written piece to come
into existence, is represented here by the random generator.
Primary  generation  is  controlled  by a number of limiting
conditions,  which  only  let  through  a  small part of the
musical material produced by the computer.
.ns
     The  system  described in great detail on the following
pages  is  just  one  of  the  many systems for contemporary
serious  music composition written during nearly 30 years of
the existence of computer-assisted composition, research and
teaching,  and  resulting  in a number of different kinds of
compositions   (chamber,   instrumental  and  vocal  pieces,
concertos, symphonies, operas, cantatas, and electroacoustic
pieces).
     The  basic  composition principle of the program is the
use  of  pseudorandom  numbers within defined limits. Random
numbers are intended to simulate random processes typical of
the  activity of the nature and human brain. The result is a
specific  and  self-contained  composition  style. The basic
tool  producing  random  processes in computer is the random
generator,  which  is able to output a succession of numbers
within  the  range  0  -  1  which is repeated after several
millions of members.
     The  program includes rules restricting the composition
process,  similar  to  those  used  by  human  composers  of
contemporary  serious music. These rules include elimination
of traditional harmony, i.e. of traditional chords and their

combinations,   elimination   of  classical  polyphony  with
harmonic   basis,   limitation   of  traditional  rhythmical
structures  connected  with the division into bars (accented
and  non  -  accented  tones) and elimination of traditional
methods of work with melody, phrasing, composition structure
and  form  etc.  As  to  the  notation,  contemporary  music
composers  write  each  note  with  its accidental, simplify
rhythmical structures and melodic ornament indications etc.
.ns
     There  is  therefore  a  new  concept  of melodic line,
rhythmical  structure,  harmony  and polyphony involved. The
composer,  however,  is  still  allowed  to  use traditional
scales  and  imitations  of  traditional  melodic ornaments,
irregular   rhythms,   elements  of  instrumental  or  vocal
character  of  melody  (accents, glissando, legato, staccato
etc.)  and  traditional notation (division into bars, clefs,
transpositions of instruments, scores etc.).
     Every  classically  educated  composer  will be able to
prepare  data  for  the  program,  which  means  that even a
beginner in the field of computer music will be able to work
with  the  program  and  achieve good results. As there is a
practically  unlimited  number of variants of the input data
for  the program and an unlimited number of possible results
(thanks  to  random  processes), every composer can show his
individual  abilities and original approach. The possibility
of  changing  the  percentage  tables of distribution of the
results   according   to   the   demands  of  each  composer
(especially  in the field of rhythmical structures, harmonic
and melodic intervals, modes and polyphony) is another great
advantage  of  the  program.  With  the  help of appropriate
parametres   for   pseudorandom  numbers  generation  it  is
possible to create melodic and rhythmical structures similar
to traditional variations.
     There  are two written forms of music composed with the
help  of  computer:  automatic notation, which is a modified
version  of  the transcribed music language in a form easily
decipherable  by performers, and traditional notation in the
form  of  a  score  with  the  possibility of extracting any
individual part. The latter can be printed either on plotter
or on adapted printer.
.ns
     The  most  important feature of the program is the fact
that it does not substitute the composer's creative work. It
only  helps  him  to realize his intentions more quickly and
eliminates a lot of routine work, such as dividing the score
into  bars,  transposing  instruments and voices, the use of
different  clefs,  forming  the  score and writing down each
individual part.
 
 
     2. DESCRIPTION OF THE PROGRAM (Fig.1)
 
     The  length  of  each  composition is determined by the
number of bars or tones and rests. It is necessary to define
the  proportion  of  tones  and rests, ornamented and normal
notes,   the   proportion  of  tremolos  (trills,  rollings,
frullatos   etc.)  and  groups  (leaning  notes,  grouplets,
arpeggios  etc.).  The  range of melody is determined by the
lowest  and the highest pitches, the selection of tones that
should be used is defined by the type of mode. The selection
of  rhythmic values, melodic intervals and intervals between
tones  in  chords is based on chosen distribution functions.

Tremolo  is  defined  by the interval between the two tones,
the  number of tones in ornaments by the minimum and maximum
number,  polyphony  by  the  number  of  parts. Two types of
transposition  (modal  and instrumental) allow modifications
of  the  basic  modes and automatic corrections of the parts
for transposing instruments. The selection of tones, rhythms
and  some other elements is done through pseudorandom number
generation  according  to  a  defined discrete distribution.
Separate  utility programs extract individual parts from the
score  using  for  each instrument a suitable clef and signs
and allowing the use of traditional notation.
.ns
------------------------------------------------------------
 Fig.1: Flow chart of main program and utility programs for
                     automatic notation
------------------------------------------------------------
 
 
     3. NOTATION CODE
 
     The  notation code included in this program is based on
the  "ALMA"  language  (Alphanumeric  Language  for  Musical
Analysis)  [2],  [3]  in  a partly adapted form suitable for
this  program.  The  notation  is supposed to be produced by
computer  peripheries.  The  basic  feature  of  the code is
understandability  for  musicians  accustomed to traditional
notation and legibility for the computer at the same time.
 
     3.1.
 
Rhythmic values (Fig.2a):
 
     1     semibreve (whole note) or semibreve rest
     2     minim (half note)
     4     crotchet (quarter note)
     8     quaver (eighth note)
     16    semiquaver (sixteenth note)
     .     dot after a note or a rest
     ..    two dots
.ns
------------------------------------------------------------
                           Fig.2a
------------------------------------------------------------
 
     P     rest
     ( )   irregular rhythm (triplet, quintuplet)
     /     bar-line
     2:4   two-fourth time
 
Tone names:
 
     C, D, E, F, G, A, H
 
Accidentals:
 
     X     sharp
     B     flat
     N     natural
.ns
tone systems:
 
     A-3..H-3     subcontraoctave
     C-2..H-2     contraoctave

     C-1..H-1     great octave
     C0...H0      small octave
     C1...H1      one-line octave
     C2...H2      two-line octave
     C3...H3      three-line octave
     C4...H4      four-line octave
     C5           five-line octave
 
     Q     melodic ornament (grouplet, acciacatura, turn,
           mordent, arpeggio etc.)
     +     other tones of melodic ornament
     W     tremolo, trill, roll, frullato etc.
     &     other tremolo or trill tones
     *     next harmonic tone
     =     tied notes
     < >   beginning and end of legato
     ,     separation of clefs, metre signs or rhythmic values
 
clefs (Fig.2b):
 
     KG    treble clef (G clef)
     KF    bass clef (F clef)
     KC3   alto C clef
     KC4   tenor C clef
.ns
------------------------------------------------------------
                           Fig.2b
------------------------------------------------------------
 
     3.2.
 
clef ::= { KG | KC3 | KC4 | KF }
measure ::= { 1 | 2 | 3 | ... } : { 1 | 2 | 4 | 8 | 16 }
rhythm ::= { 1 | 2..| 2.| 2 | 4..| 4.| 4 | 8.| 8 | 16 }
irregular_rhythm ::= { 1 | 2 | 4 | 8 } ( { 2 | 4 | 8 | 16 } ... )
rest ::= { rhythm | irregular_rhythm } P
tone == basic_tone ::= { C | D | E | F | G | A | H }
accidental ::= { X | B | N }
octave ::= { -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 }
pitch ::= [ accidental ] tone octave
set == set_of_pitches ::= pitch [ * pitch ] ...
note ::= { rhythm | irregular_rhythm } set
tremolo == trill ::= rhythm W set & set
ornament == melodic_ornament ::= Q set [ + set ] ... + note
notation ::= { note | tremolo | ornament }
tie == tied_tones ::= notation { = [ bar-line ] notation } ...
element == basic_element_of_composition_structure ::=
   { notation | tie | rest } { separator | bar-line }
legato ::= < element ... >
sector == sector_of_composition ::= clef separator
   [ measure separator ] { element | legato } ...
composition ::= sector ...
.ns
     3.3.
 
     Example  of  transcribed notation output on the printer
(Fig.3a, Fig.3b)
 
------------------------------------------------------------
                           Fig.3a
------------------------------------------------------------
 

------------------------------------------------------------
                           Fig.3b
------------------------------------------------------------
 
 
     4. SETTING UP PARAMETERS IN THE PROCESS OF COMPOSITION
 
     Parameters  can  be set either by writing the values on
the  terminal  screen  or  by  preparing them beforehand and
storing  them  in the data file. The program is intended for
the  PDP  11/34  and  ADT  4500  (HP 1000) computers and the
FORTRAN  IV-VO2.2-5  and  FORTRAN  4X  rev.2340  programming
languages. There is also a version compatible with IBM PC.
.ns
     4.1. Name
 
     4.1.1. HEADING
 
     General details about the composition or its part - the
maximum  number of characters - 20, positions <01-20> in the
data  file. Values in parentheses are placed above the staff
in the score or part; values in square brackets are situated
in  front  of the staff; values separated by slashes are put
one below the other; values that are not in brackets are not
written in the score.
 
     4.2. Tone length
 
     4.2.1. METRE
 
     Example  2,4  -  two-four  time  - 2 times 2 characters
<21-22><23-24>.
 
     4.2.2. BAR NUMBER
 
     (only when metre is defined) - 3 characters <25-27>.
 
     Example (Fig.4):
 
------------------------------------------------------------
                           Fig.4
------------------------------------------------------------
.ns
     4.2.3. NUMBER OF RHYTHMIC VALUES
 
     Determines tone and rest lengths, only when no metre is
defined by 4.2.1. - 3 characters <25-27>.
 
     4.2.4. RHYTHM
 
     Selection of rhythmic values based on percentage tables
of  pseudorandom  process  distribution;  the  tables can be
changed  and  amended  to  meet  the  requirements  of  each
individual  composer; irregular rhythms can only be required
if 4.2.3. has been set - 2 characters <28-29>.
 
     4.2.5. "*"
 
     Multiple  of basic rhythmic values (if not set then the
basic rhythmic values do not change) - 2 characters <30-31>.
 
4.2.6. "+"

 
     A  defined  rhythmic  value added to the set values (if
not  set  then  the basic rhythmic values do not change) - 2
characters <32-33>.
 
Example (Fig.5a, Fig.5b):
 
------------------------------------------------------------
                           Fig.5a
------------------------------------------------------------
 
     The  RHYTHM  percentage  table  5  shows  the following
distribution of individual tone lengths:
     16 - 50%, 8 - 25%, 8. - 10%, 4 - 15%;
 
     The required conversion gives the following structure:
     4 - 50%, 4. - 25%, 2 - 10%, 2=8 - 15%
 
------------------------------------------------------------
                           Fig.5b
------------------------------------------------------------
 
     Rhythmic  values  in  the form of a single note or rest
are  often difficult for the performer to read; notations b)
and  c) from the three examples given below are written in a
much  more comprehensible way than a). The notation shown in
c)  shows the most cleary presented rhythmical structure; in
b)  and  c) the rhythmic structure is presented according to
the metre (Fig.6).
 
------------------------------------------------------------
                           Fig.6
------------------------------------------------------------
 
     A  special  algorithm  has been developed for automatic
arrangement  of rhythmical notation into bars in a logic and
easily decipherable way (Fig.7).
 
------------------------------------------------------------
     Fig.7: The automatic rhythmical notation algorithm
------------------------------------------------------------
 
     t    the moment of a new rhythmic value appearance
            (t = 0 - the beginning of a bar)
     M    the length of a bare
     l    a new rhythmic value input
     l'   a section of "l" that is going to be processed
     d    a section of "l'" that is to be output in the form
            of a single note
     t'   the moment of a new note appearance
     s    a step on the time axis (t' := t + s)
 
A.   If a new value is longer than the remaining part of the
     particular  bar  (t + l > M), then a shorter value will
     be used in the moment: l' := M - t, otherwise l' := l .
 
B.   The  first  "d"  value  that can be used within "l'" is
     found  in  the table of selected values for the allowed
     positions within the bar (into "t" moment).
 

B1.  If  the  appearance  of the "d" note corresponds to the
     "t" time then the "d" value is output, the original "l"
     value  is  shortened  (l := l - d) and if the result is
     non-zero,  then another step A. is applied and the next
     note  is  tied  to  the  first  one;  the  algorithm is
     terminated when l = 0.
 
B2.  If  the "t'" moment of the "d" note appearance does not
     correspond  to  "t",  the l' := t' - t section that has
     been  left  out  will  be created first, beginning with
     step B.
 
 
     4.2.7. TONE/REST
 
     Ratio  of  tone  and  rest  occurrences  determined  by
pseudorandom  occurrence tables alterable by each individual
composer;  two and more successive rests are joined together
(this should always be set) - 1 character <34>.
 
     4.2.8. TONE/ORNAMENT
 
     Ratio  of  tone  and ornament occurrences determined by
pseudorandom occurrence tables (this should always be set) -
1 character <35>.
 
     4.2.9. TREMOLO/GROUP
 
     Ratio  of  tremolos,  trills, rolls and frullatos (from
now  on  referred  to  as  "tremolos"  for  short) and other
ornaments   (grouplets,   leaning  notes,  turns,  mordents,
arpeggios  etc.)  -  from now on referred to as "groups" for
short  - which are not taken as rhythmic values (set only if
ORNAMENT required by 4.2.8) - 1 character <36>.
 
Example (Fig.8a, Fig.8b):
------------------------------------------------------------
                           Fig.8a
------------------------------------------------------------
     the  ratio  of  tone and rest occurrences (75% - tones,
25% - rests) determined by the percentage occurrence table 3
(TONE/REST);
     the  ratio  of  tone  and  ornament  occurrences (50% -
tones,   50%  -  ornaments)  determined  by  the  percentage
occurrence table 4 (TONE/ORNAMENT);
     the  ratio  of  tremolo  and  group  occurrences (25% -
tremolos,   75%  -  groups)  determined  by  the  percentage
occurrence table 5 (TREMOLO/GROUP)
------------------------------------------------------------
                            Fig.8b
------------------------------------------------------------
 
     4.2.10. TREMOLO INTERVALS
 
     Determines  the  intervals of tremolos according to the
percentage given in the tables; the size of the intervals is
defined  by the number of semitones (interval 1 - minor 2nd,
2 - major 2nd, 3 - minor 3rd, 4 - major 3rd etc.); (set only
if TREMOLO required by 4.2.9.) - 2 characters <37-38>
 

     4.2.11. SIZE OF GROUP
 
     The smallest and largest number of tones within a group
(based on random choice and even distribution) including the
nearest  rhythmic  tone following the group, in the case the
same  number is set for all groups it is sufficient to input
one  value  only  (set only if GROUP required by 4.2.9.) - 2
times 2 characters <39-40><41-42>
 
Example (Fig.9a, Fig.9b):
------------------------------------------------------------
                           Fig.9a
------------------------------------------------------------
 
     The   choice   of  melodic  intervals  in  tremolos  is
determined  by  the  percentage  table  11  (TREM.INTERVALS)
approximate occurrences: 1 - 25%, 2 - 35%, 3 - 20%, 4 - 20%;
in  SIZE  OF  GROUP  the  groups  of  6  to  10  are  evenly
distributed, each forming 20%.
 
------------------------------------------------------------
                           Fig.9b
------------------------------------------------------------
 
 
     4.3. Tone pitch
 
     4.3.1. AMBIT OF MELODY
 
     Allowed  range  of  pitches; the lowest and the highest
tone  that can be used in a composition or its part and that
falls   within   the  basic,  non-transposed  sound  of  the
instrument   (this  should  always  be  set)  -  2  times  4
characters <43-46><47-50>.
 
Example (Fig.10):
 
------------------------------------------------------------
                           Fig.10
------------------------------------------------------------
 
     The setting BH-1,XF3 defines the range by the limits of
B flat in great octave and F sharp in three-line octave.
 
4.3.2. MODES
 
     The  enumeration  of  tones  that  can  be  used in the
composition  - can be altered and augmented by the composer;
if  the  mode  is not repeated after an octave is completed,
then  C1  is  the  beginning (this should always be set) - 2
characters <51-52>.
     Survey  of  the modes used (includes definitions of all
common 5 to 12-tone modes beginning with the oldest historic
pentatonic  mode  and  including the whole-tone and diatonic
modes,  Messiaen's modes, chromatic scale and all modes with
the  period  other than octave and the interval combinations
1,2,3,4 and the maximum number of 3 intervals of the same or
different size) (Fig.11).
 
------------------------------------------------------------

                    Fig.11: Modes table
------------------------------------------------------------
 
     Mode  definition  is  based on ascribing 0 or 1 to each
tone  of  the  tone system (0 - tone will not be used in the
mode,  1  - tone will be used); the first value defining the
period  of the mode is denoted C1 (or transposed C1) and the
other  values  then  correspond to the successive semitones.
After  the  defined  period  is  completed  the  values  are
repeated  automatically  in both up and down directions from
the basic period.
 
Example (Fig.12a, Fig.12b):
 
------------------------------------------------------------
                          Fig.12a
------------------------------------------------------------
 
------------------------------------------------------------
          Fig.12b: Graphic presentation of mode 28
                   with the help of keyboard
------------------------------------------------------------
 
     4.3.3. DIRECTION OF MELODY
 
     Forced   melody   direction   (up  or  down)  based  on
percentage limitation chosen by the composer; if a next tone
in  the  defined  direction exceeds the allowed range, it is
not  accepted  and  another  suitable tone is generated; the
result  is  that  melody runs within the defined part of the
range  - to realize this intention the first 50 tones of the
melody are ignored (this should always be set) - 1 character
<53>.
 
Example (Fig.13a, Fig.13b):
 
------------------------------------------------------------
                          Fig.13a
------------------------------------------------------------
 
     The ratio of rising and falling intervals of the melody
is  determined by the percentage table 6 (DIRECTION): rising
intervals - 75%, falling intervals - 25%
 
------------------------------------------------------------
                          Fig.13b
------------------------------------------------------------
 
     4.3.4. NUMBER OF VOICES
 
     Maximum  number  of voices that are to form a many-part
harmony;  the  lowest part - melody - is generated according
to the parametres set by 4.2.1. to 4.2.11., 4.3.1. to 4.3.3.
and 4.3.7.; when any of the other harmonic parts exceeds the
range  defined  by  4.3.1.  the tone is not realized (if the
number of parts is not set to be 2 or more then no polyphony
is generated) - 2 characters <54-55>.
 
     4.3.5. HARMONY
 

     The  character  of  harmony  and  tremolos  within  and
outside  the limits of the defined mode and range of melody;
when a required harmonic or tremolo tone is not found within
the  defined  mode  after  1000 attempts have been made, the
tone  is  not  realized  (this  is  only set when TREMOLO is
required by 4.2.9. or when the number of voices is set do be
2 or more by 4.3.4.) - 1 character <56>.
 
     The  character  of harmony and tremolos is defined with
the help of code numbers 1 to 4: generation of tones is...
     1   ...controlled by a defined mode and range of melody
     2   ...controlled by a defined mode
     3 - ...controlled by a defined range
     4 - ...not limited.
 
     4.3.6. HARMONIC INTERVALS
 
     Pseudorandom percentage tables limit the occurrences of
intervals  in the many-part structure (this is only set when
the  number  of  parts is set to be 2 or more by 4.3.4.) - 2
characters <57-58>.
 
     4.3.7. MELODIC INTERVALS
 
     Pseudorandom percentage tables limit the occurrences of
melodic intervals (this should always be set) - 2 characters
<59-60>.
 
Example (Fig.14a, Fig.14b):
 
------------------------------------------------------------
                          Fig.14a
------------------------------------------------------------
Percentage  table 6 (HARM.INTERVALS) determines the ratio of
intervals  in  the  many-part  structure:  interval 3 - 50%,
interval 4 - 50%;
 
Percentage  table  3 (MEL.INTERVALS) determines the ratio of
melodic intervals: interval 0 - 20%, 1 - 17.1%, 2 14.5%, 3 -
12%, 4 - 9.9%, 5 - 7.9%, 6 - 6.15%, 7 - 4.6%, etc.
 
------------------------------------------------------------
                          Fig.14b
------------------------------------------------------------
 
     4.3.8. TRANSPOSITION
 
     The  first  value determines the number of semitones by
which  the  mode  is  to  be transposed without changing the
melody   range;   the  second  value  determines  instrument
transposition  resulting  in  the change in the melody range
set by 4.3.1. - 2 times 3 characters <61-63><64-66>.
 
     Example (Fig.15):
 
------------------------------------------------------------
                           Fig.15
------------------------------------------------------------
 
     The setting "-8,14" defines mode transposition by minor

6th  in  the downward direction and instrument transposition
by major 9th in the upward direction (for example with the B
flat bass clarinet).
 
     4.4. Initialisation
 
     Initial  parametres for the pseudorandom generator (the
first  of  each  pair  of  numbers should be set, the second
number  always  being  0)  should be set separately for tone
lengths  and  tone  pitches,  the  advantage  of this is the
possibility  of  generating  classical variation sections of
the   compositions;   to   achieve   even   distribution  of
pseudorandom numbers the first 50 numbers are eliminated.
 
     4.4.1. RHYTHM-RANDOM
 
Initial parametres of  pseudorandom  data for 4.2.4., 4.2.7 to 4.2.11. (these should always be  set)  -  4
characters <67-70>.
 
     4.4.2. MELODY-RANDOM
 
     Initial  parametres  of  pseudorandom  data for 4.3.3.,
4.3.6.,  4.3.7.  (these should always be set) - 4 characters
<71-74>.
 
     4.5. Notation
 
     Notation  observes traditional rules connected with the
arrangement  of the score and individual parts with the only
exception  of  accidentals  with  each individual note (only
tied  notes  have  one  common  accidental); graphic form of
ornaments is simpler than the traditional one, ornaments are
notated by black note-heads placed into the particular beat;
tremolo  tones  are  placed  in  square  brackets  and their
rhythmic values are signed separately.
 
     A  special  algorithm  has been developed for automatic
notation  of  accidentals in a logic and easily decipherable
way (Fig.16).
 
------------------------------------------------------------
            Fig.16: Automatic notation algorithm
------------------------------------------------------------
 
     N    notes C D E F G A H (without accidentals)
     X    notes XC XD XF XG XA (with sharps)
     B    notes BD BE BG BA BH (with flats)
 
     I1   intervals {1,3,5,8,10} + 12 * o; o = 0,1,2,...,7
     I2   intervals {2,4,7,9,11} + 12 * o
     I3   intervals {6} + 12 * o
     I4   intervals 1,3,5
     I5   intervals 2,4,7
 
A1.  X is followed by X or N.
 
A2.  B is followed by B or N.
 
B.   if N is followed by X or B, then:
 

B1.  For  I1  in  the upward direction or I2 in the downward
     direction,  if the nearest successive "N" follows I4 in
     the  upward  direction or I5 in the downward direction,
     then select "X", otherwise select "B".
.
B2.  For  I1  in  the downward direction or I2 in the upward
     direction,  if the nearest successive "N" follows I4 in
     the  downward  direction or I5 in the upward direction,
     then select "B", otherwise select "X".
 
B3.  For  I3  in  the  upward  or downward direction, if the
     nearest   successive  "N"  follows  I1  in  the  upward
     direction  or I2 in the downward direction, then select
     "X",  if  "N"  does not follow, select one of the notes
     {XC, BE, XF, XG, BH}.
 
B4.  For  I3  in  the  upward  or downward direction, if the
     nearest  successive  "N"  follows  I1  in  the downward
     direction  or  I2  in the upward direction, then select
     "B",  if  "N"  does not follow, select one of the notes
     {XC, BE, XF, XG, BH}.
 
C.   For polyphony within one single staff or tremolo:
 
C1.  The  lowest  tones  are governed by the rules A1-A2 and
     B1-B4.
 
C2.  The  rest is governed by the same rules but the highest
     tone  of the polyphony or the basic tone of the tremolo
     is only significant as the last melodic tone.
 
     4.5.1. STAVES
 
     Automatic  distribution  of  polyphony  into  a defined
number of staves based on higher part priority (this is only
set if more than 1 part required by 4.3.4. and if more-stave
notation  selected);  codes  -1  to  -4  are  used to define
notation using staves with less than 5 lines (for percussion
instruments) - 2 characters <75-76>.
 
     If  the  polyphony  contains  fewer parts then set (see
notes  with  4.3.4. and 4.3.5.) or if the number of parts is
smaller  than  the number of staves then the tones available
will  be  distributed evenly among the available staves (for
example  a  chord  consisting of 3 tones will be distributed
among 6 staves in the following way: lines 1 and 2 will hold
the  highest tone, lines 3 and 4 the middle tone and lines 5
and 6 the lowest tone); if even distribution is not possible
then higher tones will be duplicated (for example 4 tones of
a  chord will be distributed among 6 stanes in the following
way:  lines 1 - 2 - highest tone, lines 3 - 4 second highest
tone, lines 5 - 6 the remaining two tones of the chord).
 
     4.5.2. CLEFS
 
     Automatic  selection  of  clefs  used  with  the  given
instrument  (if  not  set, no clef is used - especially with
percussion instruments) - 1 character <77>.
 
     The code 1, 2, 3, 7, 9 defines the use of clefs:
        1    treble G clef (KG)

        2    bass F clef (KF)
        3    treble and bass clefs (KG + KF)
        4    tenor C clef (KC4)
        7    treble, tenor and bass clefs (KG + KC4 + KF)
        8    alto C clef (KC3)
        9    treble and alto clefs (KG + KC3)
 
     There  is  a  special  algorithm  for the use of two or
three clefs within a staff:
 
For code 3 :
A1.  if the composition or its part begins with the C1 pitch
     or any higher pitch, then use KG.
A2.  if the composition or its part begins with the H0 pitch
     or any lower pitch, then use KF.
B1.  for  pitches  from  BG0 up use KG, for pitches from XF0
     down introduce KF.
B2.  for  pitches  from  XF1 down use KF, for pitches BG1 up
     introduce KG.
 
For code 7 :
A1.  if the composition or its part begins with the F1 pitch
     or any higher pitch, then use KG.
A2.  if  the  composition  or its part begins with any pitch
     from the range F0 to E1, then use KC4.
A3.  if the composition or its part begins with the E0 pitch
     or any lower pitch, then use KF.
B1.  for  pitches  from  BH0 up use KG, for the pitches from
     XA0 down introduce KC4.
B2.  for  pitches  within the range BA-1 to XC2 use KC4, for
     pitches  from  BD2 up introduce KG and for pitches from
     XG-1 down introduce KF.
B3.  for pitches from XF1 down use KF, for pitches from BG1
     up introduce KC4.
 
For code 9 :
A1.  if the composition or its part begins with the F1 pitch
     or any higher pitch, then use KG.
A2.  if the composition or its part begins with the E1 pitch
     or any lower pitch, then use KC3.
B1.  for  pitches  from  BH0 up use KG, for the pitches from
     XA0 down introduce KC3.
B2.  for  pitches  from E2 down use KC3 clef, for pitches F2
     up introduce KG.
C.   rules  of  clef  selection  in  codes  3,  7  and 9 for
     polyphony written in a single staff:.
C1.  for  the  beginning  of  a  composition or its part use
     A1.  -  A3.;  if  rules  defined by A1. - A3. cannot be
     applied  to  all tones of the polyphony or tremolo then
     the  selection of clefs is detremined by the highest or
     the  lowest tone in the greatest interval distance from
     the  tone given by A1. - A3.; if the rules still cannot
     be applied then the nearest lower clef is selected.
C2.  a new clef is introduced when any of the limits defined
     by  B1. - B3.  is  exceeded;  for KG the lowest written
     tone is significant, for KF and KC3 the highest written
     tone  of the polyphony is significant, KC4 is only used
     if  all  written  tones of the polyphony or tremolo are
     within the defined range.
 

     The  use  of  OTTAVA  and  QUINTADECIMA SOPRA or OTTAVA
BASSA  signs  is determined (for all codes) in the following
way:
A.   without  any  sign  in  KG  up to XF3, selection of 8va
     sopra   for   BG3  and  any  higher  pitch  up  to  C3,
     deselection of 8va sopra for H2 and any lower pitch.
B.   selection of 8va sopra in GK up to XF4, 15ma sopra from
     BG4 up to C4, deselection of 15ma sopra and reselection
     of 8va sopra from H3 down.
C.   without  any  sign in KF down to BG-3, selection of 8va
     bassa  from XF-3 down to XC-2, deselection of 8va bassa
     from BD-2 up.
D.   for  polyphony  or tremolo within one staff the highest
     written  tone  is  significant  with  GK and the lowest
     written  tone  is significant with KF while A., B., and
     C. are applied.
 
     4.5.3. LEGATO
 
     The  first  value  is  the  number of legato tones, the
second  value is the maximum number of semitones determining
the  interval  for  which  the legato is allowed (if not set
then   no   legato   is  signed)  -  2  times  2  characters
<78-79><80-81>.
 
     The  defined  legato  group is terminated by a repeated
tone,  the  end  of  a  group  or  an interval exceeding the
allowed  limit; the termination resets the currently defined
number  of  legato  tones;  tremolo is one legato tone; with
polyphony or tremolos the interval is determined with regard
to the lowest tone.
 
     4.5.4. INTERPUNCTION 1.
 
     Defines  other  possible  signs for phrasing and melody
arrangement  (if  not  set,  no  interpunction  is used) - 2
characters <78-79>.
 
     The  -1  to  -9  code  is  used  for  each melodic note
phrasing:
        -1    accent
        -2    staccato
        -3    accentuated staccato
        -4    tenuto
        -5    accentuated tenuto
        -6    portamento
        -7    accentuated portamento
        -8    glissando towards the nearest successive tone
        -9    accentuated glissando
 
     4.5.5. INTERPUNCTION 2.
 
     Selection  of  tones for phrasing defined by 4.5.4. (if
not  set  then  all  tones are affected by the phrasing) - 2
characters <80-81>
 
     The -1 to -9 code is used for the tone selection:
        -1    phrasing applies to groups only
        -2    phrasing applies to rhythmic values 8 and 16
                (notes only)

        -3    phrasing applies to groups and notes of 8 and
                16 values
        -4    phrasing applies to rhythmic values 4 to 16
        -5    phrasing applies to groups and notes of 4 to
                16 values
        -6    phrasing applies to rhythmic values 1 to 4
        -7    phrasing applies to rhythmic values 1 to 4
        -8    phrasing applies to rhythmic values 1 to 2
        -9    phrasing applies to rhythmic values 2 to 4
 
     4.5.6. INTERPUNCTION 3.
 
     Further possibilities of tone and rest interpunction as
required  by each individual composer (these can only be set
if  no  interpunction set by 4.5.4.) - 2 characters <80-81>.
Code 1 - 99 is used for INTERPUNCTION 3.
 
     4.5.7. INSTRUCTIONS
 
     Further   instructions  concerning  expression,  tempo,
phrasing,  dynamics, performance, notation, etc. - number of
characters not limited <82-...>
 
     These  instructions  are  placed  below  staves,  if in
parentheses   then   placed   above  staves  and  below  the
information  set by 4.1.1., if in angle brackets then placed
at  the  end of the notated section, if separated by slashes
then put one below the other.
 
 
     5. EXAMPLES SHOWING PARTS OF COMPOSITIONS IN THE CODE
        LANGUAGE FORM AND NOTES PRINTED ON PLOTTER
 
     5.1. Score notation (Fig.17a,b,c)
 
------------------------------------------------------------
                          Fig.17a
------------------------------------------------------------
 
------------------------------------------------------------
                          Fig.17b
------------------------------------------------------------
 
------------------------------------------------------------
                          Fig.17c
------------------------------------------------------------
 
     5.2. Monophonic notation (Fig.18a,b,c)
 
------------------------------------------------------------
                          Fig.18a
------------------------------------------------------------
 
------------------------------------------------------------
                          Fig.18b
------------------------------------------------------------
 
------------------------------------------------------------
                          Fig.18c
------------------------------------------------------------

 
     5.3. Chord notation (Fig.19a,b,c)
 
------------------------------------------------------------
                          Fig.19a
------------------------------------------------------------
 
------------------------------------------------------------
                          Fig.19b
------------------------------------------------------------
 
------------------------------------------------------------
                          Fig.19c
------------------------------------------------------------
 
 
 
     6. CONCLUSIONS
 
     Computer  can  never replace man, neither in the sphere
of  science  nor  in  the  sphere  of  art. For the composer
computer  may be means for quickening the realization of his
ideas   and   for   doing  the  unpleasant,  uncreative  and
repetitive routine work for him.
 
     The   program   for   instrumental   and   vocal  music
composition  will  be extended to include the possibility of
changing  the  mode  within  a  section  of  a  composition,
generating  the  next  melodic tone with regard to more than
one preceding tone, selecting rhythmic values in a different
way for each individual beat, using traditional harmony in a
more   complex  way  and  other  things.  Notation  will  be
developed  further  to  correspond  to contemporary notation
requirements.
     The  composer  will  be  able  to  hear the composition
generated  by  the  computer even before it is printed. This
will   be   enabled   by  a  many-part  sound  output  using
microcomputer,  synthesizer  and  the "MIDI" system (Musical
Instrument  Digital Interface) [4], adapted for the purposes
of  the  program.  In  this  way the computer will provide a
source  of  inspiration  for  the  composer, being in direct
interactive contact with him.
     The  composer will then be able to enter the process of
composition at any moment to realize better his ideas.
 
 
 
     REFERENCES
 
[1]  RUZICKA,  R.:  Využití  samočinných počítačů při vzniku
     uměleckých  děl  se  zvláštním  zaměřením  na  hudbu  a
     soudobou  hudební  kompozici  [The  Use of Computers in
     Creating  Works of Art with Special Regard to Music and
     to  Contemporary  Music  Composition]. Ediční středisko
     JAMU, Brno 1980 (in Czech)
 
[2]  GOULD,  M.  J.  -  LOGEMANN,  G.  W.:  ALMA, Alphameric
     Language   for   Music  Analysis.  Musicology  and  the
     Computer, New York 1970, pp. 57-90
 

[3]  BALLOVA,  L'.:  Totožnosť a podobnosť melódií [Identity
     and Similarity of Melodies]. Opus, Bratislava 1982, pp.
     71-87 (in Slovak)
 
[4]  LOY,   G.:   Musicians   Make   a  Standard:  The  MIDI
     Phenomenon.  Computer  Music Journal, 1985, Vol. 9, No.
     4, pp. 8-26
 
*1*
[5]  TJEPKEMA,  S.  L.:  A  Bibliography  of Computer Music.
     University of Iowa Press, Iowa City 1981
 
*2*
 
*3*
 
*4*
 
*5*  Dodge, Ch., Jerse, T. A.: Coputer Music, Synthesis,
     Composition, and Performance. Schirmer Books, New York
     1985
 
*6*  Batel, G., Kleinen, G., Salbert, D.: Computermusik.
     Laaber Verlag, Laaber 1987 (in German)
 
*7*  Zaripov, R., C.: Machinniy poisk variantov pri
     modelirovaniyi tvorcheskogo processa. Nauka, Moskva
     1983 (in Russian)
 
*8*  Manning, P.: Electronic and Computer Music. Clarendon
     Press, Oxford 1987
 
*9*  Musik und Mathematik. Salzburger Musikgesprach unter
     Vorsitz von H. v. Karajan. Springer-Verlag Berlin,
     Heidelberg 1985 (in German)

 

 

 

 

 

 

 

   COMPUTER PROGRAM FOR COMPOSITION AND AUTOMATIC NOTATION
   OF INSTRUMENTAL AND VOCAL PIECES OF CONTEMPORARY MUSIC
 
Josef Gerbrich, Programmer
Institute of Computer Science of the Masaryk University Brno
 
Petr Randula, Programmer
Regional Institute of Design, Ústí nad Labem
 
Rudolf Růžička, Composer
Janáček Academy of Performing Arts, Brno
 

 
     Abstract.   The   contribution  describes  co-operation
between  a  composer  and  programmers  in  the  process  of
contemporary   serious   music   composition.  Programs  for
computer  music  composition can be used by both students of
composition  and  professional composers. They help them not
only limit routine work but also choose suitable variations,
write  independent  compositions,  and  find inspiration for
their further work. These methods using random generation of
variants  can support research on artificial intelligence by
simulating the activity of human brain.
 
     1. INTRODUCTION
 
     The   concerted   universal  program  for  contemporary
serious   music   composition  together  with  programs  for
automatic  notation  and  traditional  notation  output  are
intended  for  use by students of composition [1] as well as
by  professional  composers  of  different orientations. The
program  is  one of the examples of the wide use of computer
in  the  field  of  art  in general and in the very specific
field of composition in particular.
     The  program  can also be used in the field of research
on  human thinking, as it is a model of human brain activity
in that it uses random operations, with certain limits given
by   the  composer  as  well  as  the  computer,  which  are
transformed into creative works of art.
     Wide  knowledge  is  necessary  for discovering all the
relations  between  individual elements constituting a piece
of  music  as  well  as for their description in the form of
algorithms  or  programs.  The  element  of chance or random
choice,  enabling  different  variants  of  a  traditionally
written piece to come into existence, is represented here by
the  random generator. Primary generation is controlled by a
number  of  limiting  conditions,  which  only let through a
small part of the musical material produced by the computer.
 
     The  system  described in great detail on the following
pages  is  just  one  of  the  many systems for contemporary
serious  music composition written during nearly 30 years of
the existence of computer-assisted composition, research and
teaching,  and  resulting  in a number of different kinds of
compositions   (chamber,   instrumental  and  vocal  pieces,
concertos, symphonies, operas, cantatas, and electroacoustic
pieces).
     The  program includes rules restricting the composition
process,  similar  to  those  used  by  human  composers  of
contemporary  serious music. These rules include elimination
of traditional harmony, i.e. of traditional chords and their
combinations,   elimination   of  classical  polyphony  with
harmonic   basis,   limitation   of  traditional  rhythmical
structures  connected  with the division into bars (accented
and  non  -  accented  tones) and elimination of traditional
methods of work with melody, phrasing, composition structure
and  form  etc.  As  to  the  notation,  contemporary  music
composers  write  each  note  with  its accidental, simplify
rhythmical structures and melodic ornament indications etc.
 
     There  is  therefore  a  new  concept  of melodic line,
rhythmical  structure,  harmony  and polyphony involved. The

composer,  however,  is  still  allowed  to  use traditional
scales  and  imitations  of  traditional  melodic ornaments,
irregular   rhythms,   elements  of  instrumental  or  vocal
character  of  melody  (accents, glissando, legato, staccato
etc.)  and  traditional notation (division into bars, clefs,
transpositions of instruments, scores etc.).
     Every  classically  educated  composer  will be able to
prepare  data  for  the  program,  which  means  that even a
beginner in the field of computer music will be able to work
with  the  program  and  achieve good results. As there is a
practically  unlimited  number of variants of the input data
for  the program and an unlimited number of possible results
(thanks  to  random  processes), every composer can show his
individual  abilities and original approach. The possibility
of  changing  the  percentage  tables of distribution of the
results   according   to   the   demands  of  each  composer
(especially  in the field of rhythmical structures, harmonic
and melodic intervals, modes and polyphony) is another great
advantage  of  the  program.  With  the  help of appropriate
parametres   for   pseudorandom  numbers  generation  it  is
possible to create melodic and rhythmical structures similar
to traditional variations.
     There  are two written forms of music composed with the
help  of  computer:  automatic notation, which is a modified
version  of  the transcribed music language in a form easily
decipherable  by performers, and traditional notation in the
form  of  a  score  with  the  possibility of extracting any
individual part. The latter can be printed either on plotter
or on adapted printer.
 
     The  most  important feature of the program is the fact
that it does not substitute the composer's creative work. It
only  helps  him  to realize his intentions more quickly and
eliminates a lot of routine work, such as dividing the score
into  bars,  transposing  instruments and voices, the use of
different  clefs,  forming  the  score and writing down each
individual part.
 
 
     2. DESCRIPTION OF THE PROGRAM
 
     The  length  of  each  composition is determined by the
number of bars or tones and rests. It is necessary to define
the  proportion  of  tones  and rests, ornamented and normal
notes,   the   proportion  of  tremolos  (trills,  rollings,
frullatos   etc.)  and  groups  (leaning  notes,  grouplets,
arpeggios  etc.).  The  range of melody is determined by the
lowest  and the highest pitches, the selection of tones that
should be used is defined by the type of mode. The selection
of  rhythmic values, melodic intervals and intervals between
tones  in  chords is based on chosen distribution functions.
Tremolo  is  defined  by the interval between the two tones,
the  number of tones in ornaments by the minimum and maximum
number,  polyphony  by  the  number  of  parts. Two types of
transposition  (modal  and instrumental) allow modifications
of  the  basic  modes and automatic corrections of the parts
for transposing instruments. The selection of tones, rhythms
and  some other elements is done through pseudorandom number
generation  according  to  a  defined discrete distribution.
Separate  utility programs extract individual parts from the

score  using  for  each instrument a suitable clef and signs
and allowing the use of traditional notation.
 
------------------------------------------------------------
 Fig.1: Flow chart of main program and utility programs for
                     automatic notation
------------------------------------------------------------
 
 
     3. NOTATION CODE
 
     The  notation code included in this program is based on
the  "ALMA"  language  (Alphanumeric  Language  for  Musical
Analysis)  [2],  [3]  in  a partly adapted form suitable for
this  program.  The  notation  is supposed to be produced by
computer  peripheries.  The  basic  feature  of  the code is
understandability  for  musicians  accustomed to traditional
notation and legibility for the computer at the same time.
 
     3.1.
 
Rhythmic values (Fig.2a):
 
     1     semibreve (whole note) or semibreve rest
     2     minim (half note)
     4     crotchet (quarter note)
     8     quaver (eighth note)
     16    semiquaver (sixteenth note)
     .     dot after a note or a rest
     ..    two dots
 
------------------------------------------------------------
                           Fig.2a
------------------------------------------------------------
 
     P     rest
     ( )   irregular rhythm (triplet, quintuplet)
     /     bar-line
     2:4   two-fourth time
 
Tone names:
 
     C, D, E, F, G, A, H
 
Accidentals:
 
     X     sharp
     B     flat
     N     natural
 
Tone systems:
 
     A-3..H-3     subcontraoctave
     C-2..H-2     contraoctave
     C-1..H-1     great octave
     C0...H0      small octave
     C1...H1      one-line octave
     C2...H2      two-line octave
     C3...H3      three-line octave
     C4...H4      four-line octave

     C5           five-line octave
 
     Q     melodic ornament (grouplet, acciacatura, turn,
           mordent, arpeggio etc.)
     +     other tones of melodic ornament
     W     tremolo, trill, roll, frullato etc.
     &     other tremolo or trill tones
     *     next harmonic tone
     =     tied notes
     < >   beginning and end of legato
     ,     separation of clefs, metre signs or rhythmic values
 
Clefs (Fig.2b):
 
     KG    treble clef (G clef)
     KF    bass clef (F clef)
     KC3   alto C clef
     KC4   tenor C clef
 
------------------------------------------------------------
                           Fig.2b
------------------------------------------------------------
 
     3.2.
 
clef ::= { KG | KC3 | KC4 | KF }
measure ::= { 1 | 2 | 3 | ... } : { 1 | 2 | 4 | 8 | 16 }
rhythm ::= { 1 | 2..| 2.| 2 | 4..| 4.| 4 | 8.| 8 | 16 }
irregular_rhythm ::= { 1 | 2 | 4 | 8 } ( { 2 | 4 | 8 | 16 } ... )
rest ::= { rhythm | irregular_rhythm } P
tone == basic_tone ::= { C | D | E | F | G | A | H }
accidental ::= { X | B | N }
octave ::= { -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 }
pitch ::= [ accidental ] tone octave
set == set_of_pitches ::= pitch [ * pitch ] ...
note ::= { rhythm | irregular_rhythm } set
tremolo == trill ::= rhythm W set & set
ornament == melodic_ornament ::= Q set [ + set ] ... + note
notation ::= { note | tremolo | ornament }
tie == tied_tones ::= notation { = [ bar-line ] notation } ...
element == basic_element_of_composition_structure ::=
   { notation | tie | rest } { separator | bar-line }
legato ::= < element ... >
sector == sector_of_composition ::= clef separator
   [ measure separator ] { element | legato } ...
composition ::= sector ...
 
     3.3.
 
     Example  of  transcribed notation output on the printer
(Fig.3a, Fig.3b)
 
------------------------------------------------------------
                           Fig.3a
------------------------------------------------------------
 
------------------------------------------------------------
                           Fig.3b
------------------------------------------------------------
 

 
     4. SETTING UP PARAMETERS IN THE PROCESS OF COMPOSITION
 
     Parameters  can  be set either by writing the values on
the  terminal  screen  or  by  preparing them beforehand and
storing  them  in the data file. The program is intended for
the  PDP  11/34  and  ADT  4500  (HP 1000) computers and the
FORTRAN  IV-VO2.2-5  and  FORTRAN  4X  rev.2340  programming
languages. There is also a version compatible with IBM PC.
 
     4.1. N a m e
 
     4.1.1. HEADING
 
     General details about the composition or its part.
 
     4.2. T o n e  l e n g t h
 
     4.2.1. METRE
 
     Example 2,4 - two-four time.
 
     4.2.2. BAR NUMBER
 
     - only when metre is defined.
 
     4.2.3. NUMBER OF RHYTHMIC VALUES
 
     Determines tone and rest lengths, only when no metre is
defined.
 
     4.2.4. RHYTHM
 
     Selection of rhythmic values based on percentage tables
of  pseudorandom  process  distribution;  the  tables can be
changed  and  amended  to  meet  the  requirements  of  each
individual  composer.
 
     Rhythmic  values  in  the form of a single note or rest
are  often difficult for the performer to read; notations b)
and  c) from the three examples given below are written in a
much  more comprehensible way than a). The notation shown in
c)  shows the most cleary presented rhythmical structure; in
b)  and  c) the rhythmic structure is presented according to
the metre (Fig.4).
 
------------------------------------------------------------
                           Fig.4
------------------------------------------------------------
 
     A  special  algorithm  has been developed for automatic
arrangement  of  rhythmical  notation into bars in a logical
and easily decipherable way (Fig.5).
 
------------------------------------------------------------
     Fig.5: The automatic rhythmical notation algorithm
------------------------------------------------------------
 
     t    the moment of a new rhythmic value appearance
            (t = 0 - the beginning of a bar)

     M    the length of a bare
     l    a new rhythmic value input
     l'   a section of "l" that is going to be processed
     d    a section of "l'" that is to be output in the form
            of a single note
     t'   the moment of a new note appearance
     s    a step on the time axis (t' := t' + s)
 
A.   If a new value is longer than the remaining part of the
     particular  bar  (t + l > M), then a shorter value will
     be used in the moment: l' := M - t, otherwise l' := l .
 
B.   The  first  "d"  value  that can be used within "l'" is
     found  in  the table of selected values for the allowed
     positions within the bar (into "t" moment).
 
B1.  If  the  appearance  of the "d" note corresponds to the
     "t" time then the "d" value is output, the original "l"
     value  is  shortened  (l := l - d) and if the result is
     non-zero,  then another step A. is applied and the next
     note  is  tied  to  the  first  one;  the  algorithm is
     terminated when l = 0.
 
B2.  If  the "t'" moment of the "d" note appearance does not
     correspond  to  "t",  the l' := t' - t section that has
     been  left  out  will  be created first, beginning with
     step B.
 
 
     4.2.5. TONE/REST
 
     Ratio  of  tone  and  rest  occurrences  determined  by
pseudorandom  occurrence tables alterable by each individual
composer; two and more successive rests are joined together.
 
     4.2.6. TONE/ORNAMENT
 
     Ratio  of  tone  and ornament occurrences determined by
pseudorandom occurrence tables.
 
     4.2.7. TREMOLO/GROUP
 
     Ratio  of  tremolos,  trills, rolls and frullatos (from
now  on  referred  to  as  "tremolos"  for  short) and other
ornaments   (grouplets,   leaning  notes,  turns,  mordents,
arpeggios  etc.)  -  from now on referred to as "groups" for
short  - which are not taken as rhythmic values.
 
     4.2.8. TREMOLO INTERVALS
 
     Determines  the  intervals of tremolos according to the
percentage given in the tables; the size of the intervals is
defined  by the number of semitones (interval 1 - minor 2nd,
2 - major 2nd, 3 - minor 3rd, 4 - major 3rd etc.).
 
     4.2.9. SIZE OF GROUP
 
     The smallest and largest number of tones within a group
(based on random choice and even distribution) including the
nearest  rhythmic  tone following the group.

 
     4.3. T o n e   p i t c h
 
     4.3.1. AMBIT OF MELODY
 
     Allowed  range  of  pitches; the lowest and the highest
tone  that can be used in a composition or its part and that
falls   within   the  basic,  non-transposed  sound  of  the
instrument.
 
     4.3.2. MODES
 
     The  enumeration  of  tones  that  can  be  used in the
composition  - can be altered and augmented by the composer;
if  the  mode  is not repeated after an octave is completed,
then  C1  is  the  beginning.
     Survey  of  the modes used (includes definitions of all
common 5 to 12-tone modes beginning with the oldest historic
pentatonic  mode  and  including the whole-tone and diatonic
modes,  Messiaen's modes, chromatic scale and all modes with
the  period  other than octave and the interval combinations
1,2,3,4 and the maximum number of 3 intervals of the same or
different size) (Fig.6).
 
------------------------------------------------------------
                    Fig.6: Modes table
------------------------------------------------------------
 
     Mode  definition  is  based on ascribing 0 or 1 to each
tone  of  the  tone system (0 - tone will not be used in the
mode,  1  - tone will be used); the first value defining the
period  of the mode is denoted C1 (or transposed C1) and the
other  values  then  correspond to the successive semitones.
After  the  defined  period  is  completed  the  values  are
repeated  automatically  in both up and down directions from
the basic period.
 
------------------------------------------------------------
           Fig.7: Graphic presentation of mode 28
                 with the help of keyboard
------------------------------------------------------------
 
     4.3.3. DIRECTION OF MELODY
 
     Forced   melody   direction   (up  or  down)  based  on
percentage limitation chosen by the composer; if a next tone
in  the  defined  direction exceeds the allowed range, it is
not  accepted  and  another  suitable tone is generated; the
result  is  that  melody runs within the defined part of the
range.
 
     4.3.4. NUMBER OF VOICES
 
     Maximum  number  of voices that are to form a many-part
harmony.
 
     4.3.5. HARMONY
 
     The  character  of  harmony  and  tremolos  within  and
outside the limits of the defined mode and range of melody.

 
     4.3.6. HARMONIC INTERVALS
 
     Pseudorandom percentage tables limit the occurrences of
intervals in the many-part structure.
 
     4.3.7. MELODIC INTERVALS
 
     Pseudorandom percentage tables limit the occurrences of
melodic intervals.
 
     4.3.8. TRANSPOSITION
 
     The  first  value determines the number of semitones by
which  the  mode  is  to  be transposed without changing the
melody   range;   the  second  value  determines  instrument
transposition  resulting  in  the change in the melody range
set by 4.3.1.
 
     4.4. I n i t i a l i s a t i o n
 
     Initial  parametres for the pseudorandom generator (the
first  of  each  pair  of  numbers should be set, the second
number  always  being  0)  should be set separately for tone
lengths  and  tone  pitches,  the  advantage  of this is the
possibility  of  generating  classical variation sections of
the compositions.
 
     4.4.1. RHYTHM-RANDOM
 
     Initial  parametres  of  pseudorandom  data for 4.2.4.,
4.2.5 to 4.2.9.
 
     4.4.2. MELODY-RANDOM
 
     Initial  parametres  of  pseudorandom  data for 4.3.3.,
4.3.6., 4.3.7.
 
     4.5. N o t a t i o n
 
     Notation  observes traditional rules connected with the
arrangement  of the score and individual parts with the only
exception  of  accidentals  with  each individual note (only
tied  notes  have  one  common  accidental); graphic form of
ornaments is simpler than the traditional one, ornaments are
notated by black note-heads placed into the particular beat;
tremolo  tones  are  placed  in  square  brackets  and their
rhythmic values are signed separately.
 
     A  special  algorithm  has been developed for automatic
notation  of  accidentals in a logic and easily decipherable
way (Fig.8).
 
------------------------------------------------------------
            Fig.8: Automatic notation algorithm
------------------------------------------------------------
 
     N    notes C D E F G A H (without accidentals)
     X    notes XC XD XF XG XA (with sharps)
     B    notes BD BE BG BA BH (with flats)

 
     I1   intervals {1,3,5,8,10} + 12 * o; o = 0,1,2,...,7
     I2   intervals {2,4,7,9,11} + 12 * o
     I3   intervals {6} + 12 * o
     I4   intervals 1,3,5
     I5   intervals 2,4,7
 
A1.  X is followed by X or N.
 
A2.  B is followed by B or N.
 
B.   if N is followed by X or B, then:
 
B1.  For  I1  in  the upward direction or I2 in the downward
     direction,  if the nearest successive "N" follows I4 in
     the  upward  direction or I5 in the downward direction,
     then select "X", otherwise select "B".
.
B2.  For  I1  in  the downward direction or I2 in the upward
     direction,  if the nearest successive "N" follows I4 in
     the  downward  direction or I5 in the upward direction,
     then select "B", otherwise select "X".
 
B3.  For  I3  in  the  upward  or downward direction, if the
     nearest   successive  "N"  follows  I1  in  the  upward
     direction  or I2 in the downward direction, then select
     "X",  if  "N"  does not follow, select one of the notes
     {XC, BE, XF, XG, BH}.
 
B4.  For  I3  in  the  upward  or downward direction, if the
     nearest  successive  "N"  follows  I1  in  the downward
     direction  or  I2  in the upward direction, then select
     "B",  if  "N"  does not follow, select one of the notes
     {XC, BE, XF, XG, BH}.
 
C.   For polyphony within one single staff or tremolo:
 
C1.  The  lowest  tones  are governed by the rules A1-A2 and
     B1-B4.
 
C2.  The  rest is governed by the same rules but the highest
     tone  of the polyphony or the basic tone of the tremolo
     is only significant as the last melodic tone.
 
     4.5.1. STAVES
 
     Automatic  distribution  of  polyphony  into  a defined
number of staves based on higher part priority (this is only
set if more than 1 part required by 4.3.4. and if more-stave
notation  selected);  codes  -1  to  -4  are  used to define
notation using staves with less than 5 lines (for percussion
instruments).
 
     4.5.2. CLEFS
 
     Automatic  selection  of  clefs  used  with  the  given
instrument  (if  not  set, no clef is used - especially with
percussion instruments).
 
     4.5.3. LEGATO
 

     The  first  value  is  the  number of legato tones, the
second  value is the maximum number of semitones determining
the interval for which the legato is allowed.
 
     4.5.4. INTERPUNCTION 1.
 
     Defines  other  possible  signs for phrasing and melody
arrangement.
 
     4.5.5. INTERPUNCTION 2.
 
     Selection  of  tones for phrasing defined by 4.5.4.
 
     4.5.6. INTERPUNCTION 3.
 
     Further possibilities of tone and rest interpunction as
required  by each individual composer (these can only be set
if  no  interpunction set by 4.5.4.).
 
     4.5.7. INSTRUCTIONS
 
     Further   instructions  concerning  expression,  tempo,
phrasing,  dynamics, performance, notation, etc.
 
 
     5. CONCLUSIONS
 
     The   program   for   instrumental   and   vocal  music
composition  will  be extended to include the possibility of
changing  the  mode  within  a  section  of  a  composition,
generating  the  next  melodic tone with regard to more than
one preceding tone, selecting rhythmic values in a different
way for each individual beat, using traditional harmony in a
more   complex  way  and  other  things.  Notation  will  be
developed  further  to  correspond  to contemporary notation
requirements.
     The  composer  will  be  able  to  hear the composition
generated  by  the  computer even before it is printed. This
will   be   enabled   by  a  many-part  sound  output  using
microcomputer,  synthesizer  and  the "MIDI" system (Musical
Instrument  Digital Interface) [4], adapted for the purposes
of  the  program.  In  this  way the computer will provide a
source  of  inspiration  for  the  composer, being in direct
interactive contact with him.
     The  composer will then be able to enter the process of
composition at any moment to realize better his ideas.
 
     Computer  can  never replace man, neither in the sphere
of  science  nor  in  the  sphere  of  art. For the composer
computer  may be means for quickening the realization of his
ideas   and   for   doing  the  unpleasant,  uncreative  and
repetitive routine work for him.
 
 
     REFERENCES
 
[1]  RŮŽIČKA, R.: Využití samočinných počítačů při vzniku
     uměleckých děl se zvláštním zaměřením na hudbu a
     soudobou hudební kompozici [The Use of Computers in
     Creating Works of Art with Special Regard to Music and

     to Contemporary Music Composition]. Ediční středisko
     JAMU, Brno 1980 (in Czech)
 
[2]  GOULD, M. J. - LOGEMANN, G. W.: ALMA, Alphanumeric
     Language for Music Analysis. Musicology and the
     Computer, New York 1970, pp. 57-90
 
[3]  BALLOVÁ, L'.: Totožnosť a podobnosť melódií [Identity
     and Similarity of Melodies]. Opus, Bratislava 1982, pp.
     71-87 (in Slovak)
 
[4]  LOY, G.: Musicians Make a Standard: The MIDI
     Phenomenon. Computer Music Journal, 1985, Vol. 9, No.
     4, pp. 8-26
 
 
     LITERATURE
 
[5]  TJEPKEMA, S. L.: A Bibliography of Computer Music.
     University of Iowa Press, Iowa City 1981
 
[6]  Foundations of Computer Music, edited by C. Roads &
     J. Strawn, MIT Press, Cambridge 1985
 
[7]  Musical Thought at IRCAM, edited by T. Machover,
     Contemporary Music Review, Part I, 1984, Harwood
     Academic Publishers, London
 
[8]  DODGE, C. - JERSE, T. A.: Computer Music. Synthesis,
     Composition, and Performance. Schirmer Books, New York
     1985
 
[9]  BATEL, G. - KLEINEN, G. - SALBERT, D.: Computermusik.
     Laaber Verlag, Laaber 1987 (in German)
 
[10] ZARIPOV, R., C.: Mashinniy poisk variantov pri
     modelirovaniyi tvorcheskogo processa [The Machine
     Search of Variants with the Imitating Creative
     Process]. Nauka, Moskva 1983 (in Russian)
 
[11] MANNING, P.: Electronic and Computer Music. Clarendon
     Press, Oxford 1987
 
[12] Musik und Mathematik. Salzburger Musikgesprach unter
     Vorsitz von H. v. Karajan. Springer-Verlag Berlin,
     Heidelberg 1985 (in German)