Digito In Machina

Out Now! 🙂

Digito In Machina was composed over the course of a week during the 2020 lock-down. Working from home with no access to performers, recording venues or instruments other than what was immediately to hand narrowed some of the physical possibilities, but in so doing paved the way for the exploration of different solutions.

Superficially Digito In Machina can be perceived as a work for piano and computer, but to draw this conclusion would be an error as the whole piece was generated digitally. What interests me is how it is still so tempting to conjure a physical causality behind the piano (all the notes of which were pre-programmed) especially when it blurs into, and is overwhelmed by the ‘other’ of electronic processing which is in turn based upon the “piano” sound. Up until seven weeks ago the idea of not recording it with a real person playing the instrument would have been anathema; but given sessions are currently not an option it frees up this new metaspace between the inference of instrument, performer and computer audio.

The work reflects some of the strangeness of the lock-down time, arching over an approximately bell-like curve mixing whimsy and moments of beauty, with occasional flashes of fear, engulfment and the feeling of a niggling itch somewhere inside the mind. I sincerely hope we all arrive well on the far side. Stay safe.

Ed Wright
Penmaenmawr 4th May 2020

A Foreword

For Host/Operator

Creativity takes many forms.

Engagement with the sonic arts is a simple exercise, just listen.

Therein lies some of the beauty of this medium, it can be grasped instantly; and in so doing the listener can become (at least partially) cognisant of an enormity of meaning, symbolism, experience and practice that the acoustic information implies. 

This is particularly true of the work of Host/Operator. Theirs is an expression which embraces the audible and then exceeds it. The live composition of the work coupled with its instantaneous performance, are facilitated by a wealth of experience and self-reliance. The supreme mastery over ones medium to the point of the subversion of the self is an accomplishment few achieve, and in so doing this raises their work from that of a solely musical endeavour into an overarching meta-sphere of creativity.

Theirs is the hyperspace of the present, the infinitesimal point where past and future meet: reciprocation of past and projection to future are mediated through creative process, physical action and technological affordance to create a visceral, resonant dimension, outside of the day to day experience.

For this, and for so many other kindnesses, thank you both.

Ed Wright PhD FRSA

Penmaenmawr N. Wales 2019

Turbo 15-10-19

New music out now at:


Turbo is a piece of acousmatic music. It draws on three separate sound sources namely two Formula One cars which raced when I was young, the Lotus 97T and the Ferrari 412 T2, as well as a Scalextric set. These three sources form the basis of the track with the remaining sounds derived from them or synthesised from first principals.

The engines of that era sounded very different. It was a less regulated time, before the advent of widespread electronics, the introduction of hybrid engines or the level of concern about petrochemicals and their environmental impact. While there have been many changes for the better over the last thirty years in F1, the sound of the grid is not one of them.

While working with the audio to create something musical rather than a historical document several things jumped out at me. Firstly it is amazing how melodic these vehicles are. From the chord of D and A created by snapshot sample of a car in the distance to the almost choir-like textures created by zooming right in on only a very narrow set of frequencies it really should not have been a surprise how ‘tuned’ race cars are. Secondly, the sounds are highly cyclical, but in an evolving way which can be exploited to find not only glitchy textures but also built on and augmented.

As well as drawing on the sounds of the turbo engine the idea of a turbo spiral extends into the structure of the work. There are four main sections to the music which repeat and develop with increasing rapidity. If you travelled around a spiral at a constant speed you would find a new section of music every ninety degrees. As the spiral tightens the sections become shorter, leading to a whirling inexorability in the final stages.

This idea of structural acceleration extends to a Ferrari engine sound heard throughout the work. It starts very low and slow; five-thousandths of its original speed and then gradually ramping up to become audible, first as a bassy rumble before transforming into glitchy background antics before flying past at full speed at the end.

Creating this piece has been an interesting challenge; trying to balance something which is intellectually rigorous (e.g. the golden-spiral mapping and computing), along with creating something which is engaging to listen to. I have tried to convey something of the excitement and nostalgia the source sounds bring to me, but also that tranquil space that you find in split seconds of extreme focus, the loudness and brutality of the spectacle, and hopefully something beautiful. 

