From 16d47df92660560587cde46483173b5607c0505c Mon Sep 17 00:00:00 2001 From: Adam Wonak Date: Sun, 29 Jun 2025 22:21:17 -0700 Subject: [PATCH] hack - don't apply cv mod to euclid when editing. --- examples/Gravity/Gravity.ino | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/Gravity/Gravity.ino b/examples/Gravity/Gravity.ino index 21de1ad..8a46749 100644 --- a/examples/Gravity/Gravity.ino +++ b/examples/Gravity/Gravity.ino @@ -62,11 +62,20 @@ void loop() { int cv2 = gravity.cv2.Read(); for (int i = 0; i < Gravity::OUTPUT_COUNT; i++) { + auto& ch = app.channel[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); + if (ch.isCvModActive()) { + // hack -- do not apply mod to euclidean rhythm when editing. + bool editing_euc; + editing_euc |= ch.getCvDestination() == CV_DEST_EUC_STEPS; + editing_euc |= ch.getCvDestination() == CV_DEST_EUC_HITS; + editing_euc &= (app.selected_channel - 1) == i; + editing_euc &= app.editing_param; + if (editing_euc) { + continue; + } + ch.applyCvMod(cv1, cv2); } }