Pragmatic Chord Dissector Finished

The pragmatic chord dissection software is a patch that breaks apart a chord into the component notes and plays them back stochastically. It uses sends data to flash to power an accompanying animation.

The project originally started out life as a more complex version of my prior project: an algorithmic mixer using a genetic algorithm to create a population (or sound), making slight genotypic mutations and crossover selection in an attempt to create an organically generated sound. My original plan was twofold, firstly to improve the mechanism used for selection parent sounds that would be used in crossover to generate the offspring sound; secondly to visualise the process by exporting raw data to flash to be used as fuel for an animated piece.

I ran into several problems while trying to stay on the genetic algorithm route. I was using the GAK object which didn’t offer much flexibility in the selection process, as there was no way to include a user based input on what is a ‘good’ choice for a parent sound. It is limited to pre designated, fairly generic options. As there was no way to explicitly select the parents, and the fitness of the produced offspring, the genetic algorithm produces extremely stochastic. While I could see a solution to all of these issues, it involved either decompiling and editing the GAK object, or writing my own from scratch. As my understanding of genetic algorithms is still intermediate at best and my knowledge of the language needed to write max objects is almost non-existent, I decided to branch off into a different area of pragmatic music.

I designed a patch that takes a chord input from a midi device, picks apart the different notes in that chord and plays them in a random order. This allowed me to continue experimenting in the field of generative music but includes an element of user participation instead of having a purely algorithmic composition. The patch runs at a specific tempo, and Max sends this data to Flash to be used as the generative data for the visual side of it.

The main challenges in the compositional process involved increasing my understanding of midi devices and controllers, especially in relation to how Max/MSP handles the values generated; and learning how to dissect a chord to access the individual note values. My approach to dealing with these issues was to compartmentalize the design of the patch in to manageable areas (dealing with midi input / communicating with flash etc) and solve each problem in an isolated environment. When each of the different sections was complete, it was a lot easier to create the final patch and debug it as I had reduced the number of unknown factors I had to deal with.

sound app 2

Generative Music

There are four primary perspectives on Generative Music (Wooller, R. et.al., 2005)(reproduced with permission):

1. Linguistic/Structural: music composed from analytic theories that are so explicit as to be able to generate structurally coherent material (Loy and Abbott 1985; Cope 1991). This perspective has its roots in the generative grammars of language (Chomsky 1956) and music (Lerdahl and Jackendoff 1983), which generate material with a recursive tree structure.

2. Interactive/Behavioural: music generated by a system component that ostensibly has no inputs. That is, ‘not transformational’ (Rowe 1991; Lippe 1997:34; Winkler 1998).

3. Creative/Procedural: music generated by processes that are designed and/or initiated by the composer. Steve Reich’s Its gonna rain and Terry Riley’s In C are examples of this (Eno 1996).

4. Biological/Emergent: non-deterministic music (Biles 2002), or music that cannot be repeated, for example, ordinary wind chimes (Dorin 2001). This perspective comes from the broader generative art movement. This revolves around the idea that music, or sounds may be ‘generated’ by a musician ‘farming’ parameters within an ecology, such that the ecology will perpetually produce different variation based on the parameters and algorithms used[citation needed].

  • Lerdahl and Jackendoff’s publication described a generative grammar for homophonic tonal music, based partially on a Schenkerian model. While originally intended for analysis, significant research into automation of this process in software is being carried out by Keiji Hirata and others.
  • In Its gonna rain, overlapping tape loops of the spoken phrase “it’s gonna rain” are played at slightly different speeds, generating different patterns through phasing.
  • Brian Eno, who coined the term ‘generative music’, has used generative techniques on many of his works, starting with Discreet Music (1975) up to and including (according to Sound on Sound Oct 2005) his latest album ‘Another Day on Earth’. His works, lectures, and interviews on the subject have done much to promote generative music in the avant-garde music community. Eno used SSEYO’s Koan generative music system (created by Pete Cole and Tim Cole of intermorphic), to create his hybrid album Generative Music 1 (published by SSEYO and Opal Arts in April 1996), which is probably his public use of the phrase “Generative Music”.
  • Many software programs are now available to create generative music, such as SSEYO’s Koan Pro (1994-2007) (used by Brian Eno to create his hybrid album ‘Generative Music 1′), Karlheinz Essl’s sound environments fLOW (1998-2004) and SEELEWASCHEN (2004), furthermore MusiGenesis (2005), a program that evolves music. In 2007 intermorphic launched the noatikl generative music software suite as a replacement for the no-longer-available Koan.
  • Lauri Gröhn has developed Synesthesia software that generates music (midi file) from any photos in a few seconds.

