1
0
mirror of synced 2024-11-30 23:57:16 +01:00

Rename durationPadding to duration

The two shouldn't have been split apart; we should have had a single name representing duration as a whole, whether or not it's present.
This commit is contained in:
Viv 2023-06-02 16:33:47 -04:00
parent 6345fe5437
commit 555c92a8a5
3 changed files with 3 additions and 6 deletions

View File

@ -4,7 +4,7 @@ from constants import TJA_NOTE_TYPES, unknownHeaderSample
# Filler metadata that the `writeFumen` function expects
default_note = {'type': '', 'pos': 0.0, 'item': 0, 'padding': 0.0,
'scoreInit': 0, 'scoreDiff': 0, 'durationPadding': 0.0}
'scoreInit': 0, 'scoreDiff': 0, 'duration': 0.0}
default_branch = {'length': 0, 'padding': 0, 'speed': 1.0}
default_measure = {
'bpm': 0.0,

View File

@ -434,7 +434,7 @@ def readFumen(fumenFile, byteOrder=None, debug=False):
# Drumroll and balloon duration in ms
note["duration"] = noteStruct[6]
else:
note['durationPadding'] = noteStruct[6]
note['duration'] = noteStruct[6]
# Print debug information about the note
if debug:

View File

@ -53,10 +53,7 @@ def writeFumen(file, song):
else:
noteStruct.extend([note['scoreInit'], note['scoreDiff'] * 4])
# Drumroll or balloon duration
if 'duration' in note.keys():
noteStruct.append(note['duration'])
else:
noteStruct.append(note['durationPadding'])
writeStruct(file, order, format_string="ififHHf", value_list=noteStruct)
if note['type'].lower() == "drumroll":
file.write(note['drumrollBytes'])