diff --git a/ROADMAP.md b/ROADMAP.md index c8be6a314..225d4231d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: pre-alpha** · next: alpha, ~5% and ~110–180 h away (the alpha gate's three failing workflows) -> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-10-27 · **Change:** trivial (plugin editors on Linux/X11; previously trivial: Cancel Zoom Toggle, side panels in dock columns, Auto Pan stereo balance, Alt-click returns a plugin parameter to its default, Clip List Auto Rename, Strip Silence rectangles, Strip Silence Rename, Strip Silence Extract and Separate, Clip Looping dialog, AudioSuite Vari-Fi speed ramps, Auto Pan plugin, Subharmonic plugin, Ring Modulator plugin, Float32 file headroom) · **Target:** Avid Pro Tools Ultimate 2026.4.1 +> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-11-08 · **Change:** trivial (Command-click target priority and cursor, Command-click automation points, plugin editors on Linux/X11, Cancel Zoom Toggle, side panels in dock columns, Auto Pan stereo balance, Alt-click returns a plugin parameter to its default, Clip List Auto Rename, Strip Silence rectangles, Strip Silence Rename, Strip Silence Extract and Separate, Clip Looping dialog, AudioSuite Vari-Fi speed ramps, Auto Pan plugin, Subharmonic plugin, Ring Modulator plugin, Float32 file headroom) · **Target:** Avid Pro Tools Ultimate 2026.4.1 SoundCraft is a clean-room, pure-Rust digital audio workstation that aims at full parity with Avid Pro Tools, and then beyond it: faster, open, scriptable and agent-controllable. This page is @@ -122,6 +122,8 @@ mutated and truncated movies. Field reports from the first public week are track ## Progress log +- **2026-11-08:** Command-click near an existing automation breakpoint keeps that point as the click target with every active tool, and existing fade and clip-gain controls retain their normal priority. Empty automation space shows a crosshair and an insertion hint while Command is held. The active tool's drag gestures stay unchanged. No readiness percentage change. +- **2026-11-05:** Command-click in an automation lane adds a point at the clicked time and value with the current editing tool (#1394), using the existing Pencil mapping. Command-click preserves the existing selection and also works on the fallback volume lanes of Master, Aux and VCA tracks. Plain clicks and clip contents stay unchanged, and one Undo removes the new point. No readiness percentage change. - **2026-10-27 (plugin editors on Linux):** VST3 editors and embedded CLAP editors open in a SoundCraft X11 host window on Linux and the BSDs (XWayland on Wayland desktops), resized on request and closed from its title bar; the host run loop (VST3 `Linux::IRunLoop`, CLAP `timer-support` and `posix-fd-support`) lets X11 editors read their display connection and repaint. Verified with Graillon 3 and Surge XT Effects (JUCE) in both formats (#527). No readiness percentage change. - **2026-10-25:** Alt+Shift+E (`view.zoom_toggle_cancel`) and an Alt-click on the Zoom Toggle button cancel Zoom Toggle and keep the current view: the zoom, the scroll and the track heights stay as they are, and the button is no longer lit. The next Zoom Toggle zooms in from that view and goes back to it. No readiness percentage change. - **2026-10-25:** Tracks and Groups and the Clip List sit in dock columns that run the Edit window's full height at its left and right edges, with the MIDI Editor under the session view between them; Mix docks Tracks and Groups at its left edge. A panel dragged onto a dock group joins it as a tab, stacks above or below it, or makes a new column; one dragged to an empty window edge makes a dock there. A list with no saved place reopens in its dock, and makes the dock again when it is gone. Preferences and window configurations saved with the earlier split-frame layouts load with the new default layouts and keep their other settings. No readiness percentage change. @@ -181,6 +183,8 @@ mutated and truncated movies. Field reports from the first public week are track | Date | Change | Summary | |---|---|---| +| 2026-11-08 | trivial | Command-click breakpoint/control priority and insertion affordance; active-tool drags retained; readiness estimates unchanged | +| 2026-11-05 | trivial | Progress log: Command-click adds an undoable automation point (#1394); readiness estimates unchanged | | 2026-11-05 | trivial | Languages table: Brazilian Portuguese (pt-BR) near complete for fixed UI strings via PR #1346; needs native review. Estimates unchanged | | 2026-10-27 | trivial | VST3 and embedded CLAP editors on Linux/X11 (#527); G-05 estimate down to 10–15 h; readiness estimates unchanged | | 2026-10-25 | trivial | Progress log: Cancel Zoom Toggle; readiness estimates unchanged | diff --git a/crates/ui-egui/src/edit_window/input.rs b/crates/ui-egui/src/edit_window/input.rs index 54d16b703..11beec41d 100644 --- a/crates/ui-egui/src/edit_window/input.rs +++ b/crates/ui-egui/src/edit_window/input.rs @@ -120,6 +120,7 @@ struct LaneCtx<'a> { eff: Tool, fade_corner: Option, selector_press: bool, + command_point: bool, } /// The lane's response, with its clip context menu and the drops it accepts. @@ -160,10 +161,10 @@ fn lane_menu_and_drops(app: &mut SoundApp, ui: &mut Ui, track: &Track, lane: Rec } /// Hit-test the press point against breakpoints, fade handles and clip bodies. -fn hit_test<'a>(inp: &LaneInput<'a>) -> LaneHits<'a> { +fn hit_test<'a>(inp: &LaneInput<'a>, command: bool) -> LaneHits<'a> { let (track, lane, tl, s, tool, origin, at_origin) = (inp.track, inp.lane, inp.tl, inp.s, inp.tool, inp.origin, inp.at_origin); let auto_view = &inp.auto_view; - let point_hit = if matches!(tool, Tool::Smart | Tool::Grabber | Tool::Pencil) { + let point_hit = if command || matches!(tool, Tool::Smart | Tool::Grabber | Tool::Pencil) { shown_automation(track).and_then(|param| breakpoint_at(s, tl, lane, track, ¶m, origin).map(|at| (param, at))) } else { None @@ -337,9 +338,13 @@ fn drag_clip_gain(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui: /// Click handling for the lane: breakpoints, clip selection, spot dialogs, zoom and pencil points. fn lane_click(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui::Response) { - let (track, lane, s, auto_view) = (c.inp.track, c.inp.lane, c.inp.s, &c.inp.auto_view); + let (track, lane, s) = (c.inp.track, c.inp.lane, c.inp.s); let (point_hit, curve_handle, hit) = (&c.hits.point_hit, c.hits.curve_handle, &c.hits.hit); let (mods, p, at, eff, selector_press) = (c.mods, c.p, c.at, c.eff, c.selector_press); + let command_view = if c.command_point { shown_automation(track) } else { None }; + let auto_view = command_view.as_ref().or(c.inp.auto_view.as_ref()); + // Command-click inserts a point like the Pencil without changing the active tool or its drags. + let eff = if c.command_point { Tool::Pencil } else { eff }; if resp.clicked() && let Some((param, at)) = &point_hit { @@ -376,7 +381,7 @@ fn lane_click(app: &mut SoundApp, ui: &mut Ui, c: &LaneCtx<'_>, resp: &egui::Res let _ = app.run(if mods.alt { "view.zoom_out" } else { "view.zoom_in" }, json!({})); } Tool::Pencil => { - if let Some(param) = &auto_view { + if let Some(param) = auto_view { let (lo, hi, _) = param.range(); let (lo, hi) = if matches!(param, AutoParam::Volume | AutoParam::SendLevel(_)) { (-60.0, 12.0) @@ -429,7 +434,9 @@ pub(super) fn lane_interaction(app: &mut SoundApp, ui: &mut Ui, track: &Track, l let at_origin = sample_at(&s, tl, origin.x).max(0); let auto_view = AutoParam::parse(&track.view); let inp = LaneInput { track, lane, tl, s: &s, tool, origin, at_origin, auto_view }; - let hits = hit_test(&inp); + // Command changes a click's target, while a drag retains the active tool's normal hits. + let command_click = mods.command && !resp.drag_started() && !resp.dragged(); + let hits = hit_test(&inp, command_click); let eff = effective_tool(&inp, &hits); if resp.hovered() { let icon = match eff { @@ -457,15 +464,31 @@ pub(super) fn lane_interaction(app: &mut SoundApp, ui: &mut Ui, track: &Track, l if resp.hovered() && gain_icon_at(p).is_some() { ui.ctx().set_cursor_icon(egui::CursorIcon::ResizeVertical); } + // Existing points and clip controls keep their normal hit priority over modifier insertion. + let command_point = mods.command + && shown_automation(track).is_some() + && hits.point_hit.is_none() + && fade_corner.is_none() + && curve_handle.is_none() + && gain_icon_at(p).is_none(); let selector_press = eff == Tool::Selector && fade_corner.is_none() && curve_handle.is_none() && gain_icon_at(origin).is_none(); - if selector_press && resp.is_pointer_button_down_on() && ui.input(|i| i.pointer.primary_pressed()) { + // A Command-click keeps the prior selection; real drags still start their normal selection gesture. + if selector_press + && (!mods.command || shown_automation(track).is_none()) + && resp.is_pointer_button_down_on() + && ui.input(|i| i.pointer.primary_pressed()) + { place_insertion(app, ui, &s, track.id, at, mods.shift); } let gain_drag = if resp.drag_started() { gain_icon_at(origin) } else { None }; - let cx = LaneCtx { inp, hits, mods, p, at, eff, fade_corner, selector_press }; + let cx = LaneCtx { inp, hits, mods, p, at, eff, fade_corner, selector_press, command_point }; start_gesture(app, ui, &cx, &resp, gain_drag); drag_clip_gain(app, ui, &cx, &resp); lane_click(app, ui, &cx, &resp); + if command_point && resp.hovered() && !resp.dragged() { + ui.ctx().set_cursor_icon(egui::CursorIcon::Crosshair); + resp.on_hover_text("Click to add an automation point"); + } } fn place_insertion(app: &mut SoundApp, ui: &Ui, s: &Session, track: TrackId, at: Samples, extend: bool) { diff --git a/crates/ui-egui/src/edit_window/tests.rs b/crates/ui-egui/src/edit_window/tests.rs index f9bf504ed..4a2ac4d1c 100644 --- a/crates/ui-egui/src/edit_window/tests.rs +++ b/crates/ui-egui/src/edit_window/tests.rs @@ -1574,6 +1574,182 @@ fn alt_click_on_a_breakpoint_deletes_it() { } } +/// Modifier clicks insert an undoable point with the existing tools; plain clicks leave the curve alone. +#[test] +fn command_click_adds_an_automation_point_without_changing_clips_and_undoes() { + for tool in ["smart", "grabber", "selector"] { + let (mut h, track, [a, b], clips) = breakpoints_over_a_clip(tool); + let before = volume_points(&h, track); + let s = h.state().engine.session_arc(); + let i = h.state().edit_layout.rows.iter().position(|(id, _)| *id == track.0).unwrap(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, i), timeline(&h)); + let at = pos2((a.x + b.x) * 0.5, lane.center().y); + let sample = sample_at(h.state().engine.session(), timeline(&h), at.x); + + click(&mut h, at); + assert_eq!(volume_points(&h, track), before, "{tool}: a plain click adds no point"); + h.run_steps(30); + fade_shot(&mut h, &format!("automation-command-{tool}-before")); + click_with(&mut h, at, egui::Modifiers::COMMAND); + let points = volume_points(&h, track); + assert_eq!(points.len(), before.len() + 1, "{tool}: {points:?}"); + let point = points.iter().find(|(at, _)| *at == sample).expect("a point at the clicked sample"); + assert!((point.1 + 24.0).abs() < 0.01, "{tool}: the lane midpoint is -24 dB, above the -40 dB curve: {}", point.1); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); + h.run_steps(2); + fade_shot(&mut h, &format!("automation-command-{tool}-after")); + + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(volume_points(&h, track), before, "{tool}: one undo removes only the new point"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: undo leaves clips alone"); + } +} + +/// A modifier click adds a point while retaining an existing clip and range selection, including after undo. +#[test] +fn command_click_preserves_an_existing_edit_selection() { + for tool in ["smart", "selector"] { + let (mut h, track, [a, b], clips) = breakpoints_over_a_clip(tool); + let s = h.state().engine.session_arc(); + let i = h.state().edit_layout.rows.iter().position(|(id, _)| *id == track.0).unwrap(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, i), timeline(&h)); + let at = pos2((a.x + b.x) * 0.5, lane.min.y + lane.height() * 0.35); + h.state_mut().engine.execute("edit.select", &json!({"clips": [clips[0].id.0]})).unwrap(); + h.run_steps(2); + let before = h.state().engine.session().edit.clone(); + let points_before = volume_points(&h, track); + assert!(!before.selection.is_empty()); + assert!(!before.selected_clips.is_empty()); + fade_shot(&mut h, &format!("automation-command-selection-{tool}-before")); + + click_with(&mut h, at, egui::Modifiers::COMMAND); + assert_eq!(volume_points(&h, track).len(), points_before.len() + 1, "{tool}"); + let after = &h.state().engine.session().edit; + assert_eq!(after.selection, before.selection, "{tool}: the range stays"); + assert_eq!(after.selected_clips, before.selected_clips, "{tool}: selected clips stay"); + assert_eq!(after.selected_tracks, before.selected_tracks, "{tool}: selected tracks stay"); + h.run_steps(2); + fade_shot(&mut h, &format!("automation-command-selection-{tool}-after")); + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(volume_points(&h, track), points_before, "{tool}: one undo removes the point"); + assert_eq!(h.state().engine.session().edit.selection, before.selection, "{tool}: undo retains the range"); + assert_eq!(h.state().engine.session().edit.selected_clips, before.selected_clips, "{tool}: undo retains selected clips"); + + h.event(egui::Event::ModifiersChanged(egui::Modifiers::COMMAND)); + drag(&mut h, at, at + vec2(50.0, 0.0)); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::NONE)); + let after_drag = &h.state().engine.session().edit; + assert!(!after_drag.selection.is_empty(), "{tool}: a Command-drag still selects a range"); + assert_ne!(after_drag.selection, before.selection, "{tool}: drag selection changes once the gesture starts"); + assert_eq!(volume_points(&h, track), points_before, "{tool}: dragging adds no point"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); + } +} + +/// Tracks that always paint volume automation also accept modifier clicks when their stored view is not automation. +#[test] +fn command_click_adds_to_fallback_volume_views() { + for kind in [TrackKind::Master, TrackKind::Aux, TrackKind::Vca] { + let mut engine = soundcraft_engine::Engine::default(); + let track = engine.session_mut().add_track(kind, soundcraft_model::ChannelFormat::Stereo, None); + engine.execute("track.view", &json!({"track": track.0, "view": "waveform"})).unwrap(); + engine.execute("edit.tool", &json!({"tool": "smart"})).unwrap(); + let mut h = harness_with(engine); + let s = h.state().engine.session_arc(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, 0), timeline(&h)); + let at = pos2(lane.min.x + 100.0, lane.center().y); + let sample = sample_at(&s, timeline(&h), at.x); + fade_shot(&mut h, &format!("automation-command-fallback-{kind:?}-before")); + click_with(&mut h, at, egui::Modifiers::COMMAND); + let points = volume_points(&h, track); + assert_eq!(points.len(), 1, "{kind:?}: status {}", h.state().ui.status); + assert_eq!(points[0].0, sample, "{kind:?}"); + assert!((points[0].1 + 24.0).abs() < 0.01, "{kind:?}: {}", points[0].1); + h.run_steps(2); + fade_shot(&mut h, &format!("automation-command-fallback-{kind:?}-after")); + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert!(volume_points(&h, track).is_empty(), "{kind:?}: one undo removes the point"); + } +} + +/// Command-click keeps an existing visible breakpoint as the hit target with every active tool. +#[test] +fn command_click_near_an_existing_breakpoint_does_not_insert_another_point() { + for tool in ["smart", "grabber", "pencil", "selector", "trim", "scrubber", "zoom"] { + let (mut h, track, [_, point], clips) = breakpoints_over_a_clip(tool); + h.state_mut().engine.execute("edit.select", &json!({"clips": [clips[0].id.0]})).unwrap(); + h.run_steps(2); + let before = volume_points(&h, track); + let edit = h.state().engine.session().edit.clone(); + assert!(!edit.selection.is_empty()); + assert!(!edit.selected_clips.is_empty()); + // Inside the six-point hit target, but a different sample from the stored point. + let near = point + vec2(3.0, 0.0); + let sample = sample_at(h.state().engine.session(), timeline(&h), near.x); + assert_ne!(sample, before[1].0); + click_with(&mut h, near, egui::Modifiers::COMMAND); + assert_eq!(volume_points(&h, track), before, "{tool}: the existing point wins over insertion"); + let after = &h.state().engine.session().edit; + assert_eq!(after.tool, edit.tool, "{tool}: active tool stays"); + assert_eq!(after.selection, edit.selection, "{tool}: range selection stays"); + assert_eq!(after.selected_clips, edit.selected_clips, "{tool}: clip selection stays"); + assert_eq!(after.selected_tracks, edit.selected_tracks, "{tool}: track selection stays"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "{tool}: clips stay"); + + click_with(&mut h, near, egui::Modifiers::COMMAND | egui::Modifiers::ALT); + assert_eq!(volume_points(&h, track), before[..1], "{tool}: Alt still deletes the existing point"); + h.state_mut().engine.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(volume_points(&h, track), before, "{tool}: deletion remains undoable"); + } +} + +/// Command advertises insertion over empty automation space, while a breakpoint keeps its grab cursor. +#[test] +fn command_hover_shows_insertion_only_away_from_existing_breakpoints() { + let (mut h, track, [a, b], _) = breakpoints_over_a_clip("selector"); + let s = h.state().engine.session_arc(); + let i = h.state().edit_layout.rows.iter().position(|(id, _)| *id == track.0).unwrap(); + let lane = lane_rect(s.track(track).unwrap(), row(&h, i), timeline(&h)); + let at = pos2((a.x + b.x) * 0.5, lane.center().y); + let points = volume_points(&h, track); + + h.hover_at(at); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Text, "plain Selector hover stays unchanged"); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::COMMAND)); + h.hover_at(at); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Crosshair, "Command shows the insertion gesture"); + h.run_steps(40); + fade_shot(&mut h, "automation-command-hover-insertion"); + h.hover_at(b + vec2(3.0, 0.0)); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Grab, "the existing point stays the target"); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::NONE)); + h.hover_at(at); + h.step(); + assert_eq!(h.output().platform_output.cursor_icon, egui::CursorIcon::Text, "releasing Command restores the active tool cursor"); + assert_eq!(volume_points(&h, track), points, "hover adds no points"); +} + +/// The Command click shortcut does not turn a Selector drag beginning beside a point into a point move. +#[test] +fn command_drag_near_an_existing_breakpoint_retains_the_selector_gesture() { + let (mut h, track, [_, point], clips) = breakpoints_over_a_clip("selector"); + let points = volume_points(&h, track); + let before = h.state().engine.session().edit.clone(); + let near = point + vec2(3.0, 0.0); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::COMMAND)); + drag(&mut h, near, near + vec2(50.0, 0.0)); + h.event(egui::Event::ModifiersChanged(egui::Modifiers::NONE)); + let after = &h.state().engine.session().edit; + assert!(!after.selection.is_empty(), "a Command-drag still selects a range"); + assert_ne!(after.selection, before.selection, "the Selector gesture changes the range"); + assert_eq!(after.tool, before.tool, "the active tool stays selected"); + assert_eq!(volume_points(&h, track), points, "dragging the selection does not move or insert a point"); + assert_eq!(h.state().engine.session().track(track).unwrap().clips(), clips.as_slice(), "the clips stay"); +} + const ALONE: ClipCut = ClipCut { left: false, right: false }; #[test]