From e7bc33d27de40c202ad97ef29aeecc0c02a5b5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Clet?= Date: Wed, 10 Sep 2025 20:15:45 +0200 Subject: [PATCH] reset interp state only if valid interp message --- javascript/tc.preset.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/javascript/tc.preset.js b/javascript/tc.preset.js index bf96206..d6fda02 100644 --- a/javascript/tc.preset.js +++ b/javascript/tc.preset.js @@ -793,11 +793,10 @@ function recall() { trg_slot = Math.abs(args[1]); interp = Math.min( 1, Math.max(0, args[2])); } - for (var i = 0; i < filled_slots.length; i++) { - slots[filled_slots[i]].interp = -1; - } if (slots[src_slot].name != null && slots[trg_slot].name != null) { - + for (var i = 0; i < filled_slots.length; i++) { + slots[filled_slots[i]].interp = -1; + } if (ignore_slot_zero == 1 && src_slot == 0) { // Set src_slot as if we were interpolating from the last recalled preset different than 0 // This way we can monitor which preset we come from even if we used preset 0 as intermediary preset