Tied notes

This page is for devel­op­ers of Bol Processor BP3 (read instal­la­tion). It is not a for­mal descrip­tion of algo­rithms car­ried by the con­sole’s C code, but rather an illus­tra­tion of their man­age­ment of musi­cal process­es that may be help­ful for check­ing or extend­ing algorithms.

All exam­ples are con­tained in the “ctests” fold­er of the distribution.

Example of tied notes

Let us look as mea­sures #18 to #22 of Listz’s 14th Hungarian Rhapsody import­ed from a MusicXML file — read Importing MusicXML scores. The print­ed score of mea­sures #19 to #21 is the following:

Measures #19 to #21 of Listz’s 14th Hungarian Rhapsody
Source: ManWithNoName in the MuseScore com­mu­ni­ty

Tied notes are vis­i­ble on this score. Slurs con­nect­ing notes at dif­fer­ent pitch­es are ignored by the Bol Processor. These could be inter­pret­ed via the _legato(x) per­for­mance con­trol, but set­ting a suit­able val­ue for ‘x’ would require a care­ful analy­sis of the con­text. Ties link the same pitch such as “Ab1″ (A flat in octave 1) at the bot­tom of the score lines. There are 3 occur­rences of tied “Ab1″ in this sec­tion, the first one start­ing at the end of mea­sure #18 and the third one end­ing in mea­sure #21.

In Bol Processor nota­tion, this frag­ment yields a sequence of poly­met­ric struc­tures. For the sake of clar­i­ty each mea­sure has been set to a sep­a­rate 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 occur­rences of tied “Ab1″ and “B1″ are shown in col­ors. “Ab1&” is the begin­ning of a tie and “&Ab1″ the end (of the same col­or). Longer ties would occa­sion­al­ly require sequences such as “Ab1&” + “&Ab1&”+ “&Ab1″.

These ties merge the (sym­bol­ic) time inter­vals of the begin­ning and end­ing occur­rence. For instance, score “C4& &C4″ could be replaced with “C4 _ ” or equiv­a­lent­ly “{2, C4}”. The merg­ing of time inter­vals takes place in pro­ce­dure FillPhaseDiagram() of file “FillPhaseDiagram.c”.

While pars­ing the com­pact poly­met­ric struc­ture for build­ing the phase table — read Complex ratios in poly­met­ric expres­sions — the algo­rithm calls GetSymbolicDuration() (in “SetObjectFeatures.c”) to cal­cu­late the sym­bol­ic dura­tion of a sound-object or sim­ple note. By default, this is easy to com­pute. Flag ignorecon­cat is set to true if the sound-object or note is not fol­lowed with a ‘&’. The dura­tion is set by prodtem­po = Prod / tem­po.

If ignorecon­cat is false, GetSymbolicDuration() looks for the next accept­able occur­rence of the note or sound object pre­ced­ed by a ‘&’. Acceptability implies the fol­low­ing conditions:

  1. The note or sound-object should be under the same MIDI chan­nel or the same Csound instrument;
  2. The date of the next occur­rence should be greater than the on-setting date.

These con­di­tions are easy to trace in the exam­ple. For instance, “A1b&” can­not be paired with “&A1b” because the lat­ter occurs at an ear­li­er date. The next valid occur­rence is “&A1b”. The same holds for pairs shown in oth­er col­ors. Each col­or indi­cates a match­ing pair.

Once the dura­tion has been set, the algo­rithm calls PutZeros() to fill as many columns as required for set­ting the total dura­tion of the pair of tied notes — read Complex ratios in poly­met­ric expres­sions.

In addi­tion, when “&A1b” is parsed lat­er, it should be ignored because the time span of the note has already been set by call­ing GetSymbolicDuration() and PutZeros() at the time of pars­ing “A1b&”. Skipping these pro­ce­dures is ensured by flag foundend­con­cate­na­tion.

Graphic display

The fol­low­ing is a sound-object graph of mea­sures #20 to #21 on which the bor­ders of inter­vals in tied notes are marked with dashed lines. The bor­ders of “Ab1& … &AB1″ (red col­or) are self-explanatory when com­pared with the musi­cal score dis­played above: each occur­rence is an instance of “{1/8, Ab1&} &Ab1″.

Symbolic dura­tions can be checked on phys­i­cal time: since the tem­po is 13/10, the first part has a phys­i­cal dura­tion 1/8 x 10 / 13 = 0.09 sec­ond and the sec­ond part 10/13 = 0.77 s.

Measures #20-21 of Listz’s 14th Hungarian Rhapsody on a sound-object graph

