-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharp.ck
More file actions
41 lines (33 loc) · 695 Bytes
/
arp.ck
File metadata and controls
41 lines (33 loc) · 695 Bytes
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
public class MusicTri extends TriOsc
{
SinOsc vibrato => this;
2 => this.sync;
6 => vibrato.freq;
25 => vibrato.gain;
48 => int offset;
fun void note(int noteNum)
{
Std.mtof(noteNum + offset) => this.freq;
}
}
MusicTri osc => dac;
220 => osc.freq;
0.2 => osc.gain;
[0, 3, 7, 11] @=> int notes[];
48 => int offset;
while (true)
{
-1 => osc.vibrato.op;
for (0 => int i; i < notes.cap(); ++i)
{
notes[i] => osc.note;
1::second / 4 => now;
}
1 => osc.vibrato.op;
for (0 => int i; i < notes.cap(); ++i)
{
10 * i => osc.vibrato.freq;
notes[i] => osc.note;
1::second / 4 => now;
}
}