You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Introduced MIDI channel selection in ChannelStrip, allowing users to set output channels (1-16) for MIDI clips.
- Implemented linked MIDI channel clips functionality in EditManager, enabling the creation of multiple linked MIDI clips with display names.
- Enhanced NoteGrid to support multiple MIDI clips, allowing for better management of notes across different channels.
- Added CC lane editor in PianoRoll, providing users with the ability to draw and edit CC events alongside note editing.
- Updated CMakeLists.txt to include new source files related to MIDI channel and CC lane features.
Copy file name to clipboardExpand all lines: IMPLEMENTATION_GUIDE.md
+74-79Lines changed: 74 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,92 +162,86 @@
162
162
163
163
## 3. Automation Envelopes
164
164
165
-
### 3.1 Automation lane UI on timeline **[MUST]**
165
+
### 3.1 ~~Automation lane UI on timeline~~**[MUST]** -- DONE
166
166
167
-
**What:**Add expandable automation lanes below each track in the timeline, showing parameter envelopes that can be edited with point add/move/delete.
167
+
**What:**Expandable automation lanes below each track in the timeline, showing parameter envelopes that can be edited with point add/move/delete, freehand draw, and curve shape editing.
168
168
169
-
**Where to start:**
170
-
-`src/ui/timeline/TimelineView.cpp` -- tracks are laid out vertically at `y = trackIndex * trackHeight_`. Automation lanes go below each track's clip area.
171
-
-`src/ui/timeline/TrackHeaderWidget.cpp` -- add an "Automation" toggle or dropdown to select which parameter to show.
172
-
- Coordinate system: `pixelsPerBeat_` for X, extend Y for the automation lane height.
173
-
174
-
**New files:**
175
-
-`src/ui/timeline/AutomationLaneItem.h` / `.cpp` -- `QGraphicsItem` subclass that draws the envelope line and handles point interaction.
176
-
-`src/ui/timeline/AutomationPoint.h` / `.cpp` -- (optional, can be inline) represents a draggable point.
169
+
**Files created:**
170
+
-`src/ui/timeline/AutomationLaneItem.h/.cpp` -- `QGraphicsItem` that draws the envelope curve (sampled from engine for pixel-perfect accuracy), handles point creation, freehand drawing, and curve segment bending.
171
+
-`src/ui/timeline/AutomationPointItem.h/.cpp` -- Draggable diamond-shaped point handles with snap, shift-constrain, value tooltips, and right-click curve shape presets.
172
+
-`src/ui/timeline/AutomationLaneHeader.h/.cpp` -- Header widget with parameter dropdown (Volume, Pan, all plugin params), bypass toggle, and close button.
173
+
-`src/ui/timeline/EnvelopeUtils.h` -- Shared coordinate/path/hit-test utilities designed for reuse by future CC lane.
177
174
178
-
**Tracktion Engine API:**
179
-
- Each `te::Plugin` has `getAutomatableParameters()` returning `juce::Array<te::AutomatableParameter*>`.
180
-
- Each `te::AutomatableParameter` has a `getCurve()` method returning `te::AutomationCurve&`.
- User can show/hide an automation lane per track.
198
-
- User can add, move, and delete automation points for volume, pan, and plugin parameters.
199
-
- Automation plays back correctly and exports correctly.
200
-
- Points persist after save/reload.
181
+
**Features implemented:**
182
+
- Single automation lane per track with parameter switcher dropdown.
183
+
- Double-click to add points; drag to move with grid snap and shift-constrain.
184
+
- Freehand draw mode with automatic simplification.
185
+
- Ctrl+drag curve segments to bend (ease in/out); right-click presets (Linear, Ease In/Out, Sharp, Step).
186
+
- Discrete/boolean parameter support (step rendering, state snapping).
187
+
- Resizable lane height (50-120px) via drag handle.
188
+
- Curve line with drop shadow; playback position dot that follows the curve.
189
+
- Value labels on lane edges (dB for volume, L/R for pan, % for generic).
190
+
- Keyboard shortcut: `A` to toggle automation lane on selected track.
191
+
- Automation data persists in `.tracktionedit` files automatically.
201
192
202
193
---
203
194
204
-
### 3.2 Automation read/write modes on mixer **[SHOULD]**
205
-
206
-
**What:** Add Read/Write/Off buttons to each channel strip so automation can be recorded by moving faders during playback.
195
+
### 3.2 ~~Automation read/write/touch/latch modes on mixer~~**[SHOULD]** -- DONE
207
196
208
-
**Where to start:**`src/ui/mixer/ChannelStrip.cpp` -- add buttons near the existing mute/solo row.
197
+
**What:**Per-track automation mode button on each channel strip (including master) with four modes: Read, Touch, Latch, Write.
209
198
210
-
**Tracktion Engine API:**
211
-
-`te::AutomatableParameter::setAutomationMode(...)` with modes like `readEnabled`, `writeEnabled`.
212
-
- When write is enabled and transport is playing, moving a parameter value writes to the automation curve.
199
+
**Implementation:**
200
+
-`ChannelStrip.cpp` -- Cycle button (READ → TOUCH → LATCH → WRITE → READ) sets per-track `track->automationMode` and global `AutomationRecordManager` flags.
201
+
- Touch mode: records only while actively moving a control, reverts to reading on release.
202
+
- Latch mode: starts recording on first touch, holds last value until stop.
203
+
- Write mode: records all params from playback start (most destructive).
204
+
- Master channel strip automation supported via `edit->getMasterTrack()->automationMode`.
205
+
- Volume faders, pan knobs, and effect parameter knobs visually follow automation during playback (30fps polling).
206
+
- Scrubbing (moving playhead while stopped) updates controls to show automation value at that position.
207
+
- Controls only tracked in non-WRITE modes to avoid fighting with user input.
208
+
- Pan automation recording fixed: uses `panParam->setParameter()` instead of `pan.setValue()`.
213
209
214
210
---
215
211
216
212
## 4. MIDI CC Lanes and Channel Handling
217
213
218
-
### 4.1 CC lane editor in piano roll **[MUST]**
219
-
220
-
**What:** Add a CC lane panel below the velocity lane in the piano roll, allowing users to draw and edit CC events.
214
+
### 4.1 ~~CC lane editor in piano roll~~**[MUST]** -- DONE
221
215
222
-
**Where to start:**
223
-
-`src/ui/pianoroll/PianoRollEditor.cpp` -- the `VelocityLane` is positioned below `NoteGrid` (line ~136). The CC lane goes in the same layout, below velocity.
224
-
-`src/ui/pianoroll/VelocityLane.cpp` -- use as a structural template for the CC lane widget.
216
+
**What:** Automation-grade CC lane panel below the velocity lane in the piano roll, with full point editing.
225
217
226
-
**New files:**
227
-
-`src/ui/pianoroll/CcLane.h` / `.cpp` -- `QWidget` subclass for drawing/editing CC events.
218
+
**Files created:**
219
+
-`src/ui/pianoroll/CcLane.h/.cpp` -- QWidget with cached point model, diamond-handle painting, step-curve rendering via `EnvelopeUtils`, freehand draw, individual and bulk point editing.
1. Add a CC number selector (combo box) in `PianoRollEditor` toolbar: CC1, CC7, CC10, CC11, CC64, plus "Other..." for arbitrary CC.
238
-
2.`CcLane` widget:
239
-
- X axis: beats (synced with `NoteGrid` scroll and zoom via `pixelsPerBeat`).
240
-
- Y axis: CC value 0-127.
241
-
- Draw mode: click-drag to draw CC values (similar to velocity lane drag).
242
-
- Edit mode: click existing events to select and move.
243
-
3. Connect to undo: pass `edit->getUndoManager()` to all add/remove calls.
244
-
4. On clip change or edit, emit `midiClipModified` so the lane refreshes.
221
+
**Files modified:**
222
+
-`PianoRollEditor.h/.cpp` -- CC number combo box (CC1/7/10/11/64 + arbitrary via "Other..."), CC row layout below velocity, scroll/zoom/clip sync, snap function pass-through.
223
+
-`CMakeLists.txt` -- Added CcLane source files.
245
224
246
-
**Acceptance criteria:**
247
-
- User can select a CC number and see existing CC data drawn as a lane.
248
-
- User can draw new CC values by clicking/dragging.
249
-
- CC data plays back through the MIDI output.
250
-
- CC data persists after save/reload.
225
+
**Features implemented:**
226
+
- CC number selector combo box in toolbar with preset CCs and custom entry.
227
+
- Step-curve rendering with translucent fill using `EnvelopeUtils::buildEnvelopePath(discrete=true)`.
228
+
- Diamond point handles at each CC event (8px normal, 10px hovered), styled like `AutomationPointItem`.
229
+
- Double-click to add a point at any position.
230
+
- Click-drag on empty space for freehand CC drawing with range-overwrite and interval simplification.
231
+
- Alt+drag (or Line tool) for straight-line CC drawing -- linear ramp between start and end points.
232
+
- Freehand/Line draw tool toggle buttons in the CC header panel for users who prefer clicking over modifier keys.
233
+
- Point drag with grid snap and shift-constrain (horizontal or vertical lock).
234
+
- Value tooltip during drag (e.g. "CC1: 87").
235
+
- Ctrl+drag rubber-band multi-select; Shift+click for additive selection toggle.
236
+
- Bulk move: drag any selected point to move entire selection as a group.
237
+
- Delete key removes selected points; right-click context menu for single/multi delete and "Add Point Here".
238
+
- Ctrl+A selects all; Escape clears selection.
239
+
- Horizontal reference lines at 25%/50%/75% with value labels.
240
+
- Collapsible CC lane (collapsed by default) with disclosure arrow; "Vel" label on velocity lane header.
241
+
- Selected CC name displayed in the left header panel alongside the collapse toggle and draw tool buttons.
242
+
- Horizontal separator between velocity lane and CC lane.
243
+
- Undo/redo for all operations via `edit->getUndoManager()`.
244
+
- CC data persists in `.tracktionedit` files automatically (Tracktion ValueTree serialization).
| Project lifecycle | New/open/save/save-as, autosave, crash recovery, unsaved-changes prompt, window title with dirty indicator |~~No autosave, crash/session recovery, or close-with-unsaved-changes prompt~~**DONE**|
11
11
| Transport | Play/stop/record/loop toggle, BPM, time signature in `src/ui/transport/TransportBar.cpp`| No loop in/out range UI, no count-in/pre-roll, no punch in/out |
12
-
| Timeline editing | Drag/resize/split/delete clips and drag-drop import in `src/ui/timeline/TimelineView.cpp` and `ClipItem.cpp`| No automation lanes, no marker lane, no comping/take lanes |
12
+
| Timeline editing | Drag/resize/split/delete clips and drag-drop import in `src/ui/timeline/TimelineView.cpp` and `ClipItem.cpp`; automation lanes with envelope editing in `AutomationLaneItem.cpp`| No marker lane, no comping/take lanes |
13
13
| Audio editing | Trim/fade/normalize/reverse/silence in `src/ui/audioclip/AudioClipEditor.cpp` and `AudioWaveformView.cpp`| No integrated time-stretch workflow for clip warping across timeline |
14
-
| MIDI note editing | Note draw/select/move/resize, quantize, velocity lane in `src/ui/pianoroll/NoteGrid.cpp` and `VelocityLane.cpp`|No CC lanes, no MIDI channel chooser, no pitch-bend/aftertouch editing |
15
-
| Mixer and routing | Channel strip controls + routing graph in `src/ui/mixer/ChannelStrip.cpp` and `src/ui/routing/RoutingView.cpp`|No automation controls surfaced from mixer for writing/reading envelopes |
14
+
| MIDI note editing | Note draw/select/move/resize, quantize, velocity lane in `src/ui/pianoroll/NoteGrid.cpp` and `VelocityLane.cpp`; CC lane editor with point editing in `src/ui/pianoroll/CcLane.cpp`|~~No CC lanes~~, no MIDI channel chooser, no pitch-bend/aftertouch editing |
15
+
| Mixer and routing | Channel strip controls + routing graph in `src/ui/mixer/ChannelStrip.cpp` and `src/ui/routing/RoutingView.cpp`; per-track automation modes (Read/Touch/Latch/Write) with fader/knob visual tracking |~~No automation controls surfaced from mixer for writing/reading envelopes~~**DONE**|
16
16
| Plugins and FX | VST3 scan/cache in `src/engine/PluginScanner.cpp`, effect chain and plugin editor UI in `src/ui/effects/`| No plugin blacklist UI, no custom scan path UI, VST3-only scan |
17
17
| Export/render | Mix export, freeze, bounce in `src/engine/EditManager.cpp`; export dialog in `src/ui/dialogs/ExportDialog.cpp`| Export is WAV-only, no stem/per-track export workflow |
18
18
| Device/performance UX | Audio settings dialog, live status bar, device persistence in `src/engine/AudioEngine.cpp`|~~No audio settings panel; status bar shows static values~~**DONE**|
@@ -24,12 +24,13 @@ This document defines the feature set needed for a completed FreeDaw v1, based o
24
24
25
25
### Must-have before v1 release
26
26
27
-
1.**Automation envelopes (core DAW expectation)**
28
-
- Track automation lanes for volume, pan, mute.
29
-
- Plugin parameter automation lanes.
30
-
- Point add/move/delete and ramp editing on timeline.
0 commit comments