Turbo, Maths and Music

I have already written about some of the creative aspects of Turbo, the piece of music I am currently working on here https://edvirtual440.wordpress.com/2019/07/22/turbo/, but following interest from a number of people here is a bit of a deeper dive into the mathematics of the piece.

Under the gloss and shine of the main body of the work there is a continuous recording of a Ferrari 412 T2 F1 car. The recording starts played back very slowly; gradually getting quicker until it is at normal (breakneck!) speed at the end.
Artistically this was done to draw the listener in, there is a slow but impending inexorability about it but I wanted it to work creatively as more than just a cheap trick.

The playback speed is modelled on a golden spiral (i.e. a logarithmic spiral whose growth factor is φ the golden ratio) a design found not only in some engine turbos but also the humble snail from which the component took its name.

A golden spiral with initial radius 1 has the following polar equation:

\ r = \varphi^{\theta\frac{2}{\pi}}\,

If one were to travel inwards on such a spiral at a constant speed the time it would take to describe a full rotation around the centre decreases. While your speed would stay the same, in terms of RPM you would be accelerating. The manipulated Ferrari recording follows this pattern making 3 full rotations of the spiral appearing to get faster towards the epicentre at the end of the piece.

At a simple level digital audio works a lot like animation. A snapshot of a soundwave is taken numerous times a second (44100 for CD quality) and these snapshots are essentially then played back in order to create a close likeness to the original continuous sound. Just like animation and flip-books you can change how fast you leaf through the individual ‘pages’, and thus gain mastery of speeding up, slowing down or even appearing to reverse time.

The piece of music was to be 8 mins 39 seconds long. I wanted the Ferrari to be at normal playback speed at 8:38. Hence it was a task of mapping the sample rate to time or its equivalent distance along the spiral. Looking at it backwards I was aiming for a sampling rate of 44100 Hz at 8:38 with that rate decreasing by the proportions of the golden spiral as the time elapsed from the beginning of the piece of music trended to 0. 

Several cups of tea later I came up with the following which gives sample rate (Hz) relative to time (s). This is copied from the code which I had left deliberately un-simplified so that I could still almost see what I was doing!

Sample rate =44100(1/(pow(((1+sqrt(5))/2),((LOG(1-((1-pow((1+sqrt(5))/2,(12)))/(1-(1+sqrt(5))/2)-TIME)+(((1+sqrt(5))/2)*((1-pow((1+sqrt(5))/2,(12)))/(1-(1+sqrt(5))/2)-TIME))))/(log((1+sqrt(5))/2)))-1)))

This resulted in a gradual and inevitable winding up of speed but was still very ugly not to mention the processing power it drew before even handling audio. It turns out that trying to feed a digital-analogue converter floating values for sample rate (as opposed to integers) is not a great idea and leads to clicks and glitches. This brought down my need for fine grained resolution by a significant factor. In addition the difference of +/- of half sample is inaudible when 44100 are going past in a second! 

This meant that rather than calculate it all on the fly I stuck the formula into and excel spreadsheet and told it to calculate relative to the rows while rounding to the nearest integer; hence an instant lookup table with a revised sample rate for every second. Incidentally it started off *really* slowly at 221 samples in the first second!

I then cooked up a simple playback and record program (it has had 2 incarnations, being initially built in MAX/Msp and later Supercollider due to cross platform issues). It takes the excel table and looks at the values over time, interpolating between the 1 second breakpoints and applies this to the playback speed of the audio while simultaneously recording the output to disk. 

The net result is a lookup table and a bit of ramping between values; far more computationally efficient than the junk equation above! Sonically if produces a seamless transition from inaudible, through rumbling sub-bass, murmuring rumbles up to urgent build and finally a howling drive-by.

Turbo is due for release in October on Spotify, iTunes, Bandcamp etc. (click the links to go direct to the artist page). For more info see www.virtual440.

