-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PakettiMainMenuEntries.lua
362 lines (324 loc) · 20.7 KB
/
PakettiMainMenuEntries.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
local vb = renoise.ViewBuilder()
local dialog -- Declare the dialog variable outside the function
local textfield_width = "100%"
local donations = {
{"2012-02-06", "Nate Schmold", 76.51, {"3030.ca", "https://3030.ca"}, {"Ghost Cartridge", "https://ghostcartridge.com"}, {"YouTube", "https://YouTube.com/@3030-tv"}},
{"2024-04-18", "Casiino", 17.98, {"Instagram", "https://www.instagram.com/elcasiino/"}},
{"2024-06-30", "Zoey Samples", 13.43, {"BTD Records", "https://linktr.ee/BTD_Records"}},
{"2024-07-19", "Casiino", 43.87, {"Instagram", "https://www.instagram.com/elcasiino/"}},
{"2024-08-02", "Casiino", 12.40, {"Instagram", "https://www.instagram.com/elcasiino/"}},
{"2024-08-03", "Diigitae", 10.00, {"Bandcamp", "https://diigitae.bandcamp.com/music"}},
{"2024-08-08", "dmt", 20.00},
{"2024-09-06", "Casiino", 8.63, {"Instagram", "https://www.instagram.com/elcasiino/"}},
{"2024-09-19", "Casiino", 12.87, {"Instagram", "https://www.instagram.com/elcasiino/"}},
{"2024-10-25", "grymmjack", 9.11, {"YouTube", "https://youtube.com/grymmjack"}, {"Soundcloud","https://soundcloud.com/grymmjack"},{"GitHub","https://github.com/grymmjack"}},
}
local total_amount = 0
for _, donation in ipairs(donations) do
total_amount = total_amount + donation[3]
end
-- Create dialog content
local dialog_content = vb:column{
margin = 10,
spacing = 5,
vb:text{text = "Thanks for the support / assistance:", style = "strong", font = "bold"},
vb:multiline_textfield{width = textfield_width, height = 40, text = "There's probably tons more, but: dBlue, danoise, cortex, pandabot, ffx, Joule, Avaruus, astu/flo, syflom, Protman, vV, Bantai, taktik, Snowrobot, MXB, Jenoki, Kmaki, aleksip, Unless, martblek and the whole Renoise community."},
vb:text{text = "Ideas provided by:", style = "strong", font = "bold"},
vb:multiline_textfield{width = textfield_width, height = 80, text = "tkna, Nate Schmold, Casiino, Royal Sexton, Bovaflux, Xerxes, ViZiON, Satoi, Kaneel, Subi, MigloJE, Yalk DX, Michael Langer, Christopher Jooste, Zoey Samples, Avaruus, Pieter Koenekoop, Widgetphreak, Bálint Magyar, Mick Rippon, MMD (Mr. Mark Dollin), ne7, renoize-user, Dionysis, untilde, Greystar, Kaidiak, sousândrade, senseiprod, Brandon Hale, dmt, Diigitae, Dávid Halmi (Nagz), tEiS, Floppi J, Aleksi Eeben, fuzzy, Jalex, Mike Pehel, grymmjack, Mister Garbanzo, tdel, Jek, Mezzguru, Run Anymore, gentleclockdivider, Aaron Munson (Ilkae), pr0t0type, Joonas Holmén (JouluPam), Ugly Cry, NPC1, Vulkan and many others."},
vb:text{text = "Who made it possible:", style = "strong", font = "bold"},
vb:multiline_textfield{width = textfield_width, height = 40, text = "Thanks to @lpn (Brothomstates) for suggesting that I could pick up and learn LUA, that it would not be beyond me. Really appreciate your (sometimes misplaced and ahead-of-time) faith in me. And thanks for the inspiration."},
vb:text{text = "Kudos:", style = "strong", font = "bold"},
vb:multiline_textfield{width = textfield_width, height = 60, text = "Massive kudos to martblek for allowing me to take his abandoned ReSpeak tool and make it into Paketti eSpeak Text-to-Speech, Kaidiak for donating ClippyClip device, and also for smdkun for letting me tweak their KeyBind Visualizer code and incorporate it into Paketti further down the line."},
vb:horizontal_aligner{mode = "distribute", vb:text{text = "Talk about Paketti", style = "strong", font = "bold"}},
vb:horizontal_aligner{
mode = "distribute",
vb:button{text = "Paketti GitHub", notifier = function() renoise.app():open_url("https://github.com/esaruoho/org.lackluster.Paketti.xrnx") end},
vb:button{text = "Paketti Discord", notifier = function() renoise.app():open_url("https://discord.gg/Qex7k5j4wG") end},
vb:button{text = "Paketti Renoise Forum Thread", notifier = function() renoise.app():open_url("https://forum.renoise.com/t/new-tool-3-1-pakettir3/35848/88") end},
vb:button{text = "Email", notifier = function() renoise.app():open_url("mailto:esaruoho@icloud.com") end}
},
-- Grouped donation section
vb:column{ width = "100%",
style = "group",
margin = 5,
vb:horizontal_aligner{mode="distribute",
vb:text{text = "Donations:", style = "strong", font = "bold"}},
vb:row{
vb:text{text = "Date", width = 70},
vb:text{text = "Person", width = 100},
vb:text{text = "Amount", width = 50},
vb:text{text = "Links", width = 100}
},
-- Manually create and add each donation row
vb:row{
vb:text{text = donations[0+1][1], width = 70},
vb:text{text = donations[0+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[0+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[0+1][4][1], notifier = function() renoise.app():open_url(donations[0+1][4][2]) end},
vb:button{text = donations[0+1][5][1], notifier = function() renoise.app():open_url(donations[0+1][5][2]) end},
vb:button{text = donations[0+1][6][1], notifier = function() renoise.app():open_url(donations[0+1][6][2]) end}
}
},
vb:row{
vb:text{text = donations[1+1][1], width = 70},
vb:text{text = donations[1+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[1+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[1+1][4][1], notifier = function() renoise.app():open_url(donations[1+1][4][2]) end}
}
},
vb:row{
vb:text{text = donations[2+1][1], width = 70},
vb:text{text = donations[2+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[2+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[2+1][4][1], notifier = function() renoise.app():open_url(donations[2+1][4][2]) end}
}
},
vb:row{
vb:text{text = donations[3+1][1], width = 70},
vb:text{text = donations[3+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[3+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[3+1][4][1], notifier = function() renoise.app():open_url(donations[3+1][4][2]) end}
}
},
vb:row{
vb:text{text = donations[4+1][1], width = 70},
vb:text{text = donations[4+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[4+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[4+1][4][1], notifier = function() renoise.app():open_url(donations[4+1][4][2]) end}
}
},
vb:row{
vb:text{text = donations[5+1][1], width = 70},
vb:text{text = donations[5+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[5+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[5+1][4][1], notifier = function() renoise.app():open_url(donations[5+1][4][2]) end}
}
},
vb:row{
vb:text{text = donations[6+1][1], width = 70},
vb:text{text = donations[6+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[6+1][3]).."€", width = 50, font = "bold"}
},
vb:row{
vb:text{text = donations[7+1][1], width = 70},
vb:text{text = donations[7+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[7+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[7+1][4][1], notifier = function() renoise.app():open_url(donations[7+1][4][2]) end}}
},
vb:row{
vb:text{text = donations[8+1][1], width = 70},
vb:text{text = donations[8+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[8+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[8+1][4][1], notifier = function() renoise.app():open_url(donations[8+1][4][2]) end}}
},
vb:row{
vb:text{text = donations[9+1][1], width = 70},
vb:text{text = donations[9+1][2], width = 100},
vb:text{text = string.format("%.2f", donations[9+1][3]).."€", width = 50, font = "bold"},
vb:horizontal_aligner{mode = "left",
vb:button{text = donations[9+1][4][1], notifier = function() renoise.app():open_url(donations[9+1][4][2]) end},
vb:button{text = donations[9+1][5][1], notifier = function() renoise.app():open_url(donations[9+1][5][2]) end},
vb:button{text = donations[9+1][6][1], notifier = function() renoise.app():open_url(donations[9+1][6][2]) end}}
},
vb:space{height = 5},
vb:horizontal_aligner{mode="distribute",
vb:text{text = "Total: " .. string.format("%.2f", total_amount) .. "€", font = "bold"}}
},
vb:horizontal_aligner{mode="distribute",vb:text{text = "Support Paketti", style = "strong", font = "bold"}},
vb:horizontal_aligner{
mode = "distribute",
vb:button{text = "Purchase Paketti on Gumroad", notifier = function() renoise.app():open_url("https://lackluster.gumroad.com/l/paketti") end},
vb:button{text = "Send a donation via PayPal", notifier = function() renoise.app():open_url("https://www.paypal.com/donate/?hosted_button_id=PHZ9XDQZ46UR8") end},
vb:button{text = "Support via Ko-Fi", notifier = function() renoise.app():open_url("https://ko-fi.com/esaruoho") end},
vb:button{text = "Purchase Music via Bandcamp", notifier = function() renoise.app():open_url("http://lackluster.bandcamp.com/") end},
vb:button{text = "GitHub Sponsors", notifier = function() renoise.app():open_url("https://github.com/sponsors/esaruoho") end},
vb:button{text = "Linktr.ee", notifier = function() renoise.app():open_url("https://linktr.ee/esaruoho") end}
},
vb:space{height = 20},
vb:horizontal_aligner{mode = "distribute",
vb:button{text = "OK", notifier = function() dialog:close() end},
vb:button{text = "Cancel", notifier = function() dialog:close() end}
}
}
local function my_keyhandler_func(dialog, key)
local closer = preferences.pakettiDialogClose.value
if key.modifiers == "" and key.name == closer then
dialog:close()
dialog = nil
return nil
else
return key
end
end
function show_about_dialog()
if dialog and dialog.visible then
dialog:close() -- Close the dialog if it's open
else
dialog = renoise.app():show_custom_dialog("About Paketti / Donations, written by Esa Juhani Ruoho (C) 2009-2024", dialog_content, my_keyhandler_func)
end
end
renoise.tool():add_menu_entry{name = "--Main Menu:Tools:Paketti..:!!About..:About Paketti/Donations...", invoke = function() show_about_dialog() end}
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:!Preferences..:Open Paketti Path",invoke=function() renoise.app():open_path(renoise.tool().bundle_path)end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:Inspect Plugin",invoke=function() inspectPlugin() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:Inspect Device in Slot 2",invoke=function() inspectEffect() end}
renoise.tool():add_menu_entry{name = "--Main Menu:Tools:Paketti..:Pattern Editor..:Random BPM (60-180)",invoke = function()
local bpmList = {80, 100, 115, 123, 128, 132, 135, 138, 160}
local currentBPM = renoise.song().transport.bpm
local newBpmList = {}
for _, bpm in ipairs(bpmList) do
if bpm ~= currentBPM then
table.insert(newBpmList, bpm)
end
end
if #newBpmList > 0 then
local selectedBPM = newBpmList[math.random(#newBpmList)]
renoise.song().transport.bpm = selectedBPM
print("Random BPM set to: " .. selectedBPM) -- Debug output to the console
else
print("No alternative BPM available to switch to.")
end
-- Optional: write the BPM to a file or apply other logic
if renoise.tool().preferences.RandomBPM and renoise.tool().preferences.RandomBPM.value then
write_bpm() -- Ensure this function is defined elsewhere in your tool
print("BPM written to file or handled additionally.")
end
end
}
--renoise.song().transport.bpm=math.random(60,180) end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Pattern Editor..:Write Current BPM&LPB to Master column",invoke=function() write_bpm() end}
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:Pattern Editor..:Effect Column CheatSheet Dialog", invoke=function() CheatSheet() end}
-------- Plugins/Devices
-- Adding menu entries for listing available plugins by type
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Load Devices Dialog", invoke=function()
showDeviceListDialog()
end}
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:List Available VST Plugins",
invoke=function() listByPluginType("VST") end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:List Available AU Plugins",
invoke=function() listByPluginType("AU") end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:List Available VST3 Plugins",
invoke=function() listByPluginType("VST3") end}
-- Adding menu entries for listing available devices (effects) by type
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:List Available VST Effects",
invoke=function() listDevicesByType("VST") end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:List Available AU Effects",
invoke=function() listDevicesByType("AU") end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:List Available VST3 Effects",
invoke=function() listDevicesByType("VST3") end}
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:Dump VST/VST3/AU/Native Effects to Console", invoke=function()
local devices=renoise.song().tracks[renoise.song().selected_track_index].available_devices
for key, value in ipairs (devices) do
print(key, value)
end
end}
renoise.tool():add_menu_entry{name="---Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:Available Routings for Track",invoke=function() showAvailableRoutings() end}
-- Function to create and show the dialog with a text field.
function squigglerdialog()
local vb = renoise.ViewBuilder()
local content = vb:column {
margin = 10,
vb:textfield {
value = "∿",
edit_mode = true
}
}
-- Using a local variable for 'dialog' to limit its scope to this function.
local dialog = renoise.app():show_custom_dialog("Copy the Squiggler to your clipboard", content, my_keyhandler_func)
end
renoise.tool():add_keybinding{name="Global:Paketti:∿ Squiggly Sinewave to Clipboard (macOS)", invoke=function() squigglerdialog() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Plugins/Devices..:Debug..:∿ Squiggly Sinewave to Clipboard", invoke=function() squigglerdialog() end}
----------
local vb = renoise.ViewBuilder()
local dialog_instance = nil
local function create_paketti_dialog()
local dialog_content = vb:column{margin=10,
vb:column{style="group",margin=5,
vb:row{
vb:button{text="About Paketti/Donations...", width=50, notifier=function() show_about_dialog() end},
vb:button{text="Theme Selector", width=120, notifier=function() pakettiThemeSelectorDialogShow() end},
vb:button{text="Gater", width=80, notifier=function()
local max_rows = renoise.song().selected_pattern.number_of_lines
if renoise.song() then
pakettiGaterDialog()
renoise.app().window.active_middle_frame = renoise.ApplicationWindow.MIDDLE_FRAME_PATTERN_EDITOR
end
end},
vb:button{text="Effect Column CheatSheet", width=120, notifier=function() CheatSheet() end},
vb:button{text="Phrase Init Dialog", width=120, notifier=function() pakettiPhraseSettingsDialogShow() end},
vb:button{text="MIDI Populator", width=100, notifier=function() generaMIDISetupShowCustomDialog() end},
vb:button{text="KeyBindings", width=50, notifier=function() showPakettiKeyBindingsDialog() end},
vb:button{text="Midi Mappings", width=50, notifier=function() show_midi_mappings_dialog() end},
vb:button{text="Audio Processing", width=50, notifier=function()
PakettiAudioProcessingToolsDialogShow() end },
-- vb:button{text="Strip Silence", width=50, notifier=function()
-- PakettiStripSilenceShowThresholdDialog() end},
vb:button{text="eSpeak TTS", width=50, notifier=function()
PakettieSpeakToggleDialog() end },
vb:button{text="Coluga", width=50, notifier=function()
PakettiColugaShowDialog() end },
vb:button{text="Output Routings", width=50, notifier=function()
trackOutputRoutingsGUI_create() end },
vb:button{text="Convolver Dialog", width=50, notifier=function()
show_convolver_selection_dialog() end }},
vb:row{
vb:button{text="Oblique Strategies", width=50, notifier=function()
create_oblique_strategies_dialog()
end},
vb:button{text="Native/VST/VST3/AU/LADSPA/DSSI/ Devices", width=50, notifier=function() showDeviceListDialog()
end},
vb:button{text="VST/VST3/AU Plugins", width=50, notifier=function()
showPluginListDialog() end},
vb:button{text="Randomize Plugins/Devices", width=50, notifier=function()
openCombinedRandomizerDialog() end},
vb:button{text="Configure Launch App Selection/Paths", width=50, notifier=function()
show_app_selection_dialog() end},
vb:button{text="Renoise KeyBindings", width=50, notifier=function() showRenoiseKeyBindingsDialog()end},
-- vb:button{text="Move Beginning Silence to End", width=50, notifier=function() PakettiMoveSilenceShowDialog() end},
vb:button{text="Track Renamer", width=50, notifier=function() PakettiTrackRenamerDialog() end},
vb:button{text="Track Dater / Titler", width=50, notifier=function() PakettiTrackDaterTitlerDialog() end}}, vb:row{
vb:button{text="Paketti Preferences", width=50, notifier=function()
show_paketti_preferences() end},
vb:button{text="Squiggler", width=50, notifier=function() squigglerdialog() end},
vb:button{text="Paketti Groovebox 8120", width=50, notifier=function() if dialog and dialog.visible then
dialog:close()
dialog = nil
rows = {}
else PakettiEightSlotsByOneTwentyDialog() end
end}
}}}
return dialog_content
end
local function toggle_paketti_dialog()
if dialog_instance and dialog_instance.visible then
dialog_instance:close()
dialog_instance = nil
else
dialog_instance = renoise.app():show_custom_dialog("Paketti Dialog of Dialogs", create_paketti_dialog(), my_keyhandler_func)
end
end
renoise.tool():add_keybinding{name="Global:Paketti:Toggle Paketti Dialog of Dialogs",invoke=function() toggle_paketti_dialog() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Paketti Dialog of Dialogs...",invoke=function() toggle_paketti_dialog() end}
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:Paketti New Song Dialog...", invoke=function() show_new_song_dialog() end }
renoise.tool():add_menu_entry{name = "Main Menu:Tools:Paketti..:Paketti Track Dater & Titler Dialog...", invoke = function() PakettiTrackDaterTitlerDialog() end}
renoise.tool():add_menu_entry { name = "Main Menu:Tools:Paketti..:Paketti Theme Selector Dialog...", invoke = pakettiThemeSelectorDialogShow }
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Paketti Gater Dialog...",invoke=function()
local max_rows = renoise.song().selected_pattern.number_of_lines
if renoise.song() then
pakettiGaterDialog()
renoise.app().window.active_middle_frame = renoise.ApplicationWindow.MIDDLE_FRAME_PATTERN_EDITOR
end
end}
renoise.tool():add_menu_entry{name="--Main Menu:Tools:Paketti..:Paketti MIDI Populator Dialog...",invoke=function() generaMIDISetupShowCustomDialog() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Track Routings Dialog...",invoke=function() trackOutputRoutingsGUI_create() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Oblique Strategies Dialog...",invoke=function() create_oblique_strategies_dialog() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Paketti Track Renamer Dialog...",invoke=function() PakettiTrackRenamerDialog() end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Paketti eSpeak Text-to-Speech Dialog...",invoke=function()PakettieSpeakToggleDialog()end}
renoise.tool():add_menu_entry{name="Main Menu:Tools:Paketti..:Xperimental/Work in Progress:Audio Processing Tools Dialog...", invoke = function() PakettiAudioProcessingToolsDialogShow() end}