diff --git a/scripts/demo_oscilloscope.py b/scripts/demo_oscilloscope.py index ade7409..bbc8909 100644 --- a/scripts/demo_oscilloscope.py +++ b/scripts/demo_oscilloscope.py @@ -116,7 +116,12 @@ def demo_oscilloscope( frames: int = 0, ): """Run oscilloscope demo.""" - print(f"Oscilloscope demo: {waveform} wave at {frequency}Hz") + # Determine if this is LFO range + is_lfo = frequency <= 20.0 and frequency >= 0.1 + freq_type = "LFO" if is_lfo else "Audio" + + print(f"Oscilloscope demo: {waveform} wave") + print(f"Frequency: {frequency}Hz ({freq_type} range)") if frames > 0: print(f"Running for {frames} frames") else: @@ -164,7 +169,17 @@ if __name__ == "__main__": "--frequency", type=float, default=1.0, - help="Oscillator frequency in Hz", + help="Oscillator frequency in Hz (LFO: 0.1-20Hz, Audio: >20Hz)", + ) + parser.add_argument( + "--lfo", + action="store_true", + help="Use LFO frequency (0.5Hz - slow modulation)", + ) + parser.add_argument( + "--fast-lfo", + action="store_true", + help="Use fast LFO frequency (5Hz - rhythmic modulation)", ) parser.add_argument( "--frames", @@ -174,8 +189,16 @@ if __name__ == "__main__": ) args = parser.parse_args() + + # Determine frequency based on mode + frequency = args.frequency + if args.lfo: + frequency = 0.5 # Slow LFO for modulation + elif args.fast_lfo: + frequency = 5.0 # Fast LFO for rhythmic modulation + demo_oscilloscope( waveform=args.waveform, - frequency=args.frequency, + frequency=frequency, frames=args.frames, )