forked from genewildish/Mainline
Oscillator sensor visualization and data export scripts #46
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Created demo scripts for visualizing and exporting oscillator sensor data:
Scripts Created
scripts/demo_oscillator_simple.py- Visual waveform displayscripts/oscillator_data_export.py- JSON data exportUsage Examples
Visual demo:
Export data:
Features
Related
engine/sensors/oscillator.pyImplementation Details
demo_oscillator_simple.py\033[H\033[J) to clear screen and update displayoscillator_data_export.pyVisual Output Example
JSON Output Example
Commits
f2b4226: feat: Add oscillator sensor visualization and data export scriptsaeac4e6: fix: Remove duplicate argument definitions in demo_oscillator_simple.pyNew Oscilloscope Demo
Added
scripts/demo_oscilloscope.py- A proper oscilloscope-style waveform visualization.How it works:
Key Features:
Visual Output Example:
Usage:
This completes the oscillator visualization tools with a proper oscilloscope display that shows the waveform as it would appear on a real oscilloscope.
Enhanced Oscilloscope with LFO Modulation Chain
Added
scripts/demo_oscilloscope_mod.pywith these improvements:Key Changes
\033[H) instead of full screen clearModulation Chain Features
The
ModulatedOscillatorclass implements frequency modulation:Usage Examples
Visual Output
The display shows:
This creates the classic "LFO modulating LFO" patch commonly used in synthesis.
Pipeline Switching Demo
Added
scripts/demo_oscilloscope_pipeline.pywith automatic pipeline switching every 15 seconds:Pipeline Stages
Text Mode (15 seconds)
Pygame + PIL to ANSI (15 seconds)
Key Features
\033[Hcursor positioningUsage
Visualization Modes
The pipeline demonstrates the concept of switching between rendering backends, which could be expanded into a full scripting language for patching oscillators and effects.
Image Data Source Integration
Added
scripts/demo_image_oscilloscope.pythat uses the ImageDataSource pattern:Implementation
OscilloscopeDataSource class
DataSourceinterfaceRendering Pipeline
8-bit Grayscale with Transparency
Lmode (8-bit grayscale).:-=+*#%@(dark to light)Usage
Pattern
This demonstrates how to:
DataSourcethat generates imagesFuture Improvements
The image data source pattern could be extended to: