-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathendharo_percussion.ck
100 lines (78 loc) · 1.64 KB
/
endharo_percussion.ck
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// comile percussion instruments here
0.12 * 2 => float t_tempo;
SndBuf g => dac;
0.20 => g.gain;
me.dir() + "/wavfiles/gejje.wav" => string gejje;
fun void init_2_count() {
gejje => g.read;
0 => g.pos;
2 * t_tempo::second => now;
gejje => g.read;
0 => g.pos;
2 * t_tempo::second => now;
}
SndBuf t1 => dac;
SndBuf t2 => dac;
SndBuf t3 => dac;
SndBuf t4 => dac;
SndBuf t5 => dac;
string tabla[20];
me.dir() + "/wavfiles/tabla/dha.wav" => tabla[0];
me.dir() + "/wavfiles/tabla/dhin.wav" => tabla[1];
me.dir() + "/wavfiles/tabla/na.wav" => tabla[2];
me.dir() + "/wavfiles/tabla/ka.wav" => tabla[3];
me.dir() + "/wavfiles/tabla/tin.wav" => tabla[4];
fun void play_tabla() {
repeat (20) {
// dhin
tabla[1] => t2.read;
0 => t2.pos;
2 * t_tempo::second => now;
// dha
tabla[0] => t1.read;
0 => t1.pos;
1 * t_tempo::second => now;
// dhin
0 => t2.pos;
2 * t_tempo::second => now;
// dhin
0 => t2.pos;
1 * t_tempo::second => now;
// na
tabla[2] => t3.read;
0 => t3.pos;
1 * t_tempo::second => now;
// ka
tabla[3] => t4.read;
0 => t4.pos;
1 * t_tempo::second => now;
// dhin
tabla[1] => t2.read;
0 => t2.pos;
2 * t_tempo::second => now;
// dha
tabla[0] => t1.read;
0 => t1.pos;
1 * t_tempo::second => now;
// tin
tabla[4] => t5.read;
0 => t5.pos;
2 * t_tempo::second => now;
// tin
0 => t5.pos;
1 * t_tempo::second => now;
// na
tabla[2] => t3.read;
0 => t3.pos;
1 * t_tempo::second => now;
// ka
tabla[3] => t4.read;
0 => t4.pos;
1 * t_tempo::second => now;
}
}
spork ~init_2_count();
spork ~play_tabla();
while(true) {
1::second=>now;
}