Polymetric structures

Polymetric expres­sions are the basic rep­re­sen­ta­tion mod­el for the tim­ing of musi­cal data in the Bol Processor. The word is a mix­ture of polypho­ny and polyrhythm, the for­mer evok­ing super­im­posed streams of musi­cal events, and the lat­ter a met­ric adjust­ment of their durations.

This page illus­trates the syn­tax of sim­ple expres­sions and their inter­pre­ta­tion by the poly­met­ric expan­sion algo­rithm described in Two algo­rithms for the instan­ti­a­tion of struc­tures of musi­cal objects (Bel 1992). This process can be extreme­ly com­plex, since an entire musi­cal work — e.g. Beethoven’s Fugue in B flat major — is treat­ed by the Bol Processor as a sin­gle poly­met­ric structure.

In this tuto­r­i­al, sim­ple notes (“C4″, “D4″ etc.) are used fol­low­ing the “English” con­ven­tion. All time-setting process­es could be illus­trat­ed using sound-objects or sim­ple notes in oth­er con­ven­tions: “Italian/Spanish/French” or “Indian”.

Symbolic versus physical duration

Music nota­tion sys­tems (for humans) make use of sym­bol­ic rather than phys­i­cal dura­tions. Their units are beats rather than (milli)seconds.

Three quar­ter notes on a score
in west­ern con­ven­tion­al music notation

In west­ern con­ven­tion­al music nota­tion, notes and paus­es are rep­re­sent­ed by spe­cial signs indi­cat­ing their rel­a­tive durations.

For exam­ple, if the time sig­na­ture is 3/4, we will have 3 quar­ter notes (crotch­ets) in a bar (see pic­ture). A half note (min­im) lasts twice as long as a quar­ter note in the same con­text. Other rel­a­tive dura­tions are expressed in the same way.

To get the phys­i­cal dura­tion of a note we need an addi­tion­al piece of infor­ma­tion: the metronome val­ue, for exam­ple “mm = 100″, which means 100 beats (quar­ter notes) per minute.

A metronome val­ue (60 bpm by default ) is declared in the set­tings file of a Grammar or Data page. With this set­ting, note “E4″ on a Bol Processor score rep­re­sents an “E” of the 4th octave played in 1 beat with a phys­i­cal dura­tion of 1 second.

This con­ven­tion extends to arbi­trar­i­ly named sound-objects whose default dura­tions are set by the streams of MIDI events or sequences of Csound instruc­tions from which they are com­posed. The map­ping of sym­bol­ic to phys­i­cal time for the per­for­mance of sound-object struc­tures (with their met­ric and topo­log­i­cal prop­er­ties) is a sophis­ti­cat­ed process per­formed by a time-setting algo­rithm. A prac­ti­cal exam­ple is dis­cussed on the page Interactive impro­vi­sa­tion with sound-objects.

Polymetric expression

Typical forms of poly­met­ric expres­sions are:

  • field 1, field2 or {field 1, field2} indi­cates that field1 and field2 should be super­im­posed and the total sym­bol­ic dura­tion should be adjust­ed to that of field1;
  • field1 • field2 or {field1 • field2} indi­cates that field1 and field2 should be con­sec­u­tive and the sym­bol­ic dura­tion of each field should be adjust­ed to that of field1;
  • {expres­sion} is equiv­a­lent to expres­sion.

Curly braces ‘{‘ and ’}’ are used to cre­ate multi-level expressions.

Periods writ­ten as bul­lets ‘’ in the Data and Grammar win­dows are con­vert­ed to plain peri­ods before being sent to the con­sole, as the con­sole rejects some Unicode characters.

For exam­ple, {C4 D4, E4 F4 G4, E5} pro­duces the fol­low­ing time struc­ture with a metronome set to 60 beats per minute:

Item {C4 D4, E4 F4 G4, E5} on a sound-object graph
The dura­tion is 2 beats, as set by the first field “C4 D4

The use of the first field to set the total dura­tion is high­light­ed by the fol­low­ing exam­ples where the fields appear in a reverse order:

