1
0
mirror of synced 2024-11-28 06:50:49 +01:00

readFumen(): Comment out useless offset value

This isn't actually used anywhere, and the calculation is often wrong.
This commit is contained in:
Viv 2023-06-02 16:33:44 -04:00
parent cc885a0270
commit 89011c79db

View File

@ -336,12 +336,12 @@ def readFumen(fumenFile, byteOrder=None, debug=False):
measure = {}
measure["bpm"] = measureStruct[0]
measure["fumenOffset"] = measureStruct[1]
if measureNumber == 0:
measure["offset"] = measure["fumenOffset"] + 240000 / measure["bpm"]
else:
prev = song['measures'][measureNumber - 1]
measure["offset"] = ((prev["offset"] + measure["fumenOffset"] + 240000) /
(measure["bpm"] - prev["fumenOffset"] - 240000 / prev["bpm"]))
# if measureNumber == 0:
# measure["offset"] = measure["fumenOffset"] + 240000 / measure["bpm"]
# else:
# prev = song['measures'][measureNumber - 1]
# measure["offset"] = ((prev["offset"] + measure["fumenOffset"] + 240000) /
# (measure["bpm"] - prev["fumenOffset"] - 240000 / prev["bpm"]))
measure["gogo"] = getBool(measureStruct[2])
measure["hidden"] = getBool(measureStruct[3])
measure["padding1"] = measureStruct[4]