The Plugin Parameters Window provides a floating interface for real-time control of LV2 plugin parameters. It displays all plugin control inputs as sliders with labeled values and reset buttons.
November 7, 2025
- Floating Window: Topmost, tool window that stays above main window
- Auto-sizing: Dynamically sizes based on number of parameters
- Real-time Updates: Parameter values update every 100ms from the audio thread
- Scrollable: Vertical scrollbar for plugins with many parameters
- Per-plugin Instance: Each plugin opens its own parameters window
Each parameter displays:
- Label: Parameter name from LV2 plugin metadata
- Slider: Horizontal slider with 1000-step resolution
- Value Display: Current numeric value (formatted based on type)
- Reset Button: Returns parameter to its default value
- Continuous: Float values with 2 decimal precision
- Integer: Whole numbers with proper rounding
- Toggle: Boolean on/off parameters
- Enumeration: Discrete value selection (planned)
- From Active Plugins Panel: Double-click any plugin in the chain
- Window Opens: Shows all control parameters for that plugin
- Auto-focus: Window automatically comes to front
- Slider Drag: Move slider to adjust value
- Real-time Response: Audio processing updates immediately
- Value Display Updates: Shows current value as you drag
- Reset Button: Click to restore default value
- Stays on Top: Always visible above main window
- Closable: X button hides window (doesn't destroy)
- Resizable: Width is fixed, height adjusts to content
- Scrollable: Scroll through many parameters
MainWindow (parent)
└── ActivePluginsPanel
└── [double-click plugin]
└── PluginParametersWindow (floating)
├── AudioProcessingChain (parameter read/write)
└── ProcessingNode → PluginInstance
- User Double-clicks Plugin → ActivePluginsPanel::OnLButtonDblClk()
- Send Custom Message → WM_USER + 101 with nodeId
- Main Window Handles → MainWindow::ShowPluginParameters()
- Create/Show Window → PluginParametersWindow::SetPlugin()
- Start Update Timer → 100ms refresh cycle
- User Adjusts Slider → OnHScroll() → SetParameter()
- Audio Thread Reads → ProcessingNode::ProcessParameterChanges()
struct ParameterControl {
uint32_t parameterIndex;
HWND labelStatic; // Parameter name
HWND valueStatic; // Current value
HWND slider; // Trackbar control
HWND resetButton; // Reset to default
ParameterInfo info; // LV2 parameter metadata
int yPos; // Layout position
};class PluginParametersWindow {
// Window management
bool Create(HINSTANCE hInstance, HWND parent);
void Show();
void Hide();
// Plugin binding
void SetPlugin(AudioProcessingChain* chain, uint32_t nodeId);
// Parameter control
void RefreshParameters();
void UpdateParameterValue(uint32_t parameterIndex);
private:
std::vector<ParameterControl> controls_;
std::map<HWND, uint32_t> sliderToIndex_;
std::map<HWND, uint32_t> buttonToIndex_;
// ... layout and state
};WINDOW_WIDTH = 400 // Fixed width
WINDOW_MIN_HEIGHT = 200 // Minimum height
WINDOW_MAX_HEIGHT = 600 // Maximum before scrolling
CONTROL_HEIGHT = 60 // Height per parameter
SLIDER_WIDTH = 250 // Slider control width
VALUE_WIDTH = 60 // Value display width
RESET_WIDTH = 50 // Reset button width
SLIDER_RESOLUTION = 1000 // Slider precision
UPDATE_INTERVAL_MS = 100 // Refresh rateThe window handles conversion between:
- Slider Position (0-1000 integer) ↔ Parameter Value (float with min/max)
- Integer Parameters: Rounded to nearest whole number
- Toggle Parameters: Treated as 0.0 or 1.0
- Bounded Values: Clamped to min/max range
include/violet/plugin_parameters_window.h
- Class declaration
- Forward declarations for AudioProcessingChain, PluginInstance
- ParameterControl struct definition
- Layout constants
src/ui/plugin_parameters_window.cpp
- Window creation and management
- Control creation and layout
- Slider event handling
- Parameter value conversion
- Real-time update timer
include/violet/main_window.h: Forward declaration, ShowPluginParameters()src/ui/main_window.cpp: Window creation, message handlingsrc/ui/active_plugins_panel.cpp: Double-click notification
windows.h: Core Windows functionscommctrl.h: Trackbar (slider) controls- Window messages: WM_HSCROLL, WM_VSCROLL, WM_TIMER
AudioProcessingChain: Parameter read/write interfaceProcessingNode: Node-level parameter accessPluginInstance: LV2 plugin wrapper with parameter managementPluginManager: Parameter metadata (ParameterInfo)
<vector>: Control storage<map>: HWND to index mappings<string>: Parameter labels<memory>: Smart pointers<cstdint>: uint32_t for node IDs
Added to meson.build:
violet_sources = [
# ... other sources ...
'src/ui/plugin_parameters_window.cpp',
]ninja -C build- Compiles without errors
- Only unused parameter warnings (cosmetic)
- Integrates seamlessly with existing codebase
- Start Application → Violet launches with main window
- Load Plugin → Double-click plugin in browser
- Open Parameters → Double-click plugin in active panel
- Verify Controls → All parameters appear with sliders
- Adjust Values → Drag sliders, check audio response
- Test Reset → Click reset button, verify default
- Test Scrolling → For plugins with many parameters
- Test Multiple Windows → Open parameters for different plugins
- No Parameters: Plugin with only audio ports (no controls)
- Many Parameters: 20+ parameters requiring scrolling
- Integer Parameters: Ensure no fractional values displayed
- Min/Max Bounds: Sliders respect parameter ranges
- Default Values: Reset button restores correct defaults
- Window Lifecycle: Show/hide/close behavior
- Keyboard Input: Type numeric values directly
- Fine Control: Shift+drag for fine adjustment
- Parameter Groups: Collapsible sections for organized display
- Preset Buttons: Save/load parameter presets
- Custom Controls: Rotary knobs instead of sliders
- Visual Feedback: Meters, graphs for output parameters
- MIDI Learn: Map MIDI controllers to parameters
- Automation: Record/playback parameter automation
- Plugin-specific UI: Support LV2 UI extension for custom interfaces
- Update Rate: 100ms refresh may cause slight lag in display
- No Undo: Parameter changes cannot be undone
- Single Instance: Can't compare parameters between instances
- No Grouping: All parameters in flat list
- Text Entry: Must use slider, can't type values
- CPU Impact: Minimal (~0.1% for update timer)
- Memory Usage: ~1KB per parameter control
- UI Thread: All updates happen on GUI thread
- Thread Safety: Audio thread writes, UI thread reads via timer
The Plugin Parameters Window provides essential real-time control over LV2 plugin parameters with a clean, functional interface. It completes the Phase 4 UI implementation milestone and brings the project to ~75% completion overall.
Next steps involve implementing drag-and-drop plugin loading and theme system support for a more polished user experience.