Pre-process a chart in-place: initialize BPM timings, synchronize event beat fields, ensure control node arrays are populated, and validate basic numeric fields.
Call this after loading a chart with parseChart() before using any position or iterator functions. It is safe to call multiple times.
parseChart()
Operations performed:
META.RPEVersion
initBpmList
startTimeSec
NaN
startBeat
endBeat
The RPE chart to process (mutated in place).
The same chart reference.
const chart = parseChart(jsonString);preprocess(chart);// Now safe to call getLineState(), getChartStats(), etc. Copy
const chart = parseChart(jsonString);preprocess(chart);// Now safe to call getLineState(), getChartStats(), etc.
Pre-process a chart in-place: initialize BPM timings, synchronize event beat fields, ensure control node arrays are populated, and validate basic numeric fields.
Call this after loading a chart with
parseChart()before using any position or iterator functions. It is safe to call multiple times.Operations performed:
META.RPEVersion.initBpmListto computestartTimeSecfor every BPM entry.NaNfields.startBeat/endBeatfrom their time tuples.