-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
75 lines (67 loc) · 1.74 KB
/
main.lua
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
-- Euclidean Rhythms tool
renoise.tool():add_menu_entry {
name = "Pattern Editor:Euclidean Rhythms...",
invoke = function()
show_dialog()
end
}
function show_dialog()
local total_length_slider_value = 0x7f
local pulse_length_slider_value = 0x7f
local rhythm_variation_slider_value = 0x7f
local vb = renoise.ViewBuilder()
local dialog_title = "Euclidean Rhythms"
local DEFAULT_MARGIN = renoise.ViewBuilder.DEFAULT_CONTROL_MARGIN
local dialog_content = vb:column {
margin = DEFAULT_MARGIN,
spacing = 5,
vb:text {
text = "Total Length",
font = "bold"
},
vb:slider {
value = total_length_slider_value,
notifier = function(slider_value)
total_length_slider_value = slider_value
end,
min = 0,
max = 0x7f
},
vb:text {
text = "Pulse Length",
font = "bold"
},
vb:slider {
value = pulse_length_slider_value,
notifier = function(slider_value)
pulse_length_slider_value = slider_value
end,
min = 0,
max = 0x7f
},
vb:text {
text = "Pulse Rhythm Variation",
font = "bold"
},
vb:slider {
value = rhythm_variation_slider_value,
notifier = function(slider_value)
rhythm_variation_slider_value = slider_value
end,
min = 0,
max = 0x7f
},
vb:button {
text = "Generate",
width = "50%",
height = "50%",
--notifier = function()
-- dialog:close()
--end,
},
}
local dialog_buttons = {"OK"}
-- print it
renoise.app():show_custom_prompt(
dialog_title, dialog_content, dialog_buttons)
end