Various musical practices over the years have made use of random or stochastic processes.
A stochastic process is defined as one in which a sequence of values is drawn from a corresponding sequence of jointly distributed random variables.
For example, Mozart's Musikalisches Wurfelspiel
(“Dice Music”) prescribes the random ordering and assembly of various musical fragments to create a new version of the piece every time it is performed.
A similar, though more recent example, includes John Cage's Reunion, which is performed by playing chess on a specially designed chess board, such that the players' moves trigger four compositions that are distributed to eight speakers surrounding the audience.
Computers are good at generating random numbers and distributions, which can subsequently be used to implement a stochastic approach.
Another approach involves the use of conditional probabilities, which can be represented in the form of a matrix called a transition table. The table below specifies transition probabilities from the current notes C, D, E and G along the top to the next notes C, D, E and G along the side. For example, if the current note is a G, there is a 50 likelihood the next note will be either an E or a G.
C
D
E
G
C
0.0
0.3
0.0
0.0
D
1.0
0.3
0.3
0.0
E
0.0
0.4
0.6
0.5
G
0.0
0.0
0.1
0.5
A transition table can be used to find the probability of note sequences. Using the table above, the probability of generating the sequence D, E, G if the current note is a D is 0.04 (D to E is 0.4 and then E to G is 0.1 ... the probability of both is the product of the individual probabilities). The probability of generating the sequence C, E, G is 0.
An example in Common Music recreates music in a style reminiscent of 19th-century American composer Stephen Foster using a transition table derived from Foster's music by Harry Olson in the 1950s.