Tutorial Corner - Giant Steps Part IV - Patterns

Giant Steps

Now it’s time to delve into the search for tonal patterns in John Coltrane’s solos on “Giant Steps” (1959). As mentioned in the first part of this tutorial series, Coltrane’s usage of very long patterns in this recording was investigated by several authors before. Thus, the main aim of this tutorial is to show how the pattern search tools of the MeloSpyGUI can complement prior research, and how the software can make the search for patterns decisively easier and faster.

To begin with the pattern search, you must switch to the Pattern tab. There are three options: SEARCH, DATABASE, and PARTITION. Using the search mode, you can look for predefined patterns in the chosen data. The database and partition modes allow you to search for specific pattern features, and to collect all patterns occurring in the data and fulfilling these criteria - e.g. certain durations, or number of occurrences in different pieces.

It is not aimed to search for patterns you already know they occur in “Giant Steps”, but for patterns matching specific search questions - so choose the partition mode. There are several options for defining the criteria (Fig. 1).

Pitch class patterns

Fig. 1. Pitch class pattern partition.

First of all, you have to define the melodic transformation. Melodic transformation refers to the features introduced in the pitch and interval tutorials - e.g. pc (pitch class), cpc (chordal pitch class), or interval. (Note, that the pattern module supports only a limited set of Suitable transformations.) When choosing pc, the software will search for patterns of certain pitches classes. So if you want to search for patterns in two different solos, the results will only show sequences of the same pitches classes; if you would select interval, it would be patterns of the same intervals. The partition mode offers the opportunity to define how long the patterns you search for should be. Since it is already known that Coltrane plays pretty long patterns, you can enter 10 in the field right to Minimum Length. The results will only list patterns of at least ten notes. Then, the minimum numbers of occurrences and sources must be defined. The goal is to find similar patterns in both solos of “Giant Steps” - thus, a pattern should occur at least two times. Furthermore, it must occur in both solos, so enter 2 in each field. If you choose the default setting List, the results will be displayed in a CSV file. The trill filter can be used if one aims to avoid the listing of frequent sub-patterns: a trill is defined as a pattern that consists of a repetition of a single sub-pattern. Just define 2 and 10 as minimum and maximum period. The features chosen by now will be enough for a basic pattern search. Start the search process and check out the CSV file.

The results file is structured as follows: you have the id, that is, the solo in which a pattern occurs. Start refers to the starting point in the solo. N means the number of notes a pattern consists of, onset the exact time where it starts in a solo, dur means the duration of a pattern in seconds, and metricalposition refers to the metrical starting point. Value means the pattern itself: in this case, the numbers must be understood as pitch classes, 0 stands for the pitch class C. Freq means the number of occurrences, prob100 the relative frequency of a pattern in percent, and tag is an automatically attributed name of a pattern. Note: you can sort the data in your CSV file. For instance, it would be advised to generate a table sorted by N to start either with the longest or the shortest patterns.

There are 22 results from 10 to 20 tones listed in the CSV file. Since such long patterns are quite unusual, as is the high number of occurrences in even two solos, it can be assumed that Coltrane refers to several memorized ideas. Now you may control if you will get similar results when searching for interval patterns. So repeat the prior procedure while simply replacing pc with interval (Fig. 2; CSV file).

Interval patterns

Fig. 2. Interval pattern partition with patterns of at least 10 intervals.

As you can see, there are only ten results, but still very long patterns from 10 to 19 tones. Furthermore, it could be of interest if Coltrane uses shorter patterns as well. So just define five instead of ten notes as minimum length. In this case there are 178 results, some of the patterns occur even twelve times (Fig. 3; CSV file).

Interval patterns

Fig. 3. Interval patterns with patterns of at least 5 intervals.

By now, you have several statistical results. In a next step, you should explore if the patterns are similar in a musical sense as well. In some cases the patterns may consist of similar sequences of pitches or intervals but played in different rhythms or metrical positions. In order to control the musical similarities, a first step might be to have a look at the duration (dur) of two or more similar patterns in the CSV file. If the patterns are approximately of the same duration, it can be assumed that they sound similar as well. In your first CSV file, you can see that the two 20-tone-patterns have quite the same duration - the difference is only a few milliseconds. For comparing the two patterns, the search-tab can be used. Just copy the value of the pattern in the CSV file (value, without the brackets) and paste it into the field right to Pattern in the search-mode (Fig. 4).