Sound-Sculpture ‘Susurration’ Cerflun-Sain

Susurration – Ed Wright 2019

Sound-Sculpture commission for Golygfa Gwydyr 

Susurrate (Latin): a murmur or whisper of leaves, wind etc.

The piece works with the shapes of the woodland to create a reflective space. Resonant metal bars are suspended from various trees and branches sonically and visually amplifying the apparent characteristics of each.

With the notes being suspended from the trees, the branches dictate something of the visual shape. Thus the impression of a majestic or skeletal specimen becomes heightened.

This is exaggerated by the notes used. In the case of a gnarled tree, if the notes used create something bright, a high pitched and major sound; it all of a sudden feels like a cheerful plucky little tree. Whereas if darker diminished tones were chosen the atmosphere and presence feel more menacing.

By itself the sculpture is largely silent, requiring a strong gust or outside intervention to create a sound. Instead, it remains quiet, highlighting the shapes of the canopy in an alien, almost ritualistic way.

On exploring the space members of the public can find beaters secured in place with which to tap the bars and bring the space to life. If audience members want to hear more than one tree at once in the space then they will have to cooperate and play as an ensemble due to the distances involved.

Each tree has a specific chord cluster, the sounds and appearance of which reflect the artists’ response to working with that particular organism. Some are sunlit and beautiful, others are brooding or foreboding, and everywhere in between.

The work is as much about music as the potential for sound. It is about heightening awareness of the environment, the magnification of space and listening and the pockets of existence between, before and after notes.

Edward Wright is a composer and musician living and working in N. Wales. Many thanks to Golygfa Gwydyr for the commission and Ysgol Emrys Ap Iwan for the donation of some of the upcycled materials.

Comisiwn Cerflun Sain ar gyfer Golygfa Gwydyr

Susurrate (Lladin): murmur neu sibrwd y dail, y gwynt ac ati.

Mae’r darn yn gweithio gyda siapiau’r coetir i greu gofod myfyriol. Mae bariau metel cyseiniol yn hongian o wahanol goed a changhennau ac yn chwyddo nodweddion ymddangosol pob un yn seinegol ac yn weledol.

Oherwydd bod y nodau’n hongian o’r coed, mae’r canghennau’n pennu peth o’r siâp gweledol. Felly cawn argraff gynyddol o sbesimen mawreddog neu ysgerbydol.

Caiff hynny ei chwyddo gan y nodau a ddefnyddir. Yn achos coeden gnotiog, os yw’r nodau a ddefnyddir yn creu sŵn clir, llon, uchel ei draw; mae’r cyfan yn sydyn yn teimlo fel coeden fach dalog a siriol. Mae tôn dywyllach a chywasgedig yn creu awyrgylch ac ymdeimlad mwy bygythiol.

Ynddo’i hun mae’r cerflun yn dawel, ac mae angen hwrdd o wynt neu ymyrraeth allanol i greu sain. Yn hytrach, mae’n parhau i fod yn dawel, gan amlygu siapiau’r brigau a’r entrych mewn modd estron, defodol bron.

Mi welwch chi fod yna brennau taro wedi eu gosod i chi guro’r bariau a dod â’r lle’n fyw. Os yw aelodau’r gynulleidfa eisiau clywed mwy nag un goeden yn seinio ar yr un pryd bydd yn rhaid iddynt gydweithredu a chwarae fel ensemble oherwydd y pellteroedd sydd rhwng y coed.  Mae gan bob coeden glwstwr cord penodol, y mae ei synau a’i ymddangosiad yn adlewyrchu ymateb yr artistiaid i weithio gyda’r organeb benodol honno. Mae rhai’n heulog a hardd, eraill yn llawn pensyndod neu ddrwgargoel, a phob amrywiad arall.

Mae’r gwaith yn ymwneud cymaint â cherddoriaeth â photensial sain. Mae’n ymwneud â chynyddu ymwybyddiaeth o’r amgylchedd, chwyddo gofod a gwrando a’r pocedi o fodolaeth sydd rhwng y nodau, cyn pob nodyn ac ar ôl pob nodyn.

