1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
-
+
-
+
| #!/usr/bin/env python
import os
import random
import sys
import time
random.seed(time.time())
grammars = {
"u": ["I V I IV u", "e"],
"u": ["I V I IV u", "I IV", "I VII IV" , "e"],
"e": [""],
}
def main():
score = "u u u"
key = "C"
key = "G#"
score = generate_score(score)
score = keyify_score(score, key)
score = generate_csound_score(score)
print "f1 0 256 10 1 0 3 ; sine wave function table"
for line in score:
print line
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
| 70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
-
+
| "C#": "01",
"D": "02",
"D#": "03",
"E": "04",
"F": "05",
"F#": "06",
"G": "07",
"F#": "08",
"G#": "08",
"A": "09",
"A#": "10",
"B": "11",
}
t = 0
csound_score = []
for token in score:
|