This page presents an interactive applet designed to illustrate the measures of durational contrasts between successive notes and pitch interval variability, used by Patel et al. to study the possible influence of composers' native language on the rhythms and melodies found in their music (Patel et al., 2006).
This applet was developed in the context of Musical Patois: Reflections of Language in Music, Thursday, March 31, 2011, 7:30pm USC University Park Campus, Alfred Newman Recital Hall (AHF), a USC Visions & Voices event.
In its data visualization role, the applet allows the user to plot a collection of themes on a graph that summarizes relevant rhythm and melody features. The normalized pairwise variability index, or nPVI, computed over note durations, captures the degree of durational contrasts between successive notes. The nPVI value characterizes a theme's rhythm. The melodic interval variability, or MIV, is proportional to the coefficient of variation of pitch distances between consecutive notes. The MIV value characterizes the theme's melody. Both measures are defined and used in (Patel et al., 2006).
The applet also implements a genetic algorithm that "evolves" themes, utilizing nPVI and MIV as part of the fitness function to either select with higher probability themes that have either high or low nPVI and MIV values. The initial population can consist of library themes, or of randomly created "themes."
Disclaimer: there is absolutely no claim that this applet does anything musically valid. The only goal here is to provide an accessible audiovisual interactive illustration of the nPVI and MIV measures when applied to collections of pitches of various durations, some of which are musical themes.
Start playing with the applet now, or take a look at the directions for more details.
Note: if nothing shows here, make sure Java is enabled in your browser.
The applet interface consists of a main graph area, a menu bar above the graph, a theme panel below the graph, and an evolver panel to the right of the graph.
The large upper left panel presents a plot of NPVI vs. MIV values for a collection of themes.
The average speech nPVI x MIV values for English and French speech are marked by a red cross and a blue cross respectively. The crosses indicate standard deviations, as in Patel et al. (2006).
The collection of plotted themes can be assembled from the library of
themes used in (Patel et al., 2006), through the Library
menu. The library contains themes from English composers Bax, Delius,
Elgar, Holst, Ireland and Vaughan-Williams, and from French composers
d'Indy, Debussy, Faure, Honegger, Ibert, Milhaud, Poulenc, Ravel,
Roussel and Saint Saens. The menu offers options to load all themes,
all English themes, all French themes, or all themes from any of the
featured composers. The collection is not reset when loading a new
subset, such that any combination of these options may be plotted.
(The Clear button in the Population panel empties the
theme collection and therefore clears the graph.)
Each theme in the collection is represented on the graph by a small blue square at the position corresponding to its nPVI and MIV values. A click on or near a blue square selects the corresponding theme (marked as a solid red square). The theme panel displays information specific to the currently selected theme.
A large black square marks the position of the theme collection's average nPVI and MIV values in the graph.
The upper part of the theme panel displays information about the theme currently selected. The panel shows, from left to right, the theme's name, its nPVI and MIV values, and the replay tempo in beats per second (bps). The play button triggers replay of the theme through the default MIDI player; the stop button stops the replay.
The theme name and replay tempo can be edited by the user (change the value in the appropriate field and press return). For themes loaded from the library, the default name is the original file name. The default replay tempo is 120 bps.
The lower part of the theme panel displays the notes and durations in piano roll notation. The blue line indicates A440; the graduations indicate tempo units.
In addition, to facilitate transcription, the display shows letter names (pitch spelling consistent with C Major).
The piano roll area can be scrolled horizontally by dragging with the mouse. The beat scale can be changed by holding SHIFT while clicking, then dragging vertically in the piano roll area. The total number of beats displayed in the width of the panel is indicated while rescaling.
The evolver panel comprises of several buttons that command the creation and evolution of theme populations, as well as some information about the current population: its age (in number of generations), and its average nPVI and MIV values.
The top buttons provide a means to clear the current population
(button labeled Clear) and to seed the population with 50
randomly generated themes (button labeled Init).
The remaining buttons control the evolution of the current population into the next.
The radio buttons labeled English and French
indicate which nPVI and MIV values are desired for the populations.
Technically, the genetic algorithm will select themes closer to the
average nPVI x MIV point for the selected language. A click on the
button labeled Evaluate computes the fitness for each
theme in the population and sorts the themes according to their
fitness.
A click on the Select button marks the themes that are
most fit as breeders. Technically, this selection mechanism is called
elitism. The number of breeders is half the size of the total
population. Breeders are colored green on the nPVIxMIV graph.
A click on the Breed button triggers the creation of the
next generation from the set of selected breeders. Each new theme in
is created by picking a parent at random among the breeders, and
copying its note events with possibly some mutations that can result
in changing the note pitch, the note duration, or drop the event (in
which case the previous note's duration is extended) or split the note
(without changing the total duration of the events). These operators
were chosen for their ability to alter a theme's NPVI or MIV values,
rather than for specific musical properties (this is a very difficult,
unsolved problem in the general case). The newly created theme takes
the name of its parent, to make it easier to track origins. Note that
a theme's name can be changed in the Theme panel.
Starting from a given population, either generated randomly, or
assembled from the library of themes, or evolved from a previous
population, a new generation is produced by going through the
cycle: Evaluate - Select
- Breed.
Pressing the button labeled Evolve is equivalent to pressing in sequence Evaluate, then Select, then Breed.
The genetic operators adopted here are quite simplistic. The full arsenal of genetic algorithm and evolutionary computation methods comprise much more elaborate theoretical and practical tools, which unfortunately are very difficult to apply to music in a meaningful way.
There is no claim that this applet can generate musically meaningful themes. In fact, there is no musical knowledge (explicit or implicit) in the code. The library of themes constitutes the only musical material. For all it knows, this program could be evolving phone book entries...
The Musical Patois Evolver Applet was designed and implemented in Java by Alexandre R.J. François, alexandrefrancois.org
The theme data was encoded by Aniruddh Patel, John R. Iversen and Jason C. Rosenberg for their study reported in "Comparing the rhythm and melody of speech and music: the case of British English and French," Journal of the Acoustic Society of America, 119(5):3034-3047, May 2006. The theme data is based on Barlow and Mogenstern's A dictionay of musical themes, revised edition, 1983.