A Python application for visualizing and analyzing multiple waveforms in real-time with envelope analysis capabilities.
-
Activate the virtual environment:
# Windows env\Scripts\activate
-
Install dependencies (if not already done):
pip install -r requirements.txt
python main.pyOr with the virtual environment:
env\Scripts\python.exe main.py-
Launch the application - The app starts with one default sine wave (5 Hz, amplitude 5.0)
-
Adjust waveform parameters:
- Use the Frequency slider to change the wave frequency (1-100 Hz)
- Use the Amplitude slider to adjust the wave amplitude (0-10)
- For Square waves, use the Duty Cycle slider (1-100%)
-
Change waveform type:
- Use the Type dropdown to select: Sine, Square, Sawtooth, or Triangle
-
Add more waveforms:
- Click + Add Waveform button (max 5 waveforms)
- Each waveform gets a unique color automatically
-
Manage waveforms:
- Click on a waveform in the list to select and edit it
- Click the ON/OFF button to show/hide a waveform
- Click the X button to remove a waveform (minimum 1 required)
When you have 2 or more enabled waveforms:
- Show Max Envelope - Displays the maximum amplitude at each time point (red dashed line)
- Show Min Envelope - Displays the minimum amplitude at each time point (blue dashed line)
Both envelopes can be enabled simultaneously.
Each waveform has the following adjustable parameters:
- Type - Waveform type (Sine, Square, Sawtooth, Triangle)
- Wave Duration - Adjusts the time window for visualization (0.5-120 seconds)
- Frequency - Wave frequency in Hz (0.1-100 Hz)
- Amplitude - Wave amplitude (0-10)
- Offset - Y-axis offset (0-10)
- Duty Cycle - For Square waves only (1-100%)
- Click Export to CSV
- A native file dialog will open - choose your save location and filename
- Exported data includes:
- All enabled waveforms
- Active envelopes (if enabled)
- Metadata (waveform type, frequency, amplitude, etc.)
- 4 Waveform Types: Sine, Square, Sawtooth, Triangle
- Up to 5 simultaneous waveforms
- Real-time visualization with responsive performance
- Envelope analysis (Max/Min envelopes)
- CSV export with native OS file dialog
- Independent waveform control
- Modern Windows 11 UI with CustomTkinter
- Dark theme matplotlib plotting
waveform_generator/
├── main.py # Application entry point
├── app_state.py # State management
├── waveform_generator.py # Waveform generation functions
├── ui_components.py # UI and callbacks
├── data_export.py # CSV export functionality
├── requirements.txt # Python dependencies
├── CLAUDE.md # Full specification document
└── README.md # This file
- Python 3.11 or higher
- Windows/Linux/macOS
- Minimum resolution: 1000x800 (recommended: 1200x950)
- CustomTkinter >= 5.2.0 - Modern GUI framework
- matplotlib >= 3.8.0 - Plotting library
- NumPy >= 1.24.0 - Numerical computing
- SciPy >= 1.11.0 - Signal processing
- Target frame rate: >30 FPS
- Plot update latency: <100ms
- Memory usage: <200MB
- Startup time: <2 seconds
- Use +/- buttons for fine control of parameters
- Click and drag on the plot to pan
- Scroll to zoom in/out on the plot
Application won't start:
- Ensure Python 3.11+ is installed:
python --version - Verify dependencies are installed:
pip list - Activate virtual environment first
Performance issues:
- Reduce the number of visible waveforms
- Decrease the wave duration
- Disable envelopes if not needed
Export fails:
- Check file path permissions
- Ensure filename doesn't contain invalid characters
- The app will auto-correct the filename and add
.csvif needed
Current version: 1.0
See CLAUDE.md for the complete specification and future roadmap.