-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path-gr.asymmetric1
executable file
·65 lines (43 loc) · 1.76 KB
/
-gr.asymmetric1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Bol Processor BP3
// Grammar saved as "-gr.asymmetric1". Date: 2024-10-28 07:22:11
-se.asymmetric1
-al.asymmetric1
// An interpretation of the construction of asymmetrical rhythms in Africa
// in reference to Marc Chemillier, "Les Mathématiques naturelles" (Odile Jacob, 2007 p. 127)
// Work in progress. For now, select "BP data file" as output and "Improvize" to see 30 variations, most of which are identical.
// We choose a cycle of 24 beats
gram#1[1] S --> Head U V /Reverse = 0/ /beats = 24/ /K1/
-----
RND
// Choose the number of 'B', i.e. of '2', (which must be odd)
// Here, 'Head' is only used as a dummy variable, as the purpose of the rule is to set flags
gram#2[1] <3> Head --> Head /B = 3/ /A = 3/ _goto(3,0)
gram#2[2] <1> Head --> Head /B = 9/ /A = 1/ _goto(3,0)
-----
RND
// Choose a transformation
// a and b are only used to track the process (as described in the book)
// We use a flag 'K1' instead of a weight because it will be reset in subgrammar #6
gram#3[1] /K1 - 1/ /A > 0/ Head --> Head a /Atrans/ /A - 1/ /K2/ /K3/
gram#3[2] /K1 - 1/ /B > 0/ Head --> Head b /Btrans/ /B - 1/ /K4/
-----
ORD
// 'a' transformation (both rules must be applied)
gram#4[1] /K2 - 1/ /Atrans/ U --> 3 U
gram#4[2] /K3 - 1/ /Atrans - 1/ V --> 3 V
-----
ORD
// 'b' transformation (only one rule is eligible)
gram#5[1] /K4 - 1/ /Btrans - 1/ /Reverse = 1/ U --> 2 U /Reverse = 0/
gram#5[2] /K4 - 1/ /Btrans - 1/ /Reverse = 0/ V --> 2 V /Reverse = 1/
----
// Make a new selection if some transformations haven't been done yet
gram#6[1] /A ≥ 1/ Head --> Head /K1/ _goto(3,0)
gram#6[2] /B ≥ 1/ Head --> Head /K1/ _goto(3,0)
------
// Erase variables
gram#7[1] U -->
gram#7[2] V -->
gram#7[3] Head -->
// a -->
// b -->