diff --git a/tja2fumen/converters.py b/tja2fumen/converters.py index 6569c51..85a1570 100644 --- a/tja2fumen/converters.py +++ b/tja2fumen/converters.py @@ -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, diff --git a/tja2fumen/parsers.py b/tja2fumen/parsers.py index 189a03c..1fb0b91 100644 --- a/tja2fumen/parsers.py +++ b/tja2fumen/parsers.py @@ -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: diff --git a/tja2fumen/writers.py b/tja2fumen/writers.py index 2a105f8..93096f8 100644 --- a/tja2fumen/writers.py +++ b/tja2fumen/writers.py @@ -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']) + noteStruct.append(note['duration']) writeStruct(file, order, format_string="ififHHf", value_list=noteStruct) if note['type'].lower() == "drumroll": file.write(note['drumrollBytes'])