Skip to content

Commit f859531

Browse files
authored
fix(backend/chart/scale): multiply timing bpm rather than division (#19)
1 parent 01e9026 commit f859531

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/app/app/router/aff/chart.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ async def chart_mirror(
8080
async def chart_scale(
8181
notes: a.NoteGroup = Depends(notes_converter), params: ChartScaleParams = Body()
8282
) -> CommonResponse[str]:
83+
original_scale = params.scale
8384
params.scale = 1 / params.scale
8485

8586
def scale_group(notes):
@@ -98,7 +99,7 @@ def scale_group(notes):
9899
scale_group(each)
99100
else:
100101
if isinstance(each, a.Timing):
101-
each.bpm = each.bpm * params.scale
102+
each.bpm = each.bpm * original_scale
102103

103104
if each.time == 0 and isinstance(each, a.Timing):
104105
continue

0 commit comments

Comments
 (0)