-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3crows_b.lua
More file actions
50 lines (42 loc) · 933 Bytes
/
3crows_b.lua
File metadata and controls
50 lines (42 loc) · 933 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
42
43
44
45
46
47
48
49
50
--- sequins event
-- in1: trigger event
-- in2:
-- out1: cv from sequence
-- out2: ar envelope
-- out3:
-- out4:
s = sequins
my_seq = s{2,4,s{5,9},7,s{9,12},10,s{17,12,14,9},s{17,21,24}}
function init()
input[1]{ mode = 'change'
, threshold = 1.0
, hysteresis = 0.01
, direction = 'rising'
}
end
function new_ar_time()
return math.random(3, 13) / 10
end
function new_level()
return math.random(11, 99) / 10
end
input[1].change = function()
repeats = math.random(4, 10)
play_note()
end
play_note = function()
ar_time = new_ar_time()
level = new_level()
output[1].volts = my_seq() / 12
output[2] (ar(ar_time * .1, ar_time * .9, level, 'logarithmic'))
end
output[2].done = function()
if(repeats > 0)
then
repeats = repeats - 1
print(repeats)
play_note()
else
print("-- done --")
end
end