The Analysis and Synthesis of Jazz by Computer
Proceedings of the Fifth International Joint Conference on Artificial Intelligence. Applications. Pages 865-871.
© 1977 International Joint Conferences on Artificial Intelligence
Abstract
The jazz musician has two problems. The first is the creation of melodic material. The second is the problem of fitting the melodic material into a particular harmonic structure. The work described in this paper concentrates on this second problem. To solve the problem we utilized a harmonic theory which allowed the identification of key centers and the assignment of functional meaning to chords. From this we constructed scales that were compatible with the analyzed harmonic structure. These scales were then used to translate abstract melodic material into sequences of notes that sound compatible with the background chords.
- Forte, A., Tonal Harmony in Concept and Practice, Holt, Rinehart and Winston, Inc.
- Lundin, R., An Objective Psychology of Music , Ronald Press.
- Moorer, J. A., "Music and Computer Composi- tion", Communications of the ACM 15,2 (Feb. 1972), 104.
- Winograd, T., "Linguistics and Computer Analysis of Tonal Harmony", Journal of Music Theory, 12 (1969), 1968. Applicatlons-1: Ulrich
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1. 3 output from step 1
((16(F) ((2(G() 7 lO )B-(4 7 9)) )(2(C(4 7 10)))
(4(F(4 7 ll )A() 7 ll )))(2(G() 7 10)
B- (4 7 9)))
(2(C(4 7 10)))(4(F(4 7 11)
A()7 11 ))))
(8(A-) ((2(B-() 7 lO )D-(4 7 9) )
(2(E-(4 7 10)))4(A- (4 7 11)
c (3 7 11))))
(4(C)((2(C(4 7)) )(2(G( 4 7 10)))
(4(F)((2(G() 7 lO)B-(4 7 9))) (2(C(4 7 10)))))
BASIC CHORD FORMS
In jazz the harmonic quality is largely deter mined by chords . Each chord is associated with a particular harmonic quality. Most people are familiar with the major and minor qualities found in religious music. In jazz there are many other qualities. Two distinct chords may have the same quality even though they contain none of the same notes . This is because quality is determined by the relative distances between notes rather than absolute pitch . Additionally chords with identical notes may have a different quality depending on the harmonic context in which they are sounded - Associated with each quality is a chord type. A chord type is just a list of numbers which give the distance from the lowest note or root to each of the other notes of the chord. This distance is measured in half steps. In western musjc a half step is the sm~llest distance that separates two notes. In Table 1, the reader is given several octaves of musical notes. The numbers give the distances from each note to the lowest note of the table . The letters are the standard names for the notes. The symbol "*" refers to sharps and flats.
TABLE 1 : HALF STEP TABLE
| 0 c | 10 | * | 20 | |
| 1 * | 11 | B | 21 | * A |
| 2 D | 12 | c | 22 | * |
| ) * | 1) | * | 2) | B |
| 4 E | 14 | D | 24 | c |
| 5 F | 15 | * | 25 | * |
| 6 * | 16 | E | 26 | D |
| 7 G | 17 | .F | 27 | * |
| 8 * | 18 | * | 28 | E |
| 9 A | 19 | G | 29 | F |
To compute the distance between a pair of notes we take the absolute value of the difference be tween the associated numbers. If xis a note and n a number then the expression x + n will refer to the note n half steps above x. For instance D + 7 refers to the note A in the table. We can deter mine the notes of a chord when we know the lowest or root note of the chord plus its type. If x is the root and (~ ... ~)is a chord type then the
notes of the chord are (x ,x+~, ... ,x+~) . For
example if the root is D and the type is (3 7 10) then the notes that are determined are (D FA C) commonly known as D minor 7 · We shall usually prefer the notation D(3 7 10) to (D FA C) . When such notation is used the letter in front will be called the root and the list will be t he chord type.
There are two types of transformations which can be performed on chords which preserve to some extent their quality. We call these transforma tions inversions and omissions. Inversion changes the order of the notes while omission removes one or more notes of the chord. Inversions in prac tice usually leave the lowest note unchanged. Such inversions we call root 1 inversions. Less frequently the inversion changes the lowest note. This is done mos t often to accommodate the base line. Inversions whose lowest note is the second note of the original chord we call root 2 i nver sion. Inversions whose lowest note was the third note of the original chord we call root ) inver sions and so forth. Omissions provide additional problems because to determine the chord from a set of notes we must find out which notes were left out. In practice these missing notes are determined by the harmonic context of the chord. This can be accomplished only if the basic func tioning parts of the chord are left in tact.
Consider the notes (FA C D) which identify F major 6 chord and a root 2 inversion of D minor 7· If we omit the A we get (F CD). This group of notes ·sounds much more D minor 7 than F major 6 even though F is the lowest note of the group. The problem is that we removed the second note of the chord. For similar reasons removing the F or the D would render the chord unsuitable for F major 6. The general principle that we adopt is to disallow the omission of the lower two notes and the high est note in the chord. (This is in accordance with with standard musical practice) . Omission of any or all of the other notes will be allowed and we shall need to find ways to determine the omitted notes .
We are now ready to define the entire set of basic chords. This is accomplished with the chord grammar given in Table 2 . In addition to the com plete forms of the chords the grammar generates all possible forms with omitted notes . The names of the nonterminals may be suggestive of the usual names of the chords for those familiar with stan dard chord nomenclature. The chords generated are most of the chords in common use. Table 3 is pro vided for the reader who wishes to make a quick association between some chord names used by the program and those names in common musical usage . The variable x of the table can be replaced with any musical note. For instance if G is substi tuted for x the table tells us that G major 7 is named G( 4 7 11) by the program G minor 7 is named G(3 7 10 ) and so on.
TABLE 2: CHORD GRAMMAR
<chor d> __,. <root><t:v?e> <t ype> __,. ( 4<maj or>) I ( 4<seven>) I ( 3<minor >) I (3<dim>j(5<seven>) <major>~ 7l7<maj ortail> I <maj ortail> I 6<major7flatfivetail> <major7flatfivetail> - 10 , <majortail> --+ 11j11 <M6/7tail> j9 <M6/7tail> <m6/7tail> -+ 14jl4 <m9tail>j<m9tail> <M9tail> - 18 jl8 <M+ 11 tail>! <M+ 11 tail> <M+lltail> --+ 21 <minor> - 717<mtail>l<mtail>l6 <halfdimtail> <mtail> --+919 <m6/7tail>j lOjlo <m6/ 7tail>l11111 <mt7tail> <halfdimtail> --+ 10!10 <m6/ 7tail> <m6/ 7tail> --. 14114 <m6/7tail> <mt7tail - 17117 <mt7 ,9tail> <m+7,9tail> --+ 21 <Seven> ~ 7 <dom7> i<dom7> 16 <dom7> j8 <dom7> <dom7> --+ lOjlO <~eventail> <Seventail> - 14jl4 <7 , 9tail> jl3 <7 ,9tail> jl5 <7 , 9tail> <7 ,9tail> --+ 18 118 <7,9,+lltail> <7 , 9,+11tail> --+ 21 <dim> --+ 6 <dimtail> <dimtail> --+ 9
<root> --+ [any of the names for musical notes]
THE RECOGNITION OF CHORDS
The grammar of Table 2 may not be used directly to recognize chords because not all inversions of chords are generated. Instead a somewhat more complicated approach ~ust be taken. First one of the note is selected as the root. Then the rest of the notes are seen to be explainable in terms of a permutation or a basic cho~d type . Thi s is done for all possible choices of root . The algorithm given inputs a list of notes and out puts a list of chords which may be identified with the input. For instance if the input is (D FA C) then the output will be (D(3 7 10)F(4 7 9)) since (D F A C) represents D minor 7 root 1 or F major 6 root 4. I f the input is (FA C D) the output represents D minor 7 root 2 or F major 6 root 1. Finally if the input is (C E B) we have a situa tion where a note was omitted . The original chord should be (C E G B) or (C E G- B). In this case the algorithm returns C(4 7 11) corresponds t o (C E G B). It is assumed that the reader is familiar with the concept of a nondeterministic algorithm . The choose . . . thendo ... else construc tion used in the chord recognition algorithm is to be interpreted as follows: if some choice can be made which satisfies the conditions between t he choose and the thendo then the code following the thendo is executed . Otherwise control passes to the code following the else. The execution of back.track(x . .. x ) has its usual meaning with conwill be identical to the first case since (F A C D) 1 n trol passing to the point of the last successful choice and the variables x 1 . . ·Xn bei ng reset to their value at the time just prior to the last successful choice.
| COMMON NAME | PROGRAM NAME |
|---|---|
| xM7 | x (4 7 11 ) |
| xm7 | x(3 7 10) |
| x7 | x(4 7 10) |
| x6 | x(4 7 9) |
| x7#3 | x(5 7 10) |
| xdim | x(3 6 9) |
| X~ | x( 3 6 10) |
Recognition algorithm
input : chord x, chord grammar; L:=nil;n :=O; m:=nil;
choose an element e of x which is not in m thendo m:=cons(e,m); y:="<type>";z :=nil;
loop:remove e+n from x;
if. x is empty and Y= "<Stop>" then add the chord e (z) to L;
if x is empty or Y= "<Stop>" then
[A]backtrack(z,y,x);
choose an unmarked rule of the form
y-p,w such that e+p belongs to x
or y-w is a rule of the grammar thendo
mark the rule; n:=p; [w matches any
z:=cons(z,n)
nonterminal-
y:=w p matches any
goto loop termi nal]
else choose an unmarked rule of the form y-p such that e+p belongs to x thendo mark the rule; n:=p;
z :=cons (z,n) ;
y :="<Stop>";
goto loop;
else do
unmark all rules that begin y-; [B]backtrack(z,y,x) od else outputL;
There are two backtracking operations marked A and B. At A either x is empty or y=<Stop>. If x is empty then we have exhausted the set of notes. If Y=<Stop> then there are no more nonterminals to process. If both of these conditions are true we have succeeded in identifying each note with a chord element. The backtrack at B means that we have exhausted all rules beginning withy.
The chord namer applies the recognition algor ithm to each group of notes in the song. It pro duces an output identical to the input except that the groups of notes are replaced by a set of possi ble chords. Figure 1 illustrates this process. Figure 1.1 gives a transcription of the bridge section of BLUE MOON as it would be presented to the chord namer. Figure 1.2 represents the out put from the chord namer.
ANALYSIS OF KEYS
The next step in determining the functional structure takes place in the key analyzer. This program partitions the music into harmonically uniform segments and assigns to each segment a key center. This process is accomplished in several steps. Each step may be thought of as a refine ment of the previous steps. The process is roughly as follows. We begin be segmenting the song into as many segments as there are chords. Our aim is to reduce the number of segments to as few as possible . We reduce the number of segments by combining adjacent segments. Segments may be combined in just the case that our musical theory can analyze all the chords of both segments in a single key. Thus each segment must be harmonically consistent. This condition is trivially satisfied when each segment contains a single chord .
The combining of adjacent segments takes place in a single program called "combine". Since it is used at each stage of the key analyzer, we begin by describing combine. The input to combine is a list of segments (s 1 s 2 ... sn). Each segment is a list of three elements (1 k c) where 1 is a number representing the length of the segment, k is a set of possible keys for the segment and c represents the sequence of chords making up the segment. Each element of c is a list of two elements (n cse~ where n is the number of beats the chord is held and cset is a set of possible names for the chord as determined by the chord namer. See for example Figure 1. Let (L 1 ~ c 1 ) and (L 2 K 2 c 2 ) be two adjacent segments. We can combine them if the common part of ~ and K 2 is not empty. In this case the combination is j us t list (L 1 + 1 2 , inter section(~,K2), append(C 1 ,c 2 )). The combining algorithm performs the combining step until it no longer applies to any pair of segments. The out come certainly might depend on the order in which the pairs were processed and one can construct artificial examples to prove this point. With actual music it seems sufficient to process from left to right and ignore other possibilities.
combineCs);input s; output t; t:=nil; while s is not empty do Cn k c):= first(s); s:= tail(s); loop: if s not empty then do Cn· k' c'):= first(s); if k' and k have an element in common thendo n:=n+n'; k:= intersection(k,k'); od s:= tail(s); to loop; od cg 0 := append(c,c '); ~ t:= append(t,list(list(n,k,c)l); od end of combine;
The theory we use for determining possible function is discussed in [ 1] It is based on what are commonly called seventh chords. For the purpose of applying this theory we truncate our chords by removing all numbers greater than 12 from the type. This effectively discards all superpositions of the basic seventh chords. In jazz harmony there are three important functional roles called the tonic, dominant and subdominant. If xis the key then the chords x(4 7 11), x+7(4 7 10) and x+2(3 7 10) respectively play these roles. The rough harmonic analysis per formed at the first stage of key analysis par titions the music based on this fact . In doing this some mistakes will be made and must be cor rected later by using a more refined harmonic theory. The above observations yield the follow ing:
- x(4 7 11) and x(4 7 9) and x(4 7) function as tonic in x
- x(4 7 10) functions as dominant in x-7
- x(3 7 10) functions as subdominant in the key of x-2.
The first step of key identification processes each set of possible chords as they are deter mined by the chord namer. If any of the chords are of the above type it is assumed to be func tioning in one of the above roles. The key cen ter is determined on the basis of this assumption. For an example of the execution of this step refer to Figure 1.3.
stepl(Ll,L2);input Ll; output L2; L2:=nil; while Ll not empty do y:= nil; n := first(Ll); Ll:= tail(Ll); chordset: = first ( Ll) ; Ll: = tail ( Ll) ; for each chord x of chordset do let rt = root of x and t = type of x; if t = (4 7 11) or t = (4 7 9) or t = (4 7) then add rt to y else if t (3 7 10) then add rt-2 to y else if t (4 7 10) then add rt-7 to y od;
12:= append(L2,list(list(n,y,list (n,chordset)))) od 12 := combine(L2); end stepl;
The song HOW HIGH THE MOON is illustrated in Figure 2. Notice that the output from stepl con tains some very small segments of questionable harmonic meaning . This will be true in general because of the simple harmonic theory used in stepl. There are three possible reasons why these small segments may belong to an adjacent segment. First of all the segment may contain chords that are functioning in the place of other chords. This is a common practice in jazz music since it provides harmonic variety to the music. For example in the key of C, E(3 7 10) may function as C(4 7 11). The original analysis, by not taking this into account would have concluded that E(3 7 10) was in the key of D instead of C (see 2 . 2). The second reason why a small segment may be assigned the wrong key is that it is function ing as tonic relief. Tonic relief i s a harmonic device which is used to strengthen chord progres sions by moving the key center up five half steps. The center usually returns to the original key within a few measures. For this reason most musicians do not regard tonic relief as a proper key change and prefer to retain the original key throughout the segment. Finally the small seg ments may be sequences of transition chords which are used in music to provide a smooth change from one chord to another. The use of transition chords is an area least well covered by function al theory. This is because transition chords actually function outside the usual harmony of the music. Invariably they resolve into something functional or into another transition. The reader will find it helpful to follow the example of Figure 2 . To make reading easier to follow, mul tiple names of chords have been omitted from the example input.
FIGURE 2: HOW HIGH THE MOON (first 16 bars)
2.1 output from stepl ((3( )((3(B)(5 7 10)))) (8(G)((4(G(4 7 ll)))(4(G(4 7 9)))) (4(F)(4(G(3 7 10))) (4(B)((4(G-(4 7 10)))) (8(F)((4(F(4 7 ll)))(4(F(4 7 9)))) (4(E-)((4(F(3 7 10)))) (4(A)((4(E(4 7 10)))) (4(E-)~( 2 (E-(4 7 J1 )))(2(C(3 7 10)))) (2( )((2(A(3 6 10)))) (6(G)(( 2(D(4 7 l0)))(4(G(4 7 9)))) (4( )((4(B(5 7 10)))) (6(G)((2(G(4 7 ll)))(2(A(3 7 10))) (2(B(3 7 10)))) (2( )((2(C(3 7 ll)))) 2 . 2 output from step2 ((3( )((3(B(5 7 10)))) (8(G)((4(G(4 7 ll)))(4(G(4 7 9)))) (l6(F)((4(G(3 7 l0)))(4(G-(4 7 10))) (4(F(4 7 ll)))(4(F(4 7 9)))) (l2(E-)((4(F(3 7 l0)))(4(E(4 7 10)))
(12(E-)((4(F(3 7 l0)))(4(E(4 7 10))) (2(E-(4 7 ll)))(2(C(3 7 10)))) (2(B-)((2(A(3 6 10)))) (6(G)((2(D(4 7 l0)))(4(G(4 7 9)))) (4( )((4(B(5 7 10)))) (6(G)((2(G(4 7 ll)))(2(A(3 7 10))) (2(B(3 7 10)))) (2( )((2(C(3 7 ll))))
2 . 3 output from step3 ((ll(G)((3(B5 7 l0)))(4(G(4 7 11))). (4(G(4 7 9)))) (l6(F)((4(G(3 7 l0)))(4(G-(4 7 10))) (4(F(4 7 ll)))(4(F(4 7 9)))) (l2(E-)((4(F(3 7 l0)))(4(E(4 7 10))) (2(E-(4 7 ll)))( 2(C(3 7 10)))) (l8(G)((2(A(3 6 10)))(2(D(4 7 10))) (4(G(4 7 9)))(4(B(5 7 10)))(2(G(4 7 11))) (2(A(3 7 10)))(2(B(3 7 10)))) (2( )((2(C(3 7 ll)))) )
Step2 refines the initial segmentation by applying possible chord substitutions. The sub stitutions used are listed in Table 4. The second column of Table 4 specifies the function of the chord that it is substituting for . It is to be understood that x varies over the set of musical notes/keys . For instance if x is F then the table tells us that F(4 7 10) can function as the dominant of the key of F-1 or E. Step2 begins by augmenting the key sets of small segments by allowing substitute chords to func tion as the tonic, dominant, or subdominant of the segment's key. A small segment is defined to be shorter than Pl where Pl is a system parameter. When this is completed combine is used to merge adjacent segments that may now be combined.
| CHORD | FUNCTION | KEY |
| x(3 7 10) | tonic | x-3 |
| x(3 7 10) | tonic | x-9 |
| x(3 6 9) | dominant | x-11 |
| x(4 7 10) | dominant | x-1 |
| x(3 6 9) | dominant | x- 6 |
| x(3 6 9) | dominant | x-3 |
| x(3 6 9) | dominant | x-11 |
| x(4 7 10) | subdominant | x-2 |
| x(4 7 11) | subdominant | x-5 |
| x(4 7 9) | subdominant | x-5 |
step2(L2,L3);input 12; output 13; 13:= nil while 12 not empty do (n k seg):= first(L2); 12:= tail(L2); if n<pl then let k = the set of keys w such that each chord of seg has a substitution function in w according to table 4; 13:= append( L3,list(list(n,k,seg))); od; let 13 = combine(L3); end step2; TABLE 4: TABLE OF CHORD SUBSTITUTIONS CHORD FUNCTION KEY x(3 7 10) tonic x-3 x(3 7 10) tonic x-9 x(3 6 9) dominant x-11 x(4 7 10) dominant x-1 x(3 6 9) dominant x- 6 x(3 6 9) dominant x-3 x(3 6 9) dominant x-11 x(4 7 10) subdominant x-2 x(4 7 11) subdominant x-5 x(4 7 9) subdominant x-5
Step3 removes transition chords by locating all segments x that contain a single chord . The key set of x is replaced by the keyset of the next segment. The modified segments are then combined. Figure 2.3 illustrates the output from this step.
step3(L3,L4) input L3; output L4; L4;= nil; L3:= reverse(L3); (N' k' seg'):= first(L3); L3 tail(L3); while L3 not empty do n,k,seg:= n'k',set'; (n' k' seg'):= first (L3); L3:= tail(L3); if seg' has one chord then k':= k; L4:= cons(list(n,k,seg),L4); od; L4:= combine(L4); end step 3;
The final step in the analysis is the removal of segments that represent tonic relief. These segments are recognized by being short (i.e., less than p2 beats where p2 is a parameter) and by being five half steps above the next segment. Figure 3 illustrates the execution of step 4.
FIGURE 3: ALL THE THINGS YOU ARE (first 4 bars) 3.1 output from step3 ((4(E-)((4(F(3 7 10)))) (12(A-)((4(B-(3 7 10)))(4(E-(4 7 10))) (4(A-(4 7 11)))) ) 3.2 output from step4 ((16(A-)((4(F(3 7 10)))(4(B-(3 7 10))) (4(E-(4 7 10)))(4(A-(4 7 11)))) step4(L4,L5); input L4; output L5; L5:= nil; while L4 not empty do (n k seg):= first(L4); L4: = tail(L4); if L4 not empty then do (n' k' seg') := first(L4); s:= set of all keys of k' that are five half steps below some member of k; If s not empty and n < p2 then do L5:= append(L5,list(list(n, s, seg),list (n', s, . seg'))); L4:= tail(L4) od else 15:= append(L5, list(list(n, k, seg))) od else L5:= append(L5, list(list(n, k, seg))) od; L5:= combine(L5); end step 4
FUNCTIONAL ANALYSIS OF CHORDS
Having completed the identification of key cen ters we are ready to associate with each chord its functional meaning. This is accomplished by applying a harmonic theory to each of the chords of the song. If the chord belongs to a segment with two or more possible keys then it will be analyzed in more than one way. The theory that we shall use is embodied in Table 5. The x stands for the key in which the chords are being analyzed. The analysis program instantiates the table by substituting for x the key of the current seg ment. It then looks up each chord of the seg ment in the instantiated table. If a chord cannot be found in the table then it is assigned the role of transition. The algorithm is not difficult and is omitted. An example of the output is given in Figure 4.
| CHORD | FUNCTION |
|---|---|
| x(4 7 9) | tonic of x |
| x+7(4 7 10) | dominant of x |
| x+2(3 7 0) | subdominant of x |
| x(4 7 11) | tonic of x |
| x(4 7) | tonic of x |
| x+9(4 7 10) | transition |
| x+4(3 7 10) | substitute for x(4 7 11) |
| x+9(3 7 10) | substitute for x(4 7 11) |
| x(4 7 11) | dominant of x+5 |
| x+5(4 7 11) | tonic relief |
| x+7(3 7 10) | subdominant of x+5 |
| x+4(3 7 10) | transition |
| x+2(4 7 10) | substitute for x+2(3 7 10) |
| x+3(3 7 10) | substitute for x+7(4 7 10) |
| x+l( 7 10) | transition |
| x+l(4 7 10) | substitute for x+7(4 7 10) |
| x+6(3 6 9) | substitute for x+7(4 7 10) |
| x+3(3 6 9) | substitute for x+7(4 7 10) |
| FIGURE 4: | HOW HIGH THE MOON (analysis summary) | ||
| KEY | LENGTH | CHORD | FUNCTION |
| 1 G | 3 | B(5 7 10) | TRANSITION |
| 2 G | 4 | G(4 7 11) | TONIC OF G |
| 3 G | 4 | G(4 7 9) | TONIC OF G |
| 4 F | 4 | G(3 7 10) | SUBDOMINANT OF F |
| 5 F | 4 | G-(3 7 10) | SUBSTITUTE DOMINANT OF F |
| 6 F | 4 | F(4 7 11) | TONIC OF F |
| 7 | 4 | F(4 7 | TONIC OF F |
| F 8 E- | 4 | 9) E(4 7 10) | SUBSTITUTE DOMINANT OF E- |
| 9 E- | 4 | E-(4 7 11) | TONIC OF E- |
| 10 E- | 2 | E-(4 7 11) | TONIC OF. E- |
| 11 E- | 2 | C(3 7 10) | SUBSTITUTE TONIC OF E- |
| 12 G | 2 | A(3 6 10) | TRANSITION |
| 13 G | 2 | D(4 7 10) | DOMINANT OF G |
| 14 G | 4 | G(4 7 9) | TONIC OF G |
| 15 G | 4 | B(5 7 10) | TRANSITION |
| 16 G | 2 | G(4 7 11) | TONIC OF G |
| 17 G | 2 | A(3 7 10) | SUBDOMINANT OF G |
| 18 | 2 | C(3 7 11) | UNANALYZED |
CHORD x(4 7 9) x+7(4 7 10) x+2(3 7 0) x(4 7 11) x(4 7) x+9(4 7 10) x+4(3 7 10) x+9(3 7 10) x(4 7 11) x+5(4 7 11) x+7(3 7 10) x+4(3 7 10) x+2(4 7 10) x+3(3 7 10) x+l( 7 10) x+l(4 7 10) x+6(3 6 9) x+3(3 6 9) FUNCTION tonic of x dominant of x subdominant of x tonic of x tonic of x transition substitute for x(4 7 11) substitute for x(4 7 11) dominant of x+5 tonic relief subdominant of x+5 transition substitute for x+2(3 7 10) substitute for x+7(4 7 10) transition substitute for x+7(4 7 10) substitute for x+7(4 7 10) substitute for x+7(4 7 10) FIGURE 4: HOW HIGH THE MOON (analysis summary) KEY LENGTH CHORD FUNCTION 1 G 3 B(5 7 10) TRANSITION 2 G 4 G(4 7 11) TONIC OF G 3 G 4 G(4 7 9) TONIC OF G 4 F 4 G(3 7 10) SUBDOMINANT OF F 5 F 4 G-(3 7 10) SUBSTITUTE DOMINANT OF F 6 F 4 F(4 7 11) TONIC OF F 7 F 4 F(4 7 9) TONIC OF F 8 E- 4 E(4 7 10) SUBSTITUTE DOMINANT OF E9 E- 4 E-(4 7 11) TONIC OF E10 E- 2 E-(4 7 11) TONIC OF. E11 E- 2 C(3 7 10) SUBSTITUTE TONIC OF E12 G 2 A(3 6 10) TRANSITION 13 G 2 D(4 7 10) DOMINANT OF G 14 G 4 G(4 7 9) TONIC OF G 15 G 4 B(5 7 10) TRANSITION 16 G 2 G(4 7 11) TONIC OF G 17 G 2 A(3 7 10) SUBDOMINANT OF G 18 2 C(3 7 11) UNANALYZED
THE FITTING OF MELODIC MATERIAL TO A SPECIFIED HARMONIC BACKGROUND
We now indicate how the analysis can be used to fit melodic material to a given harmonic back ground. We use motifs to represent melodic material. In music a motif refers to a small snatch of melody. Sequences of motifs are woven together to form a melody. Rather than constantly inventing new motifs, the musician modifies old ones to fit new harmonic situations. This is accomplished by imposing on the motif a scale based on the key of the current section of music. Examples and discussions of motifs may be found in Coker [l] Chapter 2.
We use the notion of an abstract motif. An abstract motif is like a motif except that is is void of rhythmic and harmonic structure. When these motifs are fit into a specified rhythmic and harmonic context they become motifs in the usual sense. The harmonic context is determined by the key centers and the chord names produced by the key analysis program. We will show how abstract motifs may be instantiated with respect to harmony. To illustrate the process we will fit instantiations of a motif to the first eight measures of HOW HIGH THE MOON.
Before we can understand how instantiations are computed, we must understand the use of scales. It was mentioned above that a scale was a sequence of notes from which melodies are constructed. Most are familiar with the sound of C major scale. This scale corresponds exactly to the white keys on the piano. If the reader refers to Table 1, starts at the first C in the table, and proceeds up through the lettered notes to the next C in the table, then he will have identified C major scale. If we compute the half steps associated with each of the notes we get the list (0 2 4 57 9 11 12). This suggests that we represent C major scale similar to the notation with which represent chords, i.e., C(O 2 4 57 9 10). We call C the root of the scale and (0 2 4 5 7 9 10) the type. D(O 2 4 5 7 9 11 12) will be D major scale and so on. Besides the major types of scales there are many others in general use. Some common ones are dorian, mixolydian and whole tone. They are defined by the scale types (0 2 3 57 9 10 12), (0 2 4 5 7 9 10 12) and (0 2 4 6 8 10 12) respectively. Each type of chord is associated with a set of scale types that are harmonically consis tent with the chord. Coker lists these associa tions. We give in Table 6 a list of the scales commonly referred to and their set of compatible chords.
TABLE 6: SCALES
| NAME OF SCALE | TYPE OF SCALE | COMPATIBLE CHORDS |
| major dorian locrian mixolydian whole tone diminished | x(02457911) x(02357910) x(Ol356810) x(02457910) x(0246810) x(023568911) | x(4 7) x(4 711) x(4 7 9) x(3710) x(4710) x(4710) x(4710) (4610)(4810) x(3 710) x(3 6 9) x(3610) x-1(4810) x-1(4710) |
We specify a motif as a sequence of displace ments measured in scale steps. For instance (2 5 7 ·8 7 5 ~ 7 8 7 8 9) represents a motif of 12 notes. If we specify a scale say C major then we can identify each number in the abstract motif with a particular note. This is accomplished by associating each number of the motif with a loca tion in the scale type. To compute a note asso ciated with a number in the abstract motif we use the number as an index into the scale. This obtains for us the number of half steps the desired note is above the first note of the scale. Using C major scale with the above example we obtain (D G B C B G DB C BCD). If on the other hand we specify G mixolydian we get (A D F G F D A F G F G A) which is harmonically very different from the first case.
The instantiation of a motif should retain its pitch throughout a segment. When a new segment is encountered however the motif is shifted in pitch so that it is now expressed relative to the new key center. There is a problem however in follow ing this strategy. When a new chord is encounter ed the harmonic quality of the music changes. This usually requires that other notes of the original scale be altered. Additionally notes of the motif that belong to the chord should be emphasized. This is accomplished by accent, rhythm and phrasing.
To accommodate the changing harmonic quality of the music, musicians are taught to "think chords". Each chord that is sounded is associated with a set of compatible scales that are built on the root of the chord. The musician selects one of these scales. By restricting the notes he plays to those of the scale selected he avoids creating harmonic conflict. For instance the G(l 3 4 6 7 9 10 12) scale is used with the G(4 6 10) chord. This is not entirely satisfactory for our purpose since the motif is expressed relative to the key Of the entire segment which is likely to be dif ferent than G. In order to maintain the pitch of the motif and at the same time follow the usual musical practice, we modify the scale that the musician would use as follows: Suppose that x is the key and y is the scale that is suitable. We create a new scale which is a permutation of y and has x as the root note. This new scale then be comes the basis for instantiating the motif. For example if the key is C then the scale G(O 1 3 4 6 7 9 10) would be modified to C(O 1 2 4 5 7 8 10 11). These two scales contain exactly the same notes, just the root is different. Under some con ditions x will not belong to the desired scale. In such cases we require the lowest note of the permuted scale to be above x but as close to x as possible. For computational reasons we keep x as the root of the scale even tqough in this case the scale does not contain x.
We have applied these concepts to generate an improvisation for the first eight bars of HOW HIGH THE MOON. The rhythm was specified before hand in an ad hoc manner. The result is illus trated in Figure 5. The scales were computed on the basis of Table 6. The motif was repeated when necessary. From such a simple technique the result is bound to be less than interesting music. The music is however consistent with the harmonic structure of the song.
DISCUSSION
A feature of this work is that it takes a non grammatical approach to harmonic analysis. Some confusion may arise at this point because of the use of a grammar for the recognition of chord types. However the chord grammar is only used for the initial naming of chords. The recognition of key centers and functional analysis of chords are noticeably non-grammatical.
FIGURE 5: HOW HIGH THE MOON (improvised line) rhythm: straight four beats to the measure
| CHORD | SCALE | NOTES GENERATED |
|---|---|---|
| D(5 7 10) | G(O 2 4 5 7 9 ll) | (B C F+) |
| G(4 7 11) | G(O 2 4 5 7 9 11) | (G A B C) |
| G(4 7 9) | G(O 2 4 5 7 9 ll) | (A B C F+) |
| G(3 7 10) | F(O 2 4 5 7 9 ll) | (F G A B-) |
| G-(4 7 10) | F(l 3 5 6 8 10 ll) | (Q+A-t.B E) |
| F(4 7 11) | F(O 2 4 5 7 9 ll) | (F G A B-) |
| F(4 7 9) | F(O 2 4 5 7 9 ll) | (G A B- E) |
| F(3 7 10) | E-(0 2 4 5 7 9 ll) | (E- F G A-) |
| E(4 7 10) | E-(1 3 5 6 8 10 ll) | (G- A- A D) |
Consider for contrast Winograd's study [ 5 ] on the analysis of classical music. His program embodies a simplified version of Forte's harmonic theory [2]. The theory is represented as a sys temic grammar . The form of the input to Winograd's program is similar to the input to the program described in this paper. His examples however are entirely from Bach and Schubert.
Winograd reports dealing with the same sorts of ambiguities as described in this study. Because of these ambiguities, Wino.grad' s parser uses a set of heuristics to reduce the number of possible parsings to a managable size. When two different parsing are found, a preference is given to the simpler of the two. The program reported here resolves ambiguities in favor of the analysis which has fewer key changes.
In the long run the question of whether grammatical approaches are superior to non grammatical ones may depend on how much harmonic structure can be derived from local properties of the music. If global properties are essential to harmonic analysis, then a grammar may provide a useful means of representing the global organi zation. However in the case of ja?.z music, a musician can usually identify the key on the basis of two or three consecutive chords. If this statement can be verified experimentally then there is strong reason to believe that jazz encodes so much harmony in the local structure of the music that global considerations can be ignored.
The assumption is made in this study that it is meaningful to represent melodic material as abstract motifs devoid of rhythmic and harmonic content. This assumption can be regarded as an approximation at best and must stand the trial of future investigation. Moorer [ ·.4] reports a study (probably originally from Lundin [3])which demonstrates that subjects can determine on the basis of relative pitch when two consecutive notes will achieve melodic resolution. This suggests that harmonic principles (i.e., rela tive pitch) may effect melodic features in essential ways. Such evidence must be weighed against the fact that when harmony and rhythm are removed from certain melodic material, patterns emerge that suggest that melody has a cer~ain independence. For instance if the first nine notes of the allegro to Beethoven's fifth are expressed as an abstract motif we obtain (0 2 4 3 2 l 0 1 0). This is the same abstract motif obtained from the first nine notes of the Piano Concerto in C minor even though these two pieces are rhythmically and harmonically quite dis similar .
CONCLUSIONS
The jazz musician has two problems. The .first is the creation of melodic material. The second is the problem of fitting the melodic material into a particular harmonic structure. The work described in this paper concentrates on this second problem. To solve the problem we utilized a harmonic theory which allowed the identification of key centers and the assignment of functional meaning to chards. From this we constructed scales that were compatible with the analyzed harmonic structure. These scales were then used to translate abstract melodic material into sequences of notes that sound compatible with the background chords.
The work described here is just a beginning. For instance the theory used does not apply to songs with minor tonality and needs to be enlarged. The method for fitting motifs to harmonic struc ture is more an illustration than a reliable technique. The use of rhythm was not treated at all nor was the problem of developing a library of useful motifs. In spite of these shortcomings the methods described do deal quantitatively with a number of practical problems facing jazz musicians such as the identification of keycenter, the identification of chords and the construction of scales that are harmonically compatible with the identified keys.
ACKNOWLEDGEMENT
The author would like to thank Professor Nancy Martin for her encouragement and helpful sugges tions related to this work.
BIBLIOGRAPHY
- (l] Coker, J., IMPROVISING JAZZ, Prentice-Hall, Englewood Cliffs, N.J.
- Forte, A., Tonal Harmony in Concept and Practice, Holt, Rinehart and Winston, Inc.
- Lundin, R., An Objective Psychology of Music , Ronald Press.
- Moorer, J. A., "Music and Computer Composi tion", Communications of the ACM 15,2 (Feb. 1972), 104.
- (5] Winograd, T., "Linguistics and Computer Analysis of Tonal Harmony", Journal of Music Theory, 12 (1969), 1968.
@inproceedings{ijcai1977p204,
title = {The Analysis and Synthesis of Jazz by Computer},
author = {Ulrich, John Wade},
booktitle = {Proceedings of the Fifth International Joint Conference on
Artificial Intelligence, {IJCAI-77}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {Raj Reddy},
pages = {865--871},
year = {1977},
note = {Applications},
url = {https://ijcai.org/proceedings/1977/204},
}
TY - CPAPER TI - The Analysis and Synthesis of Jazz by Computer AU - Ulrich, John Wade T2 - Proceedings of the Fifth International Joint Conference on Artificial Intelligence, IJCAI-77 PB - International Joint Conferences on Artificial Intelligence PY - 1977 SP - 865 EP - 871 UR - https://ijcai.org/proceedings/1977/204 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: