perl ori.pl rnd=1234The program generates a random series, based on the optional parameter, then makes a cyclic join. The notes of the join are assigned some simple, repetitive rhythm, e.g.
... A♭ 1/4 B 2/4 C 3/4 A 1/4 B♭ 2/4 E♭ 3/4 D 1/4 E 2/4 C# 3/4 F 1/4 F# 2/4 G 3/4 ...Then it is repeatedly modified as follows:
C# 3/4 F 1/4, 4 semitones apart, lasting 4/4
C 3/4 A 1/4 B♭ 2/4 E♭ 3/4 D 1/4 E 2/4, which lasts 12/4
What comes out (trust me with the fractions) is:
... A♭ 1/4 B 2/4 C 3/4 A 1/4 B♭ 2/4 E♭ 3/4 D 1/4 E 2/4
C# 3/12 B♭ 1/12 B 2/12 E 3/12 E♭ 1/12 F 2/12
F# 2/4 G 3/4 ...
The total duration has not changed, and all the old notes are in place – but some blue notes b♭ 1/12 b 2/12 e 3/12 e♭ 1/12 got inserted. In this case 1/12 is a simple triolet, but much messier subdivision may occur later, if, for instance, a segment replaces
F 2/12 F# 2/4The program regularizes crazy subdivisions, and does not allow very short durations.
The three steps mentioned above are actually the standard fractal construction via affine transforms. If we map time and pitch on the two axes in the plane, the modified tune contains an affine transform of the segment from step 2. The blue graph is obtained from the green graph by translation (in x=time and y=pitch) , plus scaling (in x=time only) .
