From 45f9171701b01022852f3f4375846ab99b3993b1 Mon Sep 17 00:00:00 2001 From: gilesb Date: Tue, 20 Jan 2026 09:34:13 +0000 Subject: [PATCH] Remove DEBUG prints from ascii primitive --- effects/ascii_dual_blend.sexp | 12 ++++-------- sexp_effects/primitive_libs/ascii.py | 17 ----------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/effects/ascii_dual_blend.sexp b/effects/ascii_dual_blend.sexp index cd36b5b..3502b45 100644 --- a/effects/ascii_dual_blend.sexp +++ b/effects/ascii_dual_blend.sexp @@ -19,10 +19,6 @@ :desc "Blend opacity (0=video-a only, 1=video-b only)") (blend_mode :type string :default "overlay" :desc "Blend mode: alpha, add, multiply, screen, overlay, difference") - (audio_start :type float :default 60 - :desc "Start time in audio (seconds)") - (duration :type float :default 10 - :desc "Duration (seconds)") ) ;; Registry - effects and analyzers @@ -39,7 +35,7 @@ ;; Stage 1: Analysis (stage :analyze :outputs [energy-data] - (def audio-clip (-> audio (segment :start audio_start :duration duration))) + (def audio-clip (-> audio (segment :start 60 :duration 10))) (def energy-data (-> audio-clip (analyze energy)))) ;; Stage 2: Process both videos @@ -49,10 +45,10 @@ :outputs [blended audio-clip] ;; Get audio clip for final mux - (def audio-clip (-> audio (segment :start audio_start :duration duration))) + (def audio-clip (-> audio (segment :start 60 :duration 10))) ;; Process video A with ASCII effect - (def clip-a (-> video-a (segment :start 0 :duration duration))) + (def clip-a (-> video-a (segment :start 0 :duration 10))) (def ascii-a (-> clip-a (effect ascii_fx_zone :cols cols @@ -70,7 +66,7 @@ (- 1 (get zone "row-norm"))))))))))) ;; Process video B with ASCII effect - (def clip-b (-> video-b (segment :start 0 :duration duration))) + (def clip-b (-> video-b (segment :start 0 :duration 10))) (def ascii-b (-> clip-b (effect ascii_fx_zone :cols cols diff --git a/sexp_effects/primitive_libs/ascii.py b/sexp_effects/primitive_libs/ascii.py index 74a009f..75625ed 100644 --- a/sexp_effects/primitive_libs/ascii.py +++ b/sexp_effects/primitive_libs/ascii.py @@ -261,11 +261,6 @@ def _apply_cell_effect(cell_img, zone, cell_effect, interp, env, extra_params): # Inject loaded effects as callable functions if hasattr(interp, 'effects'): - # Debug: print what effects are available on first cell - if zone.get('row', 0) == 0 and zone.get('col', 0) == 0: - import sys - print(f"DEBUG: Available effects in interp: {list(interp.effects.keys())}", file=sys.stderr) - for effect_name in interp.effects: def make_effect_fn(name): def effect_fn(frame, *args): @@ -294,18 +289,6 @@ def _apply_cell_effect(cell_img, zone, cell_effect, interp, env, extra_params): return effect_fn cell_env.set(effect_name, make_effect_fn(effect_name)) - # Debug: verify bindings - if zone.get('row', 0) == 0 and zone.get('col', 0) == 0: - import sys - print(f"DEBUG: cell_env bindings: {list(cell_env.bindings.keys())}", file=sys.stderr) - print(f"DEBUG: 'rotate' in cell_env.bindings: {'rotate' in cell_env.bindings}", file=sys.stderr) - print(f"DEBUG: cell_env.has('rotate'): {cell_env.has('rotate')}", file=sys.stderr) - # Check Symbol class identity - print(f"DEBUG: cell_effect.body = {cell_effect.body}", file=sys.stderr) - if hasattr(cell_effect, 'body') and isinstance(cell_effect.body, list) and cell_effect.body: - head = cell_effect.body[0] - print(f"DEBUG: head = {head}, type = {type(head)}, module = {type(head).__module__}", file=sys.stderr) - # Bind cell image and zone dict cell_env.set('cell', cell_img) cell_env.set('zone', zone)