Closed vivaria closed 1 year ago
Does
OFFSET
really correspond to the second measure'sfumenOffset
?
ANS: No. Very much no.
sometimes an ESE song will be off by anywhere between 0-25ms.
While it was difficult to pinpoint before due to the small desync times, I've found a song that is now way off: SUPERNOVA.
tja2bin.exe
converts it flawlessly, with Ura fumenOffset values -1003, -720, 1544 for the first three measurestja2fumen.exe
instead generates Ura fumenOffset values of -154, 129.0, 2393 (note the assumption here that OFFSET == second measure)The measure durations (i.e. the time between each fumenOffset) are identical. It's just the offset as a whole that's way off. So, my assumptions around OFFSET
are definitely off.
Here is the relevant part of the Ura chart:
#BARLINEOFF
#MEASURE 1/4
580000,
#BARLINEON
#MEASURE 4/4
40040040,
,
My hunch is that it has to do with the #MEASURE
commands, as butou5.tja
was off a little too before I corrected the .tja
file, and its first measures include #MEASURE
commands as well.
Maybe OFFSET
corresponds to the fumenOffset value of the first full (4/4) measure. But, since the second measure of the chart occurs only after 1/4 of a measure has passed, then the offset values are way off..
Maybe
OFFSET
corresponds to the fumenOffset value of the first full (4/4) measure. But, since the second measure of the chart occurs only after 1/4 of a measure has passed, then the offset values are way off..
This is exactly it.
If I subtract by an extra 3/4 of a measure (i.e. 3/4 * 1132), then I get the "correct" fumenOffset values (-1003, -720, 1544).
So, in other words:
# Formula
fumenOffset[2] = OFFSET - (measureDuration * (1 - time_sig[1]))
# In practice:
fumenOffset[2] = 129 - (1132 * (1 - 1/4))
fumenOffset[2] = 129 - 849
fumenOffset[2] = -720
And, because most of the time time_sig[1]
is 4/4, then there's no adjustment to the OFFSET
value.
Right now, my converter assumes that
OFFSET
directly corresponds to the second measure'sfumenOffset
. See:While this holds for the majority of cases, sometimes an ESE song will be off by anywhere between 0-25ms. Normally, I just correct the TJA file so that it matches the official fumen's OFFSET value.
But, what if I should be leaving the TJA offset values as-is? ((There may be some interaction with
#BPMCHANGE
commands that causeOFFSET
to not line up with the second measure'sfumenOffset
.))So, I will need to see how these "wrong OFFSET" songs play on TJAPlayers, and compare that to how they play on TDMX, to make sure that my
fumenOffset
calculations are correct.