Melodic Orientation

Baroque music literature is an endless resource for what twentieth century musicologists (Marissen 1999) have labeled as Fortspinnung (Ger.: ‘spinning forth’), the continuation of musical material with reference to a template.

Fig. 1. Vivaldi, Concerto in E major (RV 265),
third movement (Allegro), measures 7-17


Antonio Vivaldi’s (1678-1741) concerto-style favors a ritornello model with three clearly defined segments from which the second is typically of sequential nature. In the third movement of his E major violin concerto Op. 3 no. 12 (RV 265) (Fig. 1), measures 7-17 provide a textbook like example of a spinning forth process. However, from an algorithmic perspective, this segment’s melodic orientation and harmonic movement are generated independently. The harmonic content follows a root progression by fifths, where the fifth of one chord becomes the root of the following one. Once generated, the harmonic progression is filtered by an orientation unit cell, outputting a period melodic orientation.
The conceptual independence between melodic orientation and harmonic content can be observed in some of autographs of Johann Sebastian Bach’s (1685-1750) music. In Figures 2 and 3 only the first five measures of both preludes were fully notated. Those initial measures function, in the autograph, as a template with which the following measures’ harmonic content is to be shaped. The orientation unit cell can be described in a list of plus and minus signs, respectively describing a movement to higher and lower sounding pitches. The orientation unit cell for the C Major prelude is then represented as (+ + + + - + +).

Fig. 2. J. S. Bach's autograph of Prelude in C Major (BWV 846a) 


In the C minor prelude, the orientation unit cell (- - + - + - +) in the right hand is
inverted for the left hand.

Fig. 3. J. S. Bach's autograph of Prelude in C minor (BWV 847/1)
Both unit cells presented above can be found in data generated algorithmically with principles inspired on cellular automata. Originated in the theoretical work of American mathematician John von Neumann during the 1950s, cellular automata (CA) treats blocks of data as simple computers working as if elementary biological cells. Each cell has a "state" where the value of each individual cell (which state is it in) is updated as a function of the collected values of a designated group of surrounding cells in the previous time-step. (Fig. 4).

time-step 1           + + + + + + + -
time-step 2           + + + + + + - +
time-step 3           + + + + + - + +
time-step 4           + + + + - + + +
time-step 5           + + + - + + + +
time-step 6           + + - + + + + +
time-step 7           + - + + + + + +
time-step 8           - + + + + + + +

For this CA, each new cell is a consequence from the behavior seen in the three cells immediately above:


Fig. 4. Cell behavior in cellular automata


The orientation pattern for the C Major prelude (+ + + + - + +, seen below in red), for example, can be observed as resulting behavior in the following CA:

time-step 1           + + + + + + + -
time-step 2           + + + + + + - +
time-step 3           + + + + + - + +
time-step 4           + + + + - + + +
time-step 5           + + + - + + + +
time-step 6           + + - + + + + +
time-step 7           + - + + + + + +
time-step 8           - + + + + + + +
 The CA rules found here in use could be represented as resulting following look-up table:

if (+ + +), then new cell takes on the value of +
if (+ + -), then new cell takes on the value of -
if (+ - +), then new cell takes on the value of +
if (- + +), then new cell takes on the value of +