Deep Purple: Smoke on the Water

This example demonstrates a model of Deep Purple’s Smoke on the Water main riff. Note that the riff is exclusively based on parallel intervals (namely perfect fourths), which are marked in red in the following excerpt:

This can elegantly be expressed as degrees on the G minor blues scale:

As a concise context tree model representation, this can be represented as:

Note that the beginning of the first and third measure are exactly identical. To avoid redundant specifications, these phrases were extracted to a so called fragment, which is a named subtree which can be referenced from anywhere in the composition. In this case, the fragment is referenced twice. In the language representation, this model can be expressed as follows:

title "Smoke On The Water"
composer "Deep Purple"

composition
{
    time 4/4, tempo 110
    {
        instrument electricGuitarOverdriven
        {
            key Gm
            {
                scale blues
                {
                    parallelInterval mode absolute -5 recursive
                    {
                        fragmentRef fragment1
                        rhythm _8 8 _8 8 _8 8 4 _4
                        {
                            pitches 0 1 3 2
                        }
                        fragmentRef fragment1
                        rhythm _8 8 _8 4. _2
                        {
                            pitches 1 0
                        }
                    }
                }
            }
        }
    }
}

fragment fragment1
{
    rhythm 8 _8 8 _8 4
    {
        pitches 0 1 2
    }
}

The source code and the corresponding representations shown in this example are also available in the github example repository.