From 151137b9d36fb036a44aa688cf8a4368cebdf5be Mon Sep 17 00:00:00 2001 From: Adam Wonak Date: Sun, 29 Jun 2025 21:12:23 -0700 Subject: [PATCH] only halt applying cv mod to the current selected channel in editing mode. --- examples/Gravity/Gravity.ino | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/Gravity/Gravity.ino b/examples/Gravity/Gravity.ino index 80dc75f..21de1ad 100644 --- a/examples/Gravity/Gravity.ino +++ b/examples/Gravity/Gravity.ino @@ -58,15 +58,15 @@ void loop() { gravity.Process(); // Read CVs and call the update function for each channel. - if (!app.editing_param) { - int cv1 = gravity.cv1.Read(); - int cv2 = gravity.cv2.Read(); - for (int i = 0; i < Gravity::OUTPUT_COUNT; i++) { - // Only apply CV to the channel when the current channel has cv - // mod configured. - if (app.channel[i].isCvModActive()) { - app.channel[i].applyCvMod(cv1, cv2); - } + int cv1 = gravity.cv1.Read(); + int cv2 = gravity.cv2.Read(); + + for (int i = 0; i < Gravity::OUTPUT_COUNT; i++) { + // Only apply CV to the channel when the current channel has cv + // mod configured. + bool editing_current_step = app.editing_param && i == app.selected_channel - 1; + if (app.channel[i].isCvModActive() && !editing_current_step) { + app.channel[i].applyCvMod(cv1, cv2); } }