Fix: persist expression_curve qua project save/load; TEST CC7 thay CC11

This commit is contained in:
2026-08-26 16:29:54 +07:00
parent f10f9873e9
commit e54dec4010
5 changed files with 18 additions and 11 deletions
+3 -2
View File
@@ -36,9 +36,10 @@ def test_flat_curve_grid():
[{"start_beat": 0.0, "duration_beats": 1.0, "expression_curve": [{"position_ratio": 0.0, "value": 127}]}],
120, 48000)
assert len(events) == 24000 // 64 + 1
assert events[0] == {"sample": 0, "kind": 2, "a": 11, "b": 127}
from app.core.native_render import EXPRESSION_CC
assert events[0] == {"sample": 0, "kind": 2, "a": EXPRESSION_CC, "b": 127}
assert events[-1]["sample"] == 24000
assert all(e["kind"] == 2 and e["a"] == 11 and e["b"] == 127 for e in events)
assert all(e["kind"] == 2 and e["a"] == EXPRESSION_CC and e["b"] == 127 for e in events)
assert all(events[i]["sample"] < events[i + 1]["sample"] for i in range(len(events) - 1))