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:
parent
6345fe5437
commit
555c92a8a5
@ -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,
|
||||
|
@ -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:
|
||||
|
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user