-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vocal.ck
50 lines (35 loc) · 888 Bytes
/
Vocal.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
//Vocal Instrument
public class voices
{
Gain master => NRev r => dac;
FMVoices vox[3];
.5 => r.mix;
for ( 0 => int i; i < vox.cap(); i++){
.05 => vox[i].gain;
vox[i] => master;
}
fun float gain (float i){
if (i < 1){
for (0 => int i; i < vox.cap(); i++){
i => vox[i].gain;
}
} else {
<<<"try again">>>;
}
}
fun void off() {
for (0 => int j ; j < vox.cap(); j++){
1 => vox[j].noteOff;
}
}
fun void chords( int i, float on, string prog){
if (prog == "minor"){
Std.mtof(i) => vox[0].freq;
Std.mtof(i+3) => vox[1].freq;
Std.mtof(i+7) => vox[2].freq;
}
for (0 => int j; j< vox.cap(); j++){
on => vox[j].noteOn;
}
}
}