This page is for developers of Bol Processor BP3 (read installation). It is not a formal description of algorithms carried by the console’s C code, but rather an illustration of their management of musical processes that may be helpful for checking or extending algorithms.
All examples are contained in the “ctests” folder of the distribution.
Example of tied notes
Let us look as measures #18 to #22 of Listz’s 14th Hungarian Rhapsody imported from a MusicXML file — read Importing MusicXML scores. The printed score of measures #19 to #21 is the following:


Source: ManWithNoName in the MuseScore community
Tied notes are visible on this score. Slurs connecting notes at different pitches are ignored by the Bol Processor. These could be interpreted via the _legato(x) performance control, but setting a suitable value for ‘x’ would require a careful analysis of the context. Ties link the same pitch such as “Ab1″ (A flat in octave 1) at the bottom of the score lines. There are 3 occurrences of tied “Ab1″ in this section, the first one starting at the end of measure #18 and the third one ending in measure #21.
In Bol Processor notation, this fragment yields a sequence of polymetric structures. For the sake of clarity each measure has been set to a separate paragraph:
#18 {_tempo(4/3) {4,{7/4,C4,C5}{1/4,C4,F4,Ab4,C5}{7/4,C4,F4,Ab4,C5}{1/4,Db4,F4,Ab4,Db5},{7/4,G4,Bb4}9/4,{7/4,E2,C3,G3,Bb3}{1/4,F2}{7/4,C3,F3,Ab3}{1/4, Ab1&}}
#19 {_tempo(4/3) {4,{15/4,Db4,F4,Ab4,Db5}1/8{1/8,C4,Gb4,B4,Eb5},{3/4,Ab2}{3,Db3 F3 Ab3 Db4 F4 Ab4 Db5 F5 Ab5 Db6 F6 Ab6}{1/4,- Ab1&}, &Ab1 ---}
#20 {_tempo(13/10) {33/8,{1/4,Db4& Gb4& A4& Eb5&}{7/2,&Db4,&Gb4,&A4,&Eb5}1/4{1/8,Fb4,Ab4,Cb5,Fb5},{3/4,Ab2}{13/4,Eb3 Gb3 A3 C4 G4 Bb4 Eb5 Gb5 A5 Eb6 Gb6 B6 -}{1/8, Ab1&}, &Ab1 25/8}}
#21 {_tempo(13/10) {33/8,{15/4,Fb4,Ab4,C5,Fb5}1/4{1/8,F4,Ab4,Db5,F5},{3/4,Ab2}{13/4,Fb3 Ab3 Cb4 F4 Ab4 C5 F5 Ab5 Cb6 Fb6 Ab6 Cb7 -}{1/8,B1&}, &Ab1 25/8}}
#22 {_tempo(4/3) {4,{7/2,F4,Ab4,Db5,F5}1/2,{3/4,B2}{13/4,F3 Ab3 Db4 F4 Ab4 Db5 F5 Ab5 Db6 F6 Ab6 Db7 -}, &B1 ---}}
The 3 occurrences of tied “Ab1″ and “B1″ are shown in colors. “Ab1&” is the beginning of a tie and “&Ab1″ the end (of the same color). Longer ties would occasionally require sequences such as “Ab1&” + “&Ab1&”+ “&Ab1″.
These ties merge the (symbolic) time intervals of the beginning and ending occurrence. For instance, score “C4& &C4″ could be replaced with “C4 _ ” or equivalently “{2, C4}”. The merging of time intervals takes place in procedure FillPhaseDiagram() of file “FillPhaseDiagram.c”.
While parsing the compact polymetric structure for building the phase table — read Complex ratios in polymetric expressions — the algorithm calls GetSymbolicDuration() (in “SetObjectFeatures.c”) to calculate the symbolic duration of a sound-object or simple note. By default, this is easy to compute. Flag ignoreconcat is set to true if the sound-object or note is not followed with a ‘&’. The duration is set by prodtempo = Prod / tempo.
If ignoreconcat is false, GetSymbolicDuration() looks for the next acceptable occurrence of the note or sound object preceded by a ‘&’. Acceptability implies the following conditions:
- The note or sound-object should be under the same MIDI channel or the same Csound instrument;
- The date of the next occurrence should be greater than the on-setting date.
These conditions are easy to trace in the example. For instance, “A1b&” cannot be paired with “&A1b” because the latter occurs at an earlier date. The next valid occurrence is “&A1b”. The same holds for pairs shown in other colors. Each color indicates a matching pair.
Once the duration has been set, the algorithm calls PutZeros() to fill as many columns as required for setting the total duration of the pair of tied notes — read Complex ratios in polymetric expressions.
In addition, when “&A1b” is parsed later, it should be ignored because the time span of the note has already been set by calling GetSymbolicDuration() and PutZeros() at the time of parsing “A1b&”. Skipping these procedures is ensured by flag foundendconcatenation.
Graphic display
The following is a sound-object graph of measures #20 to #21 on which the borders of intervals in tied notes are marked with dashed lines. The borders of “Ab1& … &AB1″ (red color) are self-explanatory when compared with the musical score displayed above: each occurrence is an instance of “{1/8, Ab1&} &Ab1″.
Symbolic durations can be checked on physical time: since the tempo is 13/10, the first part has a physical duration 1/8 x 10 / 13 = 0.09 second and the second part 10/13 = 0.77 s.

