š For geeks only!
This page is about the polyĀmetĀric notaĀtion used in the Bol Processor project and, most likeĀly, othĀer softĀware enviĀronĀments. This advanced tool is used to repĀreĀsent the time strucĀture of events, which can be simĀple notes, sound-objects, or more genĀerĀalĀly time-objects that can be instanĀtiĀatĀed as video fragĀments, sequences of robotĀic actions, and so on.
In a polyĀmetĀric strucĀture, rests (or 'silences') are repĀreĀsentĀed by inteĀger ratios (their symĀbolĀic duraĀtion), for examĀple ā6ā for "six beats" or '4 2/3' for "four and two third beats". Small inteĀgers can be replaced with hyphens, for examĀple '---' for '3'.
In some (but not all) polyĀmetĀric strucĀtures, rests with explicĀit duraĀtions can be replaced with undeĀterĀmined rests (notatĀed 'ā¦' or '_rest'), the valĀue of which is calĀcuĀlatĀed by a (deterĀminĀisĀtic) algoĀrithm in the conĀsole (file 'polymetric.c'). This is an imporĀtant feaĀture because it enables the notaĀtion to be simĀpliĀfied withĀout comĀproĀmisĀing the accuĀraĀcy of the time. Take a look at Charles Ames' examĀple, for instance.
A polyĀmetĀric strucĀture conĀtainĀing at least an undeĀterĀmined rest is called 'minĀimised" for this reaĀson. Examples of minĀimised strucĀtures are found on the Polymetric strucĀtures page.
The topĀic of this page is about 'revertĀing' the algoĀrithm that assigns explicĀit duraĀtions to undeĀterĀmined rests in the Bol Processor conĀsole. Geeks will find this algoĀrithm in the 'polymetric.c' file, and they can set the 'trace_und' variĀable to '1' to trace its operation.
Examples of minimisation
All examĀples are found in the "-da.tryMinimise" data file (disĀtribĀuted from the 3.3.6 verĀsion). Click the MINIMISE butĀton to minĀimise all (eliĀgiĀble) polyĀmetĀric expresĀsions on the page.

The first examĀple {2, C4 C4 --} will be minĀimised as {2, C4 C4 ā¦} whereĀas the secĀond examĀple {2, C4 C4 -} is not eliĀgiĀble. The reaĀson is that {2, C4 C4 ā¦} is always instanĀtiĀatĀed as {2, C4 C4 --} (or {2, C4 C4 2}) and there is no minĀimised verĀsion of {2, C4 C4 -}.
The third examĀple {C4 D4 E4, A4 B4 F4 3 G4 A4 B4} is minĀimised as {C4 D4 E4, A4 B4 F4 ⦠G4 A4 B4}. Both verĀsions yield the folĀlowĀing time structure:

For this demo, we use simĀple notes with arbiĀtrary pitchĀes in English notaĀtion, as we are only focusĀing on the time structures.
The next examĀples are not eliĀgiĀble for a minimisation:
{C4 D4 E4, A4 B4 F4 1 G4 A4 B4}
{C4 D4 E4, A4 B4 F4 2 G4 A4 B4}
{C4 D4 E4, A4 B4 F4 4 G4 A4 B4}
It is not easy to guess which duraĀtion of the rest ā 1, 2, 3, 4 beats? ā makes it eliĀgiĀble for being undeĀterĀmined. The corĀrect valĀue can be found by clickĀing the EXPAND butĀton to the right of {C4 D4 E4, A4 B4 F4 ⦠G4 A4 B4}. The first line of the result is the expandĀed polyĀmetĀric expression:
/1 {*1/1 C4 D4 E4,*1/3 A4 B4 F4 - _ _ G4 A4 B4}
The '- _ _ ' sequence is a rest of duraĀtion 3 beats. The symĀbol '-' repĀreĀsents a rest of one beat. This is folĀlowed by two proĀlonĀgaĀtions, '_'.
Note that the "expandĀed polyĀmetĀric expresĀsion" uses absolute temĀpo markĀers, such as '*1/3', to repĀreĀsent the strucĀture, rather than relĀaĀtive markĀers, such as '__tempo(1/3)'. This repĀreĀsenĀtaĀtion can be used for data, as was the case in earĀly verĀsions of the Bol Processor.
Indeed, in this simĀple examĀple, the duraĀtion was visĀiĀble on the graph. However, it becomes increasĀingĀly difĀfiĀcult to meaĀsure when rhythĀmic strucĀtures become more comĀpliĀcatĀed. For examĀple, {A4 F4 G4, ⦠C4 D4 ⦠E4} is expandĀed as:
/1 {*1/1 A4 F4 G4, *3/8 - *3/4 C4 D4 *3/8 - *3/4 E4}

It is not easy to figĀure out that '*3/8 -' is a silence at twice the speed of '*3/4 C4', thereĀfore its (relĀaĀtive) duraĀtion is 1/2 and the strucĀture is equivĀaĀlent to {A4 F4 G4, 1/2 C4 D4 1/2 E4}.
Tracing the minimisation
The algoĀrithm for minĀimisĀing polyĀmetĀric strucĀtures is more comĀpliĀcatĀed to design than the one for assignĀing explicĀit duraĀtions to undeĀterĀmined rests. As per this writĀing, it does not covĀer all casĀes. Updated verĀsions will be impleĀmentĀed in the interĀface file 'data.php'.

If you need to folĀlow the process while lookĀing at the code, open the setĀtings file and enter the item numĀber at the botĀtom of the form. In this examĀple, we have choĀsen to trace the minĀimiĀsaĀtion of item #3.
Don't forĀget to save the setĀtings and save again the Data page. Now, click the MINIMISE butĀton. You will get a trace that looks like this:
š { C4 D4 E4 , A4 B4 F4 3 G4 A4 B4 }
field #0 = 3/1 sounds, 3/1 beats
field #1 = 6/1 sounds, 9/1 beats
[3+0, 3/1 beats] [6+3, 9/1 beats]
ref field = 0, duraĀtion = 3/1 beats
ā” xp = -3, xq = 1, p_tempo = 1, q_tempo = 1, n_gaps = 1,
case 1 field #1 ā> p_beats[ref_field] = 3, q_beats[ref_field] = 1, p_sounds[field] = 6, q_sounds[field] = 1
pmax/qmax = 3/1, lcm = 1, p_sounds[field] = 6, q_sounds[field] = 1
mgap = 2, x = 2, p_therest (before adjust) = 3
p_therest (after adjust) = 3, q_therest = 1
[field #1 -> rest = 3]
{C4 D4 E4 , A4 B4 F4 _rest G4 A4 B4} [3/1 levĀel 0]
(This trace will difĀfer in subĀseĀquent versions.)
.š Work in progress .ā¦. to be continued .ā¦.ā¦