Cyfansoddwr a cherddor yw Edward Wright sy’n byw ac yn gweithio yng Ngogledd Cymru. Diolch yn fawr i Olygfa Gwydyr am y comisiwn ac Ysgol Emrys Ap Iwan am roi rhai o’r deunyddiau eilgylch yn rhodd.

Basic Max Patching

As a few people have mentioned over the week or so that they are getting into composing and making noise in the Max environment. Here is some material I put together a while ago while running a first year undergrad course on the subject. Some of it is a little clunky by today’s standards but it should be enough to get most people off the ground.



Max book

Out now on iTunes (and Spotify, and SoundCloud etc. if you are as thrifty as I am!) :D

I’m terribly excited to announce that my most recent piece of sound/music composition is available to listen to (or buy) in various places over the web. If you would like to take a listen at your leisure please do so by googgling Edward Wright Space to Think in your generic search engine, or alternatively click on the album cover or Apple link below to go direct to iTunes and buy a copy to keep for ever 🙂 If you want to know more about the making of the piece, and for that matter what it is about please click here to read more rambling from me,



Space to Think revised


Space To Think

In about September I was commissioned by Bangor Music Festival to compose a piece of electroacoustic music for their February 2018 event, along with a series of education workshops. I really wanted to do this and it was looking like it was going to be an amazing autumn and early spring of creating cool stuff and having fun; then the floor almost literally gave way.

Following a period of ill health my Dad took his own life in mid October and unsurprisingly this hit me really hard. It is not so much the sadness which is debilitating but the feelings of numbness, rage and lethargy that suck the capacity for creativity away. In my case my Dad and I got on really well, he was a role model and someone who had a massive influence on me throughout my life, when something so seemingly at odds with everything you have ever known happens all the basic assumptions that you make in life come into question. I would even look at my feet when walking down stairs, not through shock or physical instability but because I no longer trusted the assumption that I knew where my feet and where the steps where. It was certainly no mindset to take creative decisions in, they are so vague, so intangible and impossible to verify that the simplest starting impetus threw up paralyzing indecision.


It was at this point that I sadly informed Guto the festival director that I couldn’t fulfill the commission. I have never had to do this before and it left me feeling awful, but also slightly relieved.  There followed a period of calm, I got back to doing some work and I managed to get off the antidepressants (citalopram) which had been prescribed to help me sleep, level me out and stop catching things out of the corner of my eye. In late December I got a phone call from Guto offering to take some of the festival work back, but once again asking if I would like to compose ‘something’ for the finishing concert.


I find it really hard to sit down and just make noises or compose, some people start from an initial sound or a feeling, I tend to find some sort of idea or framework to hang something on and then can go from there. I though about this for about 24 hours, it was an incredibly kind offer which Guto had made, and my head was clearing. I went for a run in the hills, it happened to be early as I wanted to make the summit of a mountain near to us to catch the winter solstice sunrise and on the way up the ideas just struck me.

The theme of the event this year is space and I am happy to say that the work shared a stage with Birmingham Ensemble for Electroacoustic Research (BEER). BEER had worked in collaboration with the Art@CMS project at CERN in Switzerland, using real-time sonification of data streams from the Large Hadron Collider, the world’s largest and most complex particle accelerator. This is something which it is foolish to compete against; that, and the fact that I literally have Scott Wilson (of BEER)’s book on coding in Supercollider sat on my desk. Thus I chose to take a different tack and rather than approach it from an analytical and scientific angle I went for something closer to home.

Space To Think – Ed Wright 2018 (8 channel surround sound audio)