At the end of mea­sure #21 is the begin­ning of note “B1&” tied to its occur­rence “&B1″ in mea­sure #22. The bor­der is marked by a blue dashed line. The piano roll of mea­sures #21-22 dis­plays this bind­ing of “B1″:

Measures #21-22 of Listz’s 14th Hungarian Rhapsody on a piano roll
Liszt’s 14th Hungarian Rhapsody inter­pret­ed by the Bol Processor on a Pianoteq physical-model syn­the­siz­er
Source: ManWithNoName in the MuseScore community


Arpeggio on chord
{Db, Gb, Bbb, Eb}
Bbb” is inter­pret­ed as “A”.

Borders marked as green dashed lines belong to poly­met­ric expres­sion {1/4,Db4& Gb4& A4& Eb5&}{7/2,&Db4,&Gb4,&A4,&Eb5}, the inter­pre­ta­tion of an arpeg­gio on the chord at the begin­ning of mea­sure #20. This inter­pre­ta­tion is con­struct­ed while import­ing MusicXML files — read the PHP code in file “_musicxml.php”.

A brief sequence “Db4 Gb4 A4 Eb5″ (dura­tion 1/4 beat) is played before the chord “{Db4, Gb4, A4, Eb5}” whose dura­tion is set to 7/2 beats. Each note in the sequence is tied to its occur­rence in the chord.

A sound exam­ple of arpeg­gio may be found on page Importing MusicXML scores.

More tied notes

A clear illus­tra­tion of the usage of tied notes and unde­ter­mined rests is a short musi­cal phrase bor­rowed from a tuto­r­i­al by Charles Ames, a pio­neer­ing design­er of com­po­si­tion algo­rithms. The phrase is sup­plied as a musi­cal score but its inter­pre­ta­tion requires a care­ful analy­sis of the musi­cal struc­ture, yield­ing the fol­low­ing 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 com­mon music nota­tion, divide it to blocks asso­ci­at­ed with vari­ables, and ulti­mate­ly write a gram­mar “-gr.Ames” for build­ing the struc­ture. Below are details of the ana­lyt­i­cal process and result­ing graphs of sound-objects and piano roll:

In this gram­mar, unde­ter­mined rests have been notat­ed “”. In its cur­rent ver­sion, the Bol Processor con­sole does not rec­og­nize Unicode sym­bol “”. Therefore, it is auto­mat­i­cal­ly con­vert­ed it to “_rest” by the PHP interface.

Undetermined rests are a pow­er­ful fea­ture of poly­met­ric expres­sions used to avoid uneasy cal­cu­la­tions. The poly­met­ric expan­sion algo­rithm cal­cu­lates (sym­bol­ic) dura­tions pro­duc­ing the least com­plex expres­sion. Read more on tuto­r­i­al Polymetric struc­tures.

Tied notes are pre­cise­ly the ones denot­ed by links on the musi­cal score. The sound ren­der­ing is:

Rendering of “-gr.Ames” with metronome mm = 60

Error tracing

The con­struc­tion of suit­able time inter­vals for tied notes depends on the com­ple­tion of pairs — e.g. “A4&” fol­lowed by “&A4″ — in the Bol Processor score. Some pairs may remain incom­plete for either reason:

  1. The musi­cal item has been sliced to chunks, using the PLAY safe (instead of PLAY) option to speed up com­pu­ta­tion, and the two parts belong to sep­a­rate chunks;
  2. An error in the import­ed MusicXML score;
  3. An error of the algo­rithm — more and more rarely.
Unbound tie(s) sig­naled in a chunk

Case (1) is lim­it­ed by the method for chunk­ing items: each chunk is designed to con­tain the same num­ber of start­ing and end­ing ties. Nonetheless this is not war­rant­ed because chunks are lim­it­ed in size.

Failure to bal­ance ties is indi­cat­ed below the PLAY safe but­ton (see picture).

Errors are list­ed in col­or on the trace of the play process. These may not induce notice­able changes in the per­for­mance. Nonetheless, we rec­om­mend to sub­mit faulty data to designers.

Below is an exam­ple 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 begin­ning of mea­sure #573 (part 2) but it ends nowhere:

Measures #573 to 575 (part 2) of Beethoven’s Fugue in B flat major, with an unend­ing tie start­ing at “Db5

Read the frag­ment of the MusicXML score to check this incon­sis­ten­cy. There are more incon­sis­ten­cies in this score, for instance a slur start­ing on note “C4″ of mea­sure #646 (part 3) which does not end. This makes it dif­fi­cult to inter­pret slurs as lega­to.

Leave a Reply

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