News Archive

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.

Overview

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.

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.

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.

About Variable 4

Variable 4 is an outdoor sound installation that translates live weather conditions
into an ever-changing piece of music, using weather sensors and custom software to generate
and recombine thousands of musical fragments.
Read more about the piece...