Programming time-patterns

A grammar producing the item shown Fig.27 may be written as follows (see "-gr.tryTimePatterns"):

PATTERNS:
t1= 1/1 t2 = 3/2 t3 = 4/3
t4 = 1/2
---------------------

RND
S --> {10,t1 t2,Part1 Part2}
Part1 --> {t1 t3 t4, do5 re5 mi5 fa5 - la5}
Part2 --> {t3 t1, si5 do6 _ mi6}


Title "PATTERNS:" announces a list of time-pattern definitions . The list terminates with a string of '-' or the end of the grammar file. "PATTERNS:" definitions may also be inserted in the alphabet file. If so, the defined time-patterns will be used with all grammars based on the same alphabet. Patterns defined in the grammar are specific to productions of that grammar.

If you load only data (e.g. "-da.tryTimePatterns") and try to play a selected item, BP2 will first look for time-patterns in the alphabet, then in the grammar file. If "-gr.tryTimePatterns" has not been loaded, the compiler will complain that terminal symbols "t1", "t2", etc. are undefined.

You may use any label for time-patterns, including labels starting with an uppercase character, but then the compiler will not return an error message in case these patterns are undefined, as it will mistakenly take them as variables.

It is very important that time-patterns appear in the leftmost position of polymetric expressions (see detailed explanation §4.10 of reference manual). Here, "t1 t3 t4" and "t3 t1" are the first fields of polymetric expressions, and "t1 t2" is the first field because duration "10" should always be the first field. Suppose for instance that you change the second rule to:

Part1 --> {do5 re5 mi5 fa5 - la5, t1 t3 t4}

This would yield:


Fig.28 An incorrect use of time-patterns t1, t3, t4

in which duration ratios in section "t1 t3 t4" have been mistakenly determined by "do5", "re5",... "la5". In addition, symbolic durations are incorrect because Part1 now counts six units (do5, re5,...) instead of three (t1, t3, t4). Now the symbolic duration of the entire item is now 6 + 2 = 8 instead of 3 + 2 = 5. BP2 therefore plays eight time units in ten beats, so that all on-settings of notes fall off-beat. For this reason most time streaks in Fig.28 are not numbered. This explanation requires a good understanding of polyrhythms in polymetric structures, but playing with the software will be certainly beneficial in acquiring it.

A (musically disastrous) example of time-patterns is found in "-gr.MozartExpression":

TIMEPATTERNS:
t1 = 96/100 t2 = 100/100 t3 = 102/100 t4 = 100/100
t5 = 100/100 t6 = 102/100 t7 = 104/100 t8 = 106/100 t9 = 107/100
t10 = 108/100 t11 = 107/100 t12 = 106/100 t13 = 104/100 t14 = 102/100
t15 = 1/1
-------------------
RND [Select rules randomly]
S --> {96,Tp1,A B}
A --> {12,(=Tp2),A1 A2 A3 A4} A5 A6 A7 A8 {12,(:Tp2),A1 A2 A3 A4} {12,Tp3,A5 A6 A7 A'8}
B --> B1 B2 B3 B4 B5 B6 B7 B8 B1 B2 B3 B4 {12,Tp2,B5 B6 B7 B8}
-------------------
RND [Here we define time-patterns]
<20> Tp1 --> Tp2
<30> Tp1 --> t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15
Tp2 --> t1 t2 t3 t4
Tp2 --> t1 t7
Tp3 --> t2 t1
Tp3 --> t14 t15
-------------------
etc...

We suppose that the entire piece is controlled by a general time-pattern "Tp1" that may be subdivided in either 11 or 4 sections. The value "11" is arbitrarily chosen here to demonstrate that time-pattern sections may not coincide with metric divisions (here the actual symbolic duration is 96 beats). Part A (48 beats) comprises four sub-sections. The first and third subsections are controlled by two identical occurrences of time-pattern "Tp2" that may in turn be expressed as "t1 t2 t3 t4" or "t1 t7". Occurrences are identical because of the use of Bol Processor typical bracketing "(=Tp2)...(:Tp2)". (See reference manual §4.3) This also shows that the same time-pattern "Tp2" may be used at different hierarchical levels. The fourth subsection of A is controlled by "Tp3", and the second subsection is not controlled, so it is played at a regular tempo determined by whichever time-pattern has been used at the higher level. Section B comprises a first subsection lasting 36 beats at regular tempo, and then a second one lasting 12 beats controlled by "Tp2" (which may not be the same occurrence used in A).

Fig.29 shows the beginning of a variation in which overall time-pattern "Tp1" is subdivided in 11 sections "t5 t6..." and "Tp2" is rewritten as "t1 t2 t3 t4". Change of tempo is almost unnoticeable because time ratios are close to 1/1.


Fig.29 Time-patterns in Mozart pieces