Searching for pitch class patterns

Fig. 4. Searching for pitch class patterns.

(NB: the commas in the search string are optional, they can also be just simple spaces). Again, you have to define the melodic transformation - please type in pc, since all patterns in your first CSV file are pitch class patterns. Then, select MIDI for displaying the results and start the process. The MeloSpyGUI now generates a MIDI file, to which you can listen to when clicking on Open Result File (MIDI). Obviously, the two 20-tone-patterns sound pretty similar. Let’s choose one of the long interval patterns, for instance the 15-note-pattern, and give it a try as well - don’t forget to replace pc with interval for the melodic transformation (Fig. 5; MIDI).

Searching for interval patterns

Fig. 5. Searching for interval patterns.

Once more, the similarities are quite obvious. This procedure could be repeated for all of the patterns listed in the CSV files. In doing so, the quality of the computer generated results can be controlled musically by listening carefully to the MIDI files. In principle, with the included onsets in seconds (calculated from the start time of solo, which can be found in the metadata), one would be able to locate patterns in the audio file.

Let’s have a look at some more advanced tools for the pattern search. As demonstrated before, Coltrane plays 178 interval patterns of at least five notes in the two solos in “Giant Steps”. Maybe some of the shorter patterns occur as parts of other longer patterns as well. In order to answer this question, there are several options for using wildcards and quantifiers. In the CSV file, there is one interval pattern that occurs even twelve times: -2, -3, -2, -2, 2 - so let’s choose this one as an example. If you want to know if this pattern also occurs as a sub-pattern of other longer patterns, the search mode of the MeloSpyGUI will provide some helpful options (Fig. 6).

Wildcard

Fig. 6. Using regular expressions in pattern search.

Just type in ‘.?’ before and after the -2, -3, -2, -2, 2 pattern, as shown in the screenshot. ‘.?’ means that any interval could occur once before or after the defined pattern. The dot . stands for any possible sign (wildcard), whereas ? means 0 or 1 occurrences (quantifier). In this specific case, the MeloSpyGUI will search for any patterns of seven notes in “Giant Steps” enclosing -2, -3, -2, -2, 2 - one note has to occur before the pattern, and one after the pattern. After starting the analysis process, you will get a CSV file with five results.

Furthermore, it could be of interest if the patterns are played on the same metrical positions. In this case, the Secondary Search provides further options. First of all, the Melodic Transformation has to be defined. In order to explore the metrical positions or starting points of patterns, you have to type in accent and, for further differentiation, accent-beatall (Fig. 7).

Accents

Fig. 7. Defining a accent-beatall pattern for a secondary search.

Options such as accent-beat1 allow to search for patterns starting on an exactly defined metrical position - in this case the first beat in a bar. When selecting accent-beatall, you can explore if the patterns start on a beat position or not. Please visit our website for further information on Accents. Each 1 in the field Pattern stands for an accentuated tone, i.e., a tone on a beat (with accent-beatall) or a tone on beat 1 (with accent-beat1), each 0 for all other tones. As you can see in Fig. 7, the order to look for in the example is 1 0 1 0 1 0. That is, the pattern looked for has to start on a beat, followed by a row of tones alternating between offbeat and onbeat positions. In the CSV file, there are four interval patterns matching these criteria.

Searching for patterns in the described fashion could be further expanded, for instance when comparing improvisations of different soloists, or several solos of the same musician. “Giant Steps” is one impressive example for the usage of long patterns, as other researchers have already showed. But the MeloSpyGUI offers an adequate toolkit for a fast and exact pattern search that goes far beyond the possibilities of rather usual analysis that is solely based on traditional transcriptions. If you want to know more about the options for the pattern search with the MeloSpyGUI, see the melpat documentation and the MeloSpyGUI tutorial.

© 2017 Benjamin Burkhart

Previous: Part III of the tutorial.