{C4 D4 E4, F4 G4}
Duration of 3 beats
{F4 G4, C4 D4 E4}
Duration of 2 beats

Rests (silences) can be notat­ed with “-” for sin­gle unit rests, or with inte­ger num­bers and ratios. The fol­low­ing shows a sin­gle unit rest and a more com­plex rest of 2.5 beats:

{F4 - G4, C4 D4}
Duration of 3 beats
{F4 2 1/2 G4, C4 D4}
Duration of 4.5 beats
Fields in reverse order: {C4 D4, F4 2 1/2 G4}
Duration of 2 beats

Polymetric struc­tures can be multi-level, for example:

Multi-level poly­met­ric struc­ture:
{C4 D4, {E4 F4 G4, E5} B4}

The same time-setting rules apply to sequences where com­mas are replaced by peri­ods. For example:

Sequence F4 2 1/2 G4 • C4 D4 or {F4 2 1/2 G4 • C4 D4}
Duration is set by that of the first field “F4 2 1/2 G4
= 4.5 beats applied to the sec­ond field

Superpositions and sequences can be com­bined (even in multi-level expres­sions), such as:

{F4 2 1/2 G4 • C4 D4, A4 B4, G4 A4 • F4}
Duration of 9 beats = twice that of “F4 2 1/2 G4

Undetermined rests

Undetermined rests are a pow­er­ful fea­ture of poly­met­ric expres­sions used to avoid incon­ve­nient com­pu­ta­tions. The poly­met­ric expan­sion algo­rithm cal­cu­lates (sym­bol­ic) dura­tions that pro­duce the least com­plex expression.

They may be notat­ed as “” or “_rest” in Data or Grammars.

Since the con­sole does not recog­nise the “” Unicode sym­bol, the PHP inter­face rewrites it as“_rest”.

Let us start with a triv­ial exam­ple. In {C4 D4 E4, … F4 G4}, the unde­ter­mined rest “” is replaced by a sin­gle unit rest:

{C4 D4 E4, … F4 G4}
= {C4 D4 E4, _rest F4 G4}

This solu­tion gives the sim­plest poly­met­ric expres­sion. The same sim­ple case is that of {… C4 D4 E4, F4 G4}:

{… C4 D4 E4, F4 G4}
= {_rest C4 D4 E4, F4 G4}

If a field of the poly­met­ric expres­sion con­tains sev­er­al unde­ter­mined rests, these are assigned equal dura­tions — in such a way that the com­plex­i­ty of the struc­ture remains min­i­mal. For exam­ple, con­sid­er {… C4 D4 … E4, A4 F4 G4}:

{… C4 D4 … E4, A4 F4 G4}
= {_rest C4 D4 _rest E4, A4 F4 G4}

An unde­ter­mined rest may even be assigned dura­tion 0 in case this yields a sim­pler expres­sion. For exam­ple, in {… C4 D4 … E4, F4 G4} dura­tion 0 gives a “three in two” polyrhythm where­as dura­tion 1 would give “five in two”. The cri­te­ri­on for eval­u­at­ing the com­plex­i­ty is to get the low­est com­mon mul­ti­ple (LCM) of the num­ber of units in each field, in fact 6 against 10. Therefore the solu­tion is:

{… C4 D4 … E4, A4 F4 G4}

Each field of a poly­met­ric expres­sion can con­tain unde­ter­mined rests. Consider for exam­ple {… C4 D4 E4, A4 B4 F4 … G4}. Again, assign­ing a dura­tion of zero to each unde­ter­mined rest gives the sim­plest struc­ture, since “four in three” (LCM = 12) is a bet­ter trade-off than “five in four” (LCM = 20).

{… C4 D4 E4, A4 B4 F4 … G4}

A more com­plex struc­ture is assigned to {C4 D4 E4, A4 B4 F4 … G4 A4, C5 … D5} with rests of 1 unit in the sec­ond and third fields. The LCM of 3 and 6 is 6, which is the low­est val­ue pos­si­ble for this structure.