pianostringsA lot of what is in the popular imagination about space and space travel is precisely that, imagination. From the Barron’s Forbidden Planet through to the electronic squelch of radio communication a lot of what we think of as space related is a very human construct. What fascinates me is how much of what we believe sounds as if it comes from outer space or under the sea (or for that matter any environment out of our direct experience) is actually a result of dubbing and sound design in the media. As a culture we have bought into the idea of rockets rumbling as they go past, even though there may be almost nothing in the void of space to transmit the sound and the glockenspiel twinkle of stars is almost as real as the piano wire scrape of the Tardis. This provides a fantastic palate of subverted fantasy with which to create and explore a rich and varied sound world. Apart from the use of two pieces of NASA archive; launch and countdown, the rest of the sounds used I have recorded and shaped myself.

26232759_10155810057685631_1698340499798078925_oGreat delight was taken in recreating a few iconic ‘other worldly’ sound objects and effects along the way, 50 pence pieces were rubbed down piano strings to provide the basis for a tardis noise before looping and adding spring reverb. Humming strip lights were close mic-ed to create light-sabres, and some generative coding brought about drone progressions similar to the opening of Star Trek. These and many other sounds were used as the raw materials of the piece and then developed as the different timbre interact and evolve. The result is an acousmatic work utilizing a wide variety of sounds from analogue synthesis through to simple dislocation and out to generative algorithms creating an apparently extra-terrestrial environment in which our earthbound ears and minds can roam.


Many thanks to Guto Puw and the Bangor Music Festival for their kindness, understanding and faith.

In memory of Brian Wright



The Xmas-o-lo-phone

I’m going to set up a Christmas ‘xylophone’ between the trees. This will consist of a series of hollow (tuned) pipes hung length ways between the trees, suspended on rope or chord. The overall effect will look similar to a rope ladder slung sideways.

The idea is that rather than just playing a scale it will play Jingle Bells. So, the first few notes will be at the same pitch as with the tune:


Jingle bells, jingle bells

Jin- (It is not until you get to note 8 that it rises in pitch!)


So, each rung is a note of the tune, as you run along blowing or tapping them they play the tune, they will also be spaced so that the rhythm works properly e.g. the third note has twice as big a gap to the next ‘rung’ compared to the previous note.

It would be good to set it up in a horseshoe (probably more realistically a V) shape between the trees so that is can be run around in a loop.

The trick is working it out so that it is dead easy to play.

Tune Pitch Duration
Step Pitch Rhythm Degree of scale Relative pipe length Pipe length in (mm) Cut from pipe batch Relative distance to next note Distance to next note (cm)
1 e Crotchet 3 0.789889 50.0 3 2 50
2 e Crotchet 3 0.789889 50.0 3 2 50
3 e Minim 3 0.789889 50.0 3 4 100
4 e Crotchet 3 0.789889 50.0 3 2 50
5 e Crotchet 3 0.789889 50.0 3 2 50
6 e Minim 3 0.789889 50.0 3 4 100
7 e Crotchet 3 0.789889 50.0 3 2 50
8 g Crotchet 5 0.666667 42.2 4 2 50
9 c Dotted Crotchet 1 1 63.3 4 3 75
10 d Quaver 2 0.888889 56.3 2 1 25
11 e Semibreve 3 0.789889 50.0 3 8 200
12 f Crotchet 4 0.750188 47.5 1 2 50
13 f Crotchet 4 0.750188 47.5 1 2 50
14 f Dotted Crotchet 4 0.750188 47.5 1 3 75
15 f Quaver 4 0.750188 47.5 1 1 25
16 f Crotchet 4 0.750188 47.5 1 2 50
17 e Crotchet 3 0.789889 50.0 3 2 50
18 e Crotchet 3 0.789889 50.0 3 2 50
19 e Quaver 3 0.789889 50.0 3 1 25
20 e Quaver 3 0.789889 50.0 3 1 25
21 e Crotchet 3 0.789889 50.0 3 2 50
22 d Crotchet 2 0.888889 56.3 2 2 50
23 d Crotchet 2 0.888889 56.3 2 2 50
24 e Crotchet 3 0.789889 50.0 3 2 50
25 d Minim 2 0.888889 56.3 2 4 100
26 g Minim 5 0.666667 42.2 4 4 100
1310.2 6*3m pipes 1600


