-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dashodanger
committed
Jun 26, 2024
1 parent
b8f6453
commit be687b5
Showing
12 changed files
with
165 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
MIDI_CONFIG = {} | ||
|
||
MIDI_CONFIG.CHOICES = | ||
{ | ||
"safe", _("Safe Defaults"), | ||
"all", _("Relaxed (May Sound Weird)") | ||
} | ||
|
||
function MIDI_CONFIG.setup(self) | ||
module_param_up(self) | ||
end | ||
|
||
function MIDI_CONFIG.all_done() | ||
for _,song in pairs(GAME.RESOURCES.MUSIC_LUMPS) do | ||
if gui.generate_midi_track("scripts/midi/" .. PARAM.midi_config_selection .. ".json", "temp/" .. song .. ".mid") == 1 then | ||
if ob_mod_enabled("compress_output") == 1 then | ||
gui.pk3_insert_file("temp/" .. song .. ".mid", "music/" .. song .. ".mid") | ||
else | ||
gui.wad_insert_file("temp/" .. song .. ".mid", song) | ||
end | ||
gui.remove_temp_file(song .. ".mid") | ||
end | ||
end | ||
end | ||
|
||
OB_MODULES["midi_generation"] = | ||
{ | ||
|
||
name = "midi_generation", | ||
|
||
label = _("MIDI Generation"), | ||
|
||
where = "experimental", | ||
engine = "!idtech_0", | ||
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 = "safe", | ||
tooltip = _("Choose which procedural MIDI config to use") | ||
}, | ||
}, | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"parents": ["all.steve.json"], | ||
"min_tempo": 80, | ||
"max_tempo": 160, | ||
"time_signatures": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
void steve_generate(const char *config_file, const char *out_file); | ||
bool steve_generate(const char *config_file, const char *out_file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters