# Giant Steps, Tiny Steps

Giant Steps is a John Coltrane song infamous for being difficult to improvise over, because it has massive key changes (hence “giant steps”) that are hard for musicians to keep track of.

It didn’t seem to give Coltrane too much trouble though:

The “circle of fifths” is the sort of landscape in which these steps (giant or otherwise) can be taken. Say we start with the note C. Within the key of C major, if we move up five notes we get to a G (C, D, E, F, G). This G is the fifth of C. Likewise, if we move up five notes from G we get to D (G, A, B, C, D). Continuing this we eventually walk around all 12 notes in the scale by fifths (because $$5n \: \mathrm{mod} \: 12$$ cycles through all possibilities).

Here’s what happens if you do a step-by-step walk around the circle of fifths. (The chords sound like they’re alternating between low and high pitch because I moved around the chords to fit within a smaller range of pitches.) Every one of these samples is going to repeat once, so you’ll be able to hear it repeat at the midway point.

If you take three of these fifth-sized steps at a time, you end up using only four chords out of the twelve:

Here’s four steps around, which of course means three chords. It has a different rhythmic feel because it’s based on counting to three instead of four, but the chord changes are still similar. This is also the set of chord changes most similar to what’s in Coltrane’s song.

Here’s what happens if you walk at five steps around: you end up with chords right next to each other on the scale.

Because 12 is divisible by 1, 2, 3, 4, and 6, and because 5 is just 6-1 (so the same as going 1 step in the other direction after jumping half the circle), any integer value of jumps around the circle leads to a repetitive pattern. Any linear recurrence mod 12 gives us a human-recognizable pattern of chords.

We could try to fix this by jumping into the world of the pseudorandom. Instead of just adding $$n$$ at every step, let’s use an LFSR or a Mersenne Twister to generate more-random (but still not totally random) sequences. They should sound more strange to the human ear, providing a bizarre musical experience while still being grounded in recognizable patterns.

Would this work? Well…not exactly. We can generate a random sequence of chord changes using something like the code below. Because the cycle here is so long (Python’s random module has a period of $$2^{19937-1}$$), if we’re going to hear any sequence as “random”, this should be it.

import random

def note(n):
"""Converts position on circle of fifths to a note name"""
notes = ['C', 'G', 'D', 'A', 'E', 'B', 'Gb', 'Db', 'Ab', 'Eb', 'Bb', 'F']
return notes[n - 1]

for i in range(12):
print(note(random.randint(1, 12)))

Here’s a sample “song” made using the above code.

Do you hear this as a random sequence? My guess is no. Human brains are very good at detecting patterns even in truly random data, and the scope of what’s allowed here (only 12 options, all major chords, repeats once) just doesn’t allow for something that sounds all that “random”. We may have giant steps, but it’s still hard to go for a random walk.