Caddis, an update…

Caddis – Notated work for solo instrument


Caddis flies live near ponds and streams. As larvae, they live underwater and make wearable tubes from local materials, such as twigs, sand, stones, or snail shells. The items they select are bound with silk and the larva hooks itself inside with the end of its abdomen. The tubes serve various purposes – stones can be added to increase traction in fast-moving streams; irregular twigs make the tube (and its inhabitant) difficult for a trout to swallow. This may be considered more of an engineering than creative process, but are they are none the less candidates for the stable of “natural assemblage artists”

Caddis draws on this phenomena creating a work from a bank of two dozen notated samples, reworking, organizing and blending them into a new abode for the performer to inhabit.

In order to make this happen I have been playing around with a number of melodies and then algorithmically “composing” them. I have been taking 24 event-rows of pitches and rhythms deriving ‘sets’ from these and applying transformations like time stretching and transposition to them.  Obviously writing these out long hand and applying various transformations could be incredibly laborious and I would probably create a few minutes and then get bored. So I have been building and refining the framework on computer and then auditioning it at the click of a button to see what works best.

supercolliderTo fit in with the spirit of recycling and self sufficiency of the project I’ve been working in supercollider, not the easiest of environments but it is free, open source and incredibly powerful. Its a way of working which I have known about for a long time but have never really taken to, it’s nice to finally have the excuse…

If you want to have a go you can click the icon to the left to download it. If you would like to see my wobbly code and make up some of your own please go for it! If you want to go hacking about the simplest place to start is changing numbers in the Pitch or Duration rows, also the number of runs defines how long a piece it will create. It’s still in early days but its good fun. The real skill will come with tweaking the parameters and making all of the other elements such as volume, tempo and timbre work well, but that is something for another day 🙂

/*CADDIS pitch duration builder*/

var runs = 3;//  enter the number of runs and then evaluate


/*musical parameters*/

//Pitch rows (midi numbers)

var p1 = [64,62,64,67,66,62,59,62,57,55,57,62,59,62,66,69,67,66,67,59,62,64,59,62];
p2 = [66,63,62,62,66,67,63,62,60,58,57,58,55,57,58,60,66,67,63,70,64,62,68,67];
p3 = [59,63,67,62,58,65,62,60,59,61,64,67,59,66,65,64,69,56,61,69,59,64,62,68];
p4 = [64,68,68,68,64,67,64,68,68,64,68,68,64,68,64,64,64,67,67,68,64,64,67,64];
p5 = [57,61,59,63,68,57,61,59,60,59,57,56,57,61,59,63,68,66,65,64,60,59,57,56];
p6 = [58,68,62,58,64,65,62,61,58,63,58,65,61,68,60,62,61,58,67,56,56,64,65,65];
p7 = [60,65,62,55,67,62,59,60,62,60,65,67,69,62,59,60,62,65,64,57,62,64,59,57];
p8 = [60,56,67,68,63,62,66,70,59,59,58,63,62,65,57,65,58,62,65,58,61,68,64,60];
p9 = [59,63,68,62,58,65,62,60,59,62,65,68,59,66,65,65,69,56,62,69,59,65,62,68];
p10 = [71,70,69,68,69,68,67,66,65,62,61,60,71,70,69,68,66,65,64,63,62,61,60,59];
p11 = [62,59,62,62,60,59,59,62,62,62,60,62,60,60,62,60,60,62,59,62,60,60,60,62];
p12 = [54,62,61,61,57,67,61,60,60,59,58,57,55,59,57,59,64,60,67,59,65,56,65,63];

var pitch = [{p1},{p2},{p3},{p4},{p5},{p6},{p7},{p8},{p9},{p10},{p11},{p12}];// Pitch row titles

//Duration rows (ms)

