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 -1
View File
@@ -175,6 +175,8 @@ def bridge_state_preset_b64(channel=None, plugin_path=None) -> str:
return ""
EXPRESSION_CC = 7 # TEST: CC7 thay CC11 de kiem tra VSTi nhan CC (revert 11 khi xong)
def _expression_events(notes, bpm, sample_rate, grid=64):
"""Sinh CC11 events sample-accurate từ expression_curve mỗi note.
@@ -222,7 +224,7 @@ def _expression_events(notes, bpm, sample_rate, grid=64):
events.append({
"sample": start_sample + int(pos),
"kind": 2,
"a": 11,
"a": EXPRESSION_CC,
"b": max(0, min(127, interp(ratio))),
})
pos += max(1, int(grid))