mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-04 22:25:47 -04:00
dmxgus: Tweak similarity groups for main instruments.
The main instrument groupings were already pretty good but there was some room for improvement. The generated configuration sounds pretty good now, even when using the 256KB config.
This commit is contained in:
parent
75cedb7193
commit
acdf59e1f0
3 changed files with 55 additions and 34 deletions
|
@ -97,6 +97,15 @@ def patchset_size(mapping):
|
|||
result += config.PATCH_FILE_SIZES[name]
|
||||
return result
|
||||
|
||||
def patchset_to_string(mapping):
|
||||
result = []
|
||||
for i1, i2 in mapping.items():
|
||||
if i1 == i2:
|
||||
name = config.GUS_INSTR_PATCHES[i1]
|
||||
result.append("%s (%i bytes)" % (
|
||||
name, config.PATCH_FILE_SIZES[name]))
|
||||
return "\n".join(result)
|
||||
|
||||
def mapping_for_size(size):
|
||||
"""Select a set of patches for the given RAM size.
|
||||
|
||||
|
@ -131,8 +140,8 @@ def mapping_for_size(size):
|
|||
# patches that will fit.
|
||||
curr_size = patchset_size(result)
|
||||
assert curr_size < size, \
|
||||
"Minimal config for %s will not fit in RAM! (%i)" % \
|
||||
(size, curr_size)
|
||||
"Minimal config for %s will not fit in RAM! (%i):\n%s" % \
|
||||
(size, curr_size, patchset_to_string(result))
|
||||
|
||||
for patch in patches:
|
||||
patch_index = midi_instr_for_name(patch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue