summaryrefslogtreecommitdiff
path: root/tools/spectral_editor/FEATURES.md
blob: 6c36cc27ae4b95fa5b62173587f948fdd7f7da49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Spectral Editor - Feature Roadmap

This document tracks planned enhancements for the spectral editor.

## Priority: High

### A. Curve Translation (Shift+Click+Drag)
**Description**: Shift+click on a control point + mouse-move should displace the whole curve at a time (translate all control points).

**Implementation Notes**:
- Detect shift key state during control point click
- Store initial positions of all control points in the curve
- Apply uniform translation delta to all points during drag
- Maintain curve shape while moving

**Complexity**: Medium
**Estimated Effort**: 2-3 hours

---

### B. Viewport Zoom (Mouse Wheel)
**Description**: Mouse-wheel should allow zooming in/out on the view for fine placement of curves.

**Implementation Notes**:
- Implement zoom scale factor (e.g., 0.5x to 4.0x)
- Center zoom around mouse cursor position
- Update rendering to use scaled coordinates
- Add visual zoom indicator (e.g., "Zoom: 2.0x")
- Consider pan functionality (drag with middle mouse or space+drag)

**Complexity**: High (coordinate transformation, pan interaction)
**Estimated Effort**: 6-8 hours

---

## Priority: Medium

### C. Enhanced Sinusoid Pattern
**Description**: The 'sinusoid' pattern is quite interesting and should have more variations.

**Proposed Variations**:
- **Asymmetric Decay**: Different decay rates above and below the curve center
  - `decay_top` parameter (controls upper harmonics falloff)
  - `decay_bottom` parameter (controls lower harmonics falloff)
- **Temporal Modulation**: Per-frame amplitude/frequency modulation along timeline
  - `amplitude_envelope` (fade in/out over time)
  - `frequency_drift` (vibrato/wobble effect)
  - `phase_offset` (shift pattern over time)
- **Harmonic Series**: Option to generate harmonic overtones
  - `num_harmonics` parameter
  - `harmonic_decay` parameter

**Implementation Notes**:
- Extend `SinusoidProfile` class with additional parameters
- Add UI controls for new parameters (sliders, dropdowns)
- Render preview showing modulation over time

**Complexity**: Medium-High
**Estimated Effort**: 8-12 hours

---

### D. Per-Control-Point Modulation
**Description**: Each control point should be assigned individually controllable volume, decay params, etc. for fine modulation along time.

**Proposed Parameters (per control point)**:
- `volume`: Local amplitude multiplier (0.0 - 2.0)
- `decay`: Local decay rate override
- `width`: Gaussian width override (for profile spreading)
- `phase`: Phase offset for sinusoid patterns
- `color`: Visual indicator for parameter variations

**Implementation Notes**:
- Extend control point data structure with parameter fields
- Add per-point property panel (show on control point selection)
- Render visual hints (color-coded points, size variations)
- Interpolate parameters between control points for smooth transitions

**Complexity**: High (UI/UX design, parameter interpolation)
**Estimated Effort**: 10-15 hours

---

### E. Composable Profiles
**Description**: Profiles should be composable along a curve (e.g., apply Gaussian curve to sinusoid pattern).

**Proposed Syntax**:
```cpp
// Example: Gaussian-modulated sinusoid
CompositeProfile {
  base: SinusoidProfile { frequency: 100.0, decay: 0.5 },
  envelope: GaussianProfile { center: 256, width: 50 }
}
```

**Implementation Notes**:
- Define profile composition operators:
  - `multiply`: Envelope modulation (amplitude × profile)
  - `add`: Additive blending (profile1 + profile2)
  - `max`: Take maximum value at each bin
- Add UI for profile layering (drag-and-drop profile stack)
- Render composite preview with layer visualization

**Complexity**: High (requires profile abstraction refactor)
**Estimated Effort**: 12-16 hours

---

## Priority: Low (Polish)

### F. Improved Parameter Sliders
**Description**: Adjust slider ranges for better usability (Decay, Width, Frequency, etc.).

**Issues to Address**:
- Decay slider: Non-linear scaling (logarithmic?) for finer control at low values
- Frequency slider: Snap to musical notes (optional A440-based grid)
- Width slider: Preview visualization (show affected frequency range)
- General: Add numeric input fields next to sliders for precise values

**Implementation Notes**:
- Implement logarithmic slider interpolation for decay/width
- Add slider tick marks at useful intervals
- Display current value and units (Hz, bins, dB, etc.)
- Add reset-to-default buttons

**Complexity**: Low-Medium
**Estimated Effort**: 3-4 hours

---

## Future Ideas (Backlog)

- **Undo/Redo System**: Track edit history for curve modifications
- **Preset Library**: Save/load common curve patterns (kick drum, snare, bass, etc.)
- **Curve Smoothing**: Apply smoothing filters to jittery control points
- **Copy/Paste**: Duplicate curves or control point selections
- **Multi-Selection**: Select and edit multiple control points simultaneously
- **Grid Snapping**: Snap control points to frequency/time grid
- **Export Options**: Export to different formats (JSON, binary, C++ code)

---

## Total Estimated Effort
- **High Priority**: 8-11 hours
- **Medium Priority**: 30-43 hours
- **Low Priority**: 3-4 hours
- **Grand Total**: 41-58 hours (roughly 1-1.5 weeks of focused work)

---

*Last Updated: February 6, 2026*