var d1 = [0.25,0.25,1.5,0.25,0.25,0.25,0.5,0.5,0.25,0.25,0.25,1.5,0.25,0.25,1.5,0.25,0.25,0.5,0.5,0.5,0.25,0.5,0.25,0.25];
var d2 = [0.25,0.125,0.25,0.375,0.5,0.25,0.5,0.25,0.25,0.25,0.5,0.5,0.25,0.25,1.25,0.5,0.25,0.25,0.5,0.25,0.25,0.25,0.5,0.25];
var d3 = [0.5,0.25,0.625,0.125,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.125,0.375,0.25,0.25,0.25,0.25,0.25,0.5,1.5];
var d4 = [0.75,0.75,0.5,0.25,0.25,0.25,0.75,0.25,0.25,0.75,0.25,0.25,0.25,0.5,0.375,0.125,0.25,0.25,0.25,0.5,0.25,0.125,0.25,0.125];
var d5 = [0.125,0.25,0.125,0.25,0.5,0.25,0.25,0.25,0.125,0.375,0.5,0.25,0.25,0.25,0.75,0.25,0.25,0.75,0.25,0.25,0.25,0.5,0.75,0.75];
var d6 = [0.5,0.5,0.5,0.25,0.25,0.5,0.25,0.25,0.375,0.125,0.25,0.25,0.5,0.25,0.25,0.125,0.125,0.125,0.125,0.25,0.25,0.5,0.5,1];
var d7 = [1,0.5,0.5,0.5,0.25,0.25,0.5,0.25,0.25,0.375,0.125,0.25,0.25,0.5,0.25,0.25,0.125,0.125,0.125,0.125,0.25,0.25,0.5,0.5];
var d8 = [0.125,0.5,0.25,0.25,0.125,0.25,0.5,0.75,0.5,0.125,0.125,0.375,0.125,0.875,0.375,0.25,0.125,0.125,0.5,0.75,0.5,0.5,0.25,0.25];
var d9 = [0.5,0.5,0.25,0.25,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,1,0.125,0.125,0.25,0.25,0.25,0.5,0.5];
var d10 = [0.5,0.5,1,1,0.5,1.5,0.5,0.25,0.25,0.25,0.25,0.5,0.5,0.5,0.5,0.5,0.5,1.5,0.5,0.25,0.25,0.25,0.25,1.5];
var d11 = [0.75,0.5,0.75,0.75,0.5,0.75,0.25,0.125,0.25,0.125,0.25,0.25,0.25,0.5,0.5,0.5,0.125,0.25,0.25,0.25,0.125,0.25,0.25,0.75];
var d12 = [0.125,0.125,0.125,0.125,1,0.25,0.25,1,0.5,1,0.75,0.25,0.5,0.5,0.5,1,1,0.75,1,0.125,0.125,0.25,0.5,0.75];
var duration = [{d1},{d2},{d3},{d4},{d5},{d6},{d7},{d8},{d9},{d10},{d11},{d12}];// Duration row titles

var transp = [Pn(0,20),Pn(1,25),Pn(2,10),Pn(3,15),Pn(4,15),Pn(5,20),Pn(6,10),Pn(7,20),Pn(8,10),Pn(9,10),Pn(10,5),Pn(11,15)]; //Transposition row

var durMulti = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //Duration multiplier row


/*control data*/

var listLength = [1,2,3,4,5,6,7,8,9,10,11]; //list of choices for set length

var rowList = [0,1,2,3,4,5,6,7,8,9,10,11];//bank to choose set starting points

/*functioning code*/

runs.do {

var length = listLength.choose; // sets length to reuse

var startingP = rowList.choose; // sets Pitch starting point to reuse

var startingD = rowList.choose; // sets Duration starting point to reuse

var durMult = durMulti.choose;//duration multiplier

var durSet=duration.choose.value; //decide duration row

var range=startingD+(length-1); //find duration string length

var short=durSet.copyRange(startingD,range); //trim duration string to length

var looptime=(short.sum)*durMult; //duration time for loop

\midinote, Pser((pitch.choose.value), length, startingP),
, transp.choose,
, Pser(durSet*durMult, length, startingD)