{C4 D4 E4, A4 B4 F4 … G4 A4, C5 … D5}

Note that there is an equiv­a­lent solu­tion in terms of com­plex­i­ty: assign­ing dura­tion 0 to the rest in the third field. If more than one solu­tion is valid, the algo­rithm choos­es the one with the fewest zero-duration rests.

A sim­i­lar case is {C4 D4 E4, A4 B4 F4 … G4 A4, C5 … D5 E5}:

{C4 D4 E4, A4 B4 F4 … G4 A4, C5 … D5 E5}

Here, the first rest has been assigned 1 unit and the sec­ond one 3 units. This gives the LCM of 3 and 6 = 6. Another opti­mal (equiv­a­lent) solu­tion would be to assign 0 to the sec­ond rest, but this was dis­card­ed due to the heuris­tic of avoid­ing zero dura­tion rests.

Replacing com­mas with peri­ods gives the same struc­ture in a sequen­tial form:

C4 D4 E4 • A4 B4 F4 … G4 A4 • C5 … D5 E5
= {C4 D4 E4 • A4 B4 F4 … G4 A4 • C5 … D5 E5}
Duration of the first field “C4 D4 E4″ is applied to the 2nd and 3d ones
which makes a final count of 3 x 3 = 9 beats

Tied notes, tied sound-objects

Sound-objects or sim­ple notes can be con­cate­nat­ed (“tied”). Consider, for example:

C4 D4 C4 E4 C4 F4 E4

and its vari­a­tion with ties notat­ed “&”:

C4& D4 &C4& E4& &C4 F4 &E4

The time inter­val of a tied note/sound-object may cross the lim­its of (tree-shaped) poly­met­ric struc­tures. For example:

{C4 D4}{E4{2,E4,C4,G4}}
{C4& D4}{E4 {2,E4,&C4,G4}}

The chal­lenge of deal­ing with tied events is dis­cussed on the Tied notes page.

Real music is “polymetric”

The rules and heuris­tics asso­ci­at­ed with poly­met­ric expres­sions make sense when deal­ing with real musi­cal items. In par­tic­u­lar, they made it pos­si­ble to import MusicXML scores and inter­pret them as Bol Processor data (read page).

For exam­ple, check out Mozart’s musi­cal dice game, this “Charles Ames” exam­ple and Harm Visser’s demos.

Further reading

Bel, Bernard. Rationalizing musi­cal time: syn­tac­tic and symbolic-numeric approach­es. In Barlow, Clarence (ed.) The Ratio Book. Den Haag: Royal Conservatory - Institute of Sonology. 2001: 86-101.

Bol Processor shares a few fea­tures, with respect to pat­tern rep­re­sen­ta­tion, with the TIDAL Pattern Language for the Live Encoding of Music (Alex McLean & Geraint Wiggins, 2010).

An Indian con­cep­tion of time can be seen most clear­ly in the ven­er­a­ble Bol Processor sys­tem for algo­rith­mic music, cre­at­ed by com­put­er sci­en­tist Bernard Bel from work on notat­ing tabla rhythms and devel­oped over forty years. Drawing from Indian clas­si­cal music, it includes an expres­sive approach to time set­ting that seems unique to the algo­rith­mic music field, in which sound events are orga­nized in terms of inter­re­la­tion­ships before being mapped to phys­i­cal time. Although not a live cod­ing sys­tem itself, it has been heav­i­ly influ­en­tial on the design of the TidalCycles sys­tem, par­tic­u­lar­ly its embed­ded “minino­ta­tion” lan­guage for describ­ing rhythm in the Bol Processor and more gen­er­al­ly its rep­re­sen­ta­tion of music based not on the dura­tion of events (as in staff nota­tion) but on the dura­tion of cycles.

Alan Blackwell, Emma Cocker, Geoff Cox, Thor Magnusson, Alex McLean, Live Coding: A User’s Manual, MIT 2022, page 195.

Leave a Reply

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