Interactive improvisation with sound-objects

Lady play­ing koto. Public domain, source: Wikimedia

👉 This page will be updat­ed soon as BP3.0 now accepts real-time MIDI input/output.

This gram­mar (name­ly “-gr.koto3″) is an impro­vi­sa­tion mod­el run­ning on the Bol Processor BP2 con­nect­ed to a Roland D-50 syn­the­sis­er. The choice of syn­the­sis­er was cru­cial for a good repro­duc­tion of the sound imi­tat­ing a Japanese koto.

The under­ly­ing mod­el (SUB gram­mar) is a one-dimensional cel­lu­lar automa­ton using sub­sti­tu­tion rules: at each step of the com­pu­ta­tion, a set of ran­dom­ly select­ed rules is applied to the work string. Conversely, in a RND gram­mar, a new rule would be select­ed each time the pre­vi­ous one was applied. For more details, see a pre­sen­ta­tion of “-gr.koto3″ on the Bol Processor ‘BP3’ and its PHP inter­face page.

In sub­gram­mar #2 we see a com­pe­ti­tion between con­struc­tive rules, such as gram#2[8] and gram#2[11] which increase the length of the work string, and destruc­tive rules, such as gram#2[10] and gram#2[15] which decrease its length.

The weight of gram#2[12], ini­tial­ly set to 100, decreas­es by 10 each time it is applied, until the rule is invalidated.

gram#1[1] <100> S --> _vel(127) _volume(40) X X X X Y X X X X Y X X X X
gram#1[2] <K9> X --> a  [Weight is controlled by K9, see Interaction]
gram#1[3] X  --> b
gram#2[1] Y --> Y
gram#2[2] #? ?1 --> #? ?1  [Keep leftmost symbol]
gram#2[3] ?1 #? --> ?1 #?  [Keep rightmost symbol]
gram#2[4] } --> }
gram#2[5] , --> ,
gram#2[6] <5> a --> a
gram#2[7] <30> a b a --> a a
gram#2[8] <100> #({) a b a --> {5,a c b,f f f - f}
gram#2[9] <5> b --> b
gram#2[10] <30> #({) b a b #(}) --> b b
gram#2[11] <100> #({) b a b --> {3,b a b c b a,f a f}
gram#2[12] <100-10> #({) #a b #(}) --> #a c b
gram#2[13] c c c -->  c a c
gram#2[14] c a c --> b a b
gram#2[15] <50> ?1 ?1 ?2 ?3 ?4 ?4 --> ?2 ?3
gram#2[16] <K9> ?1 ?1 ?1 --> ?1
gram#2[17] <K9> ?1 ?1 --> ?1
gram#3[1] <40> Y --> <<f>>
gram#3[2] <50> Y --> <<chik>>
gram#3[3] <1-1> ? #? --> ? Silence _script(MIDI send Continue) #?
gram#3[4] <50> Silence --> - - - - -
gram#3[5] <15> Silence --> - - - -
gram#3[6] <8> Silence --> - - -
gram#3[7] <8> Silence --> - -

Rules in sub­gram­mar #2 are applied until none of them can be a can­di­date. Then the rules in sub­gram­mar #3 are applied, pro­duc­ing the out-time sound-objects «f» (a bass note) and «chick» (a chord).

The sound objects “a”, “b”, “c”, “f”, “chick” are defined in a sound-object pro­to­type file called “-so.koto3″. Some of them have spe­cif­ic prop­er­ties that force a relo­ca­tion to sat­is­fy topo­log­i­cal con­straints. For exam­ple, “a” must main­tain con­ti­nu­ity with the pre­ced­ing object (as shown in the image), which may cause it to be moved into the past.

The time-setting algo­rithm takes into account all the con­straints to cre­ate a piece that may not fit exact­ly into the metro­nom­ic beat pat­tern. Below is an exam­ple of the final piece cre­at­ed using this gram­mar (played 3 times):

A piece gen­er­at­ed by “-gr.koto3” played on a Roland D-50 synthesiser

In this gram­mar, para­me­ter K9 is set to fol­low the posi­tion of a con­troller (e.g. the pitch­bend or a ped­al on the D-50), assign­ing a val­ue from 0 to 100. This val­ue is the weight of the rules gram#1[2], gram#2[16] and gram#2[17]. The high­er the weight, the more “a” and the less “b” in the string; in addi­tion, the final string becomes small­er due to the high­er weight of the destruc­tive rules gram#2[16] and gram#2[17].

During the impro­vi­sa­tion, the work string is played at each step of its trans­for­ma­tion. The end of the trans­for­ma­tion is indi­cat­ed by the «f» and «chick» sound-objects.

Below is an exam­ple of impro­vi­sa­tion played in real time MIDI:

An improviza­tion of “-gr.koto3” pro­duced by BP2.9.8 and played on a Roland D-50 synthesiser

The fol­low­ing video illus­trates the gram­mar at work on BP2.9.8 — unfor­tu­nate­ly with a GeneralMIDI “koto” sound:


Leave a Reply

Your email address will not be published. Required fields are marked *