forked from genewildish/Mainline
fix: Bug fixes and improvements
- fix(demo-lfo-effects): Fix math.sin() usage (was angle.__sin__()) - feat(pipeline): Add set_effect_intensity() method for runtime effect control - Allows changing effect intensity during pipeline execution - Returns False if effect not found or intensity out of range - Used by LFO modulation demo The demo-lfo-effects.py script now works correctly with proper math.sin() usage and the new set_effect_intensity() method provides a clean API for runtime effect intensity control.
This commit is contained in:
@@ -14,6 +14,7 @@ Effects modulated:
|
||||
The LFO uses a sine wave to oscillate intensity between 0.0 and 1.0.
|
||||
"""
|
||||
|
||||
import math
|
||||
import sys
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
@@ -64,7 +65,7 @@ class LFOEffectDemo:
|
||||
angle = (
|
||||
(elapsed * effect_cfg.frequency + effect_cfg.phase_offset) * 2 * 3.14159
|
||||
)
|
||||
lfo_value = 0.5 + 0.5 * (angle.__sin__())
|
||||
lfo_value = 0.5 + 0.5 * math.sin(angle)
|
||||
|
||||
# Scale to intensity range
|
||||
intensity = effect_cfg.min_intensity + lfo_value * (
|
||||
|
||||
Reference in New Issue
Block a user