At the end of measure #21 is the beginning of note “B1&” tied to its occurrence “&B1″ in measure #22. The border is marked by a blue dashed line. The piano roll of measures #21-22 displays this binding of “B1″:

Source: ManWithNoName in the MuseScore community
Arpeggios

”{Db, Gb, Bbb, Eb}”
“Bbb” is interpreted as “A”.
Borders marked as green dashed lines belong to polymetric expression {1/4,Db4& Gb4& A4& Eb5&}{7/2,&Db4,&Gb4,&A4,&Eb5}, the interpretation of an arpeggio on the chord at the beginning of measure #20. This interpretation is constructed while importing MusicXML files — read the PHP code in file “_musicxml.php”.
A brief sequence “Db4 Gb4 A4 Eb5″ (duration 1/4 beat) is played before the chord “{Db4, Gb4, A4, Eb5}” whose duration is set to 7/2 beats. Each note in the sequence is tied to its occurrence in the chord.
A sound example of arpeggio may be found on page Importing MusicXML scores.
More tied notes
A clear illustration of the usage of tied notes and undetermined rests is a short musical phrase borrowed from a tutorial by Charles Ames, a pioneering designer of composition algorithms. The phrase is supplied as a musical score but its interpretation requires a careful analysis of the musical structure, yielding the following Bol Processor score:
{{2,-{2,F#3}, _rest {1,F5,A5}}{4,{ 1/2 ‚G#3,E5,G5}{ 7/2 ‚Bb4}}, _rest { 1/4 ‚G#5&,C6,E6,B6&}{2,&G#5,&B6}}
To make things clear we need to look at the score in common music notation, divide it to blocks associated with variables, and ultimately write a grammar “-gr.Ames” for building the structure. Below are details of the analytical process and resulting graphs of sound-objects and piano roll:

In this grammar, undetermined rests have been notated “…”. In its current version, the Bol Processor console no longer recognizes the Unicode symbol for ellipsis “…”. Therefore, it is automatically converted it to “_rest” by the PHP interface.
Undetermined rests are a powerful feature of polymetric expressions used to avoid uneasy calculations. The polymetric expansion algorithm calculates (symbolic) durations producing the least complex expression. Read more on tutorial Polymetric structures.
Tied notes are precisely the ones denoted by links on the musical score. The sound rendering is:
Error tracing
The construction of suitable time intervals for tied notes depends on the completion of pairs — e.g. “A4&” followed by “&A4″ — in the Bol Processor score. Some pairs may remain incomplete for either reason:
- The musical item has been sliced to chunks, using the PLAY safe (instead of PLAY) option to speed up computation, and the two parts belong to separate chunks;
- An error in the imported MusicXML score;
- An error of the algorithm — more and more rarely.

Case (1) is limited by the method for chunking items: each chunk is designed to contain the same number of starting and ending ties. Nonetheless this is not warranted because chunks are limited in size.
Failure to balance ties is indicated below the PLAY safe button (see picture).
Errors are listed in color on the trace of the play process. These may not induce noticeable changes in the performance. Nonetheless, we recommend to submit faulty data to designers.
Below is an example of error in a MusicXML score of Beethoven’s Fugue in B flat major. A tie starts at note “Db5″ (MIDI key #73) in the beginning of measure #573 (part 2) but it ends nowhere:

Read the fragment of the MusicXML score to check this inconsistency. There are more inconsistencies in this score, for instance a slur starting on note “C4″ of measure #646 (part 3) which does not end. This makes it difficult to interpret slurs as legato.