Posts Tagged ‘Composition’

Recording in Portland and Weymouth

As part of the development for Variable 4 Portland Bill, we’ve been working with musicians local to the Portland and Weymouth area, developing movements which reflect the area’s maritime and social heritage. We’ve been working in the studio of Simon Swarbrick, an astonishingly talented local violinist who also has an astonishingly nice self-constructed recording space.


Pictured above is Simon performing some of the score fragments we’ve been devising for Variable 4. We have been experimenting with generating parts of the score based on algorithmic processes, to then be displayed on iPad and performed by musician. An an example, one such process takes the gradual directions in wind speed that have taken place in Portland over the past hundred years, and translates these compass directions into modular score parts. This can then be reassembled to produce musical movements portraying different eras of Portland’s weather history — or fed into the system to generate live patterns based on moment-to-moment wind speed detected by the weather station.



Public beta release of Isobar, a Python library for algorithmic composition

Underlying Variable 4 is a suite of Python code, with components to deal with various different tasks – interfacing with the weather station, navigating the global score, broadcasting data, and so on. There’s one part in particular that we’ve found useful in general usage: the pattern generation code, which can be used to describe, manipulate and generate sequences of musical events.

We’ve finally cleaned this up for public release, and have christened it Isobar, from the notation used in meteorological pressure systems. In this context, it’s a way of notating music, in a concise and flexible manner.


Isobar is a pure Python library which makes it easy to express musical patterns, and output them through MIDI or (soon) OSC devices. It’s inspired by SuperCollider’s excellent pattern library, which allows patterns to be combined like building blocks to create easily extensible compositions.

To get it: download Isobar from GitHub.

Please note that this is a beta release, meaning that all features and syntax are subject to change.


To give a taste of Isobar’s approach and capabilities, let’s look at some example code

from isobar import *

seq = PSeq([ 0, 1, 2, 3 ])
seq = PStutter(seq, 2)
seq = seq + PSeq([ 0, 12 ])

for n in xrange(8):

> 0
> 12
> 1
> 13
> 2

The above creates a simple looping sequence (PSeq) based on increasing integers (or, if used as MIDI outputs, chromatic notes). Each value is repeated once (PStutter), and alternating notes are transposed an octave up. This is then used to output a sequence of numbers.

Note that patterns can simply be added together to transpose values. Many other operators can be applied in similar ways: for example, doing seq * 2 will double every value of a pattern, using lazy evaluation for no additional processor usage.

from isobar import *
from import *

scale = Scale([ 0, 2, 3, 7, 9, 11 ])
degree = PBrown(0, 2, -8, 8, repeats = False)

notes = PDegree(degree, scale) + 60

midi = MidiOut()
timeline = Timeline(160)

timeline.sched({ ‘note’: notes, ‘dur’: 0.25, ‘gate’: 0.9 })

This example binds a pattern to a MIDI device, and uses a random walk (PBrown) to play values from a particular Scale. A Timeline object is used to schedule MIDI events at a given BPM, and plays them through the default MidiOut device.

By assigning this pattern to the ‘notes’ value, its output is used to generate a series of pitches. We could assign a separate pattern to the ‘amp’ value, to control the velocity of each note.

Many more examples are available in the isobar distribution on GitHub, with an up-to-date index of pattern objects in the README. We’ll be continuing to work on Isobar extensively over the next few months; see the TODO file for forthcoming developments.