forked from GTD-Carthage/Obsidian-Content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmidi_generation.lua
More file actions
50 lines (40 loc) · 983 Bytes
/
Copy pathmidi_generation.lua
File metadata and controls
50 lines (40 loc) · 983 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
MIDI_CONFIG = {}
MIDI_CONFIG.CHOICES =
{
"sane", _("Safe Defaults"),
"classical", _("Classical"),
"doom", _("Doomish"),
"jazz", _("Jazz"),
}
function MIDI_CONFIG.setup(self)
module_param_up(self)
end
function MIDI_CONFIG.all_done()
for _,song in pairs(GAME.RESOURCES.MUSIC_LUMPS) do
gui.prog_step("Generating MIDI...")
gui.generate_midi_track("scripts/midi/" .. PARAM.midi_config_selection .. ".steve.json", song)
end
end
OB_MODULES["midi_generation"] =
{
name = "midi_generation",
label = _("MIDI Generation [Unstable]"),
where = "experimental",
priority = 5,
tooltip = _("Procedurally generate replacement MIDI tracks"),
hooks =
{
setup = MIDI_CONFIG.setup,
all_done = MIDI_CONFIG.all_done
},
options =
{
{
name = "midi_config_selection",
label=_("Generator Config"),
choices=MIDI_CONFIG.CHOICES,
default = "doom",
tooltip = _("Choose which procedural MIDI config to use")
},
},
}