http://en.wikipedia.org/wiki/Generative_music

Maths in Music

Since my decision to stop playing around with GAs in my algorithmic compositions I’ve been looking into other ways of using maths to manipulate sound into interesting and (if possible) pleasing interpretations.

Recently I’ve been looking at the (many) works of Karlheniz Essl in the field of algorithmicly generated music, specifically projects such as Amazing Maze and nature / morte, which produce an incredible refined sound considering the stochastic nature of the software.

http://www.essl.at/works.html

Algorithmic Composition

Further research into different methods of algorithmic composition:

Algorithmic composition is the technique of using algorithms to create music.

Algorithms (or, at the very least, formal sets of rules) have been used to compose music for centuries; the procedures used to plot voice-leading in Western counterpoint, for example, can often be reduced to algorithmic determinacy. The term is usually reserved, however, for the use of formal procedures to make music without human intervention, either through the introduction of chance procedures or the use of computers. There is a radical distinction (both in terms of philosophy and in the heard result) between composers who use indeterminate (e.g. stochastic) procedures to compose music and those who use routines which produce deterministic results given a fixed input into the algorithm.

Many algorithms that have no immediate musical relevance are used by composers as creative inspiration for their music. Algorithms such as fractals, L-systems, statistical models, and even arbitrary data (e.g. census figures, GIS coordinates, or magnetic field measurements) are fair game for musical interpretation. The success or failure of these procedures as sources of “good” music largely depends on the mapping system employed by the composer to translate the non-musical information into a musical data stream.

Mathematical models are based on mathematical equations and random events. The most common way to create compositions through mathematics is stochastic processes. In stochastic models a piece of music is composed as a result of non-deterministic methods. The compositional process is only partially controlled by the composer by weighting the possibilities of random events. One good example of stochastic algorithms is Markov chains. Stochastic algorithms are often used together with other algorithms in various decision-making processes.

Music has also been composed through natural phenomena. These chaotic models create compositions from the harmonic and inharmonic phenomena of nature. For example, since 1970’s fractals have been studied also as models for algorithmic composition.

As an example of deterministic compositions through mathematical models, the On-Line Encyclopedia of Integer Sequences provides an option to play an integer sequence as music. (It converts each integer to a note on an 88-key musical keyboard by computing the integer modulo 88.)

http://en.wikipedia.org/wiki/Algorithmic_music#Mathematical_models

Genetic Algorithm Problems

I’ve been running into problems trying to improve the selection methods of my last sound project, to the point where I’m probably going to have to veer away from using genetic algorithms as the logical mechanism for evolving the envelope of a sound.

The main issue I have is during parent selection. For each iteration of the algorithm, a new generation of sounds is injected into the population and older, less fit sounds are removed. The obvious goal is to mimic the Darwinian model of evolution which should lead to sounds that are considered fitter in their environment. However I am finding it incredibly hard to get control over the parameters that determine the fitness of a sound.

I have been using the GAK object by M. Cera to provide the GA functionality in my application. The way this object has been designed leaves no flexibility for the inclusion of a user based selection mechanism, which would allow me to put the fitness ranking (i.e. does this sound good, is it something I want to remain in the population), in the hands of the people who would be judging the quality of the final sound.

I don’t have the time to learn C, decompile the GAK object, redesign the fitness mechanism and recompile, nor the level of knowledge needed to pull it off; and there aren’t any of objects for Max I can find that would allow me to keep exploring this option, so I’ll be looking at some other methods to add a user based input into the algorithmic sound app.

Genetic Algorithm Mixer Finished

Finished off my first attempt at an algorithmic mixing machine that uses a genetic algorithm to create a evolved sound.

sound app 1

Composing with Genetic Algorithms

From Bruce L Jacobs report at the International Computer Music Conference, 1995:

Contemporary algorithmic composition ranges from traditional stochastic methods seen in M and Jam Factory (Zicarelli, D.) to complex rule-based systems such as EMI (Cope, D. 1987, 1992) and Cypher (Rowe, R.). This paper describes a composition process that combines the best of these two extremes, achieving the simplicity of a stochastic process and the determinism of a rule-based system.

A popular way to solve a problem, answer a question, or in general derive a suitable structure to fit a set of requirements, is to cast the problem or question as a search problem, a technique central to artificial intelligence. The goal is to look through the entire set of possible solutions to find one that satisfies the original criteria; the trick is to structure the set of all possible solutions so that one does not have to check every solution, allowing the search to complete in a finite amount of time.

One can think of the composition of music as just such a problem: consider the set of all possible compositions as the solution space, with the problem at hand being, “find a composition that sounds good.” This solution space is unstructured in that good solutions may lie next to perfectly awful ones; if you change a few key notes in a piece it may become far less interesting, though on the surface it appears virtually identical. An unstructured solution space makes searching through it unpredictable and therefore difficult.

Enter the genetic algorithm (Holland, J.), an extremely effective technique for searching enormous, possibly unstructured solution spaces. The algorithm begins with randomly-generated solutions to a problem and uses the equivalent of biological recombination to find better solutions, ultimately ending up with an optimal set. The solutions are represented by chromosomes, strings of alleles represented by strings of numbers, and the recombination of chromosomes is simply a matter of creating new strings with alleles taken from the parent chromosomes. Since solutions are evolved by trying out answers and combining the answers that work best, the technique is particularly well-suited to solving “fuzzy” problems where the solution domain is poorly behaved, or where there is no clear way to judge the solutions objectively.

The technique has been used in music before: (Horner, A. 1991) describes the application of genetic algorithms to thematic transformation, (Biles, J.) describes a genetic-based jazz soloist, and (Horowitz, D.) describes a genetic algorithm for creating interesting rhythms. The biggest problem seems to be the size of the search space; successful GA-music studies have had restricted goals, because the problem domain gets large quickly and therefore convergence to a satisfactory solution may take extremely long. Horner deals with morphing one melody into another, Biles generates single melodies on top of given chord progressions, and Horowitz deals with rhythms that span only one measure. This experiment restricts the focus of the search differently; instead of reducing the size of the problem domain, this GA deals with larger building blocks.

http://www.ece.umd.edu/~blj/algorithmic_composition/icmc.95.html

Sound App Ideas

Working in Max/MSP, I’ve been experimenting with the idea of using genetic algorithms to mutate distinct characteristics of midi sound. By compartmentalising a midi output into individual variables, it is possible to construct a genotype unique to that sound. The genotype contains the elements that make up the sound (pitch, velocity, duration etc).

Using the GAK object in MAX I hope to design a patch that takes either a limited set of user inputs, or a pre-designed audio pattern, and mutates each value in the genotype within a valid range. This will hopefully provide a building block from which to further develop my interest in the intersection of the digital and biological universes, in particular the evolution of digital instances.

Marcel Duchamp

Marcel Duchamp (July 28, 1887 – October 2, 1968) was a French artist whose work and ideas had considerable influence on the development of post-World War II Western art. Thousands of books and articles attempt to interpret Duchamp’s artwork and philosophy, but in interviews and his writing, Duchamp only added to the mystery. The interpretations interested him as creations of their own, and as reflections of the interpreter.

nude descending staircase
Nude Descending Staircase No2 (1912). Duchamp’s interpretation the still images of a nude woman walking down a staircase.

In 1920, with help from Man Ray, Duchamp built what has come to be known as Rotary Glass Plates (Precision Optics) (Rotative plaque de verre). The piece, which he did not consider art, involved a motor to spin pieces of rectangular glass on which were painted segments of a circle. When the apparatus spins, the circle segments appear to be closed concentric circles.


This project explored the ideas of positions and locations as a factor on the interpretation of a project, as well as introducing new ways to use kinetics to understand problems.

More here.

Cinema Redux

Cinema Redux is a project by Brendan Dawes from Magnetic North. It cycles through a film and takes a snapshot of a frame at a given interval, then arranges the snapshots into a grid to give a visual overview of the film. It is interesting to look at work from a medium where time is the governing law in the presentation of material, in an arrangement where time is not an issue.

Cinema Redux - Deliverance
Cinema Redux - Deliverance

Cinema Redux - French Connection
Cinema Redux - French Connection

Cinema Redux - Serpcio
Cinema Redux - Serpcio

Cinema Redux - Taxi Driver
Cinema Redux - Taxi Driver

This explores the idea of distilling a whole film down to one single image. Using eight of my favourite films from eight of my most admired directors including Sidney Lumet, Francis Ford Coppola and John Boorman, each film is processed through a Java program written with the processing environment. This small piece of software samples a movie every second and generates an 8 x 6 pixel image of the frame at that moment in time. It does this for the entire film, with each row representing one minute of film time.

The end result is a kind of unique fingerprint for that film. A sort of movie DNA showing the colour hues as well as the rhythm of the editing process. Compare Serpico to The Conversation. You can see there’s far more edits in Lumet’s classic compared to the more gentle slower pace of Coppola’s Conversation. This is also down to the editing style of Walter Murch who prefers to only make cuts when absolutely necessary. Have a look through the eight movies and make your own mind up.

More here.