Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
C# audioaudio-unitavaloniacpp20cross-platformdawdigital-audio-workstationdspjucelinux-audiomcp-servermidimusicmusic-productionpiano-rollplugin-hostsequencersynthesizervstvst3
(fix) Quick UI batch 2: rack chain effects, warp BPM focus, chain "+", plug-in window on insert, preset delete, pad sample swap (#273)
Egor Khindikaynen3f4a904175f5
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 91b4f427..a4584046 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -23,6 +23,15 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.## [Unreleased]### Added+- **Plug-in windows open when you add a plug-in** (nota-daw/nota#250): adding a VST3 / AU+ instrument or effect from the browser, by drag and drop or from the palette opens its+ editor right away. Loading a project, undo, paste and the AI tools never do. Turn it off in+ **Preferences → Plug-ins → Open plug-in window on insert**.+- **The "+" at the end of the device chain adds an effect** (nota-daw/nota#97): click it and+ the browser opens on Audio effects with the cursor in its search, ready to type.+- **Delete a saved preset from the browser** (nota-daw/nota#234): right-click a preset in the+ Presets tab → **Delete…** moves it to the Trash. Right-click a folder row there to open the+ presets folder.- **Starred versions only** (nota-daw/nota#226): a star button in the History tab's headerlists just the versions you starred, newest first. Click it again to see the whole tree.- **Fold the browser's Built-in and Plug-ins sections** (nota-daw/nota#230): click a@@ -112,6 +121,19 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.`scripts/perf-gate.sh develop` (Linux).### Fixed+- **Chorus, Flanger, Lens and Phaser go into rack chains** (nota-daw/nota#203): they can be+ dropped onto an Instrument Rack or Audio Effect Rack chain and are listed in its add-device+ menu, like every other built-in audio effect.+- **Space and Delete work again after editing a warp marker's BPM** (nota-daw/nota#141): Enter+ or Esc in the inline BPM field hands the keyboard back to the app.+- **An effect with no track to land on starts its own audio track** (nota-daw/nota#68):+ double-clicking an audio effect in the browser with no track selected and no instrument+ track used to do nothing but a status-bar line. A MIDI effect says it needs an instrument+ track.+- **Replacing a Drum Rack pad's sample keeps the pad's mix** (nota-daw/nota#237): a sample+ dropped onto an occupied pad now swaps only the sound. Level, pan, mute and solo, sends,+ choke and the pad's effects stay; the Sampler keeps its tune and envelope, while start, end+ and the loop window start fresh for the new sample.- **Resizing a track no longer re-arms it** (nota-daw/nota#255): after you disarmed a track (orchanged its mute or solo), changing its height brought the old state back.- **Buttons no longer have a lighter top edge** (nota-daw/nota#231): the raised highlight sitsdiff --git a/FEATURES.md b/FEATURES.mdindex 3c91ca4d..3ddfd7ff 100644--- a/FEATURES.md+++ b/FEATURES.md@@ -221,7 +221,8 @@ track count and closes with Escape.project.- **Send/Return** buses (sends to returns) with a return list.- **Level meters** (peak/RMS) on every channel and on the master, plus true peak.-- **Device chain** per track: instrument + effects + MIDI effects, laid out in a row.+- **Device chain** per track: instrument + effects + MIDI effects, laid out in a row. The+ **+** at its end opens the browser on Audio effects with the cursor in the search.- Double-click a device's header (or Fold in its menu) to fold it into a narrow strip withits rotated name and on/off switch; double-click the strip to unfold. Saved with the project.@@ -927,7 +928,9 @@ audio effects after it keep running and keep their settings; saved with the proj(with filter and pages, the plugin's own value text, double-click for its default) and asidechain source where the plugin has one.- **Loading** into a track or rack chain, with the plugin's **native GUI** (an editor- window that opens on top and focused, and closes when the device is removed).+ window that opens on top and focused, and closes when the device is removed). Adding a+ plug-in by hand opens its window straight away (Preferences → Plug-ins → Open plug-in+ window on insert, on by default); loading a project, undo and paste don't.- **State save and restore** in the project, and **bypass**.- **PDC** — plugin delay compensation (including a toggle in the Audio Effect Rack).- **Transport sync** — plugins receive tempo, position, play state and loop boundaries@@ -1019,7 +1022,9 @@ audio effects after it keep running and keep their settings; saved with the projfilter chips in the header); favourited devices sort to the top of their section. Thechips keep to one line — whatever does not fit collapses into a **+N** that opens the rest.- **Context menus**: Projects — Open / Reveal in Finder / Delete (to the Trash, with- confirmation); Files — Show similar sounds / Reveal in Finder; Presets — Reveal in Finder.+ confirmation); Files — Show similar sounds / Reveal in Finder; Presets — Reveal in Finder+ and Delete… (to the Trash) on a saved preset, Reveal in Finder on a folder row (opens the+ presets folder).On Windows and Linux the reveal item reads Show in Explorer / Show in file manager.- **Foldable sections**: the BUILT-IN and PLUG-INS headers of the device tabs collapse andexpand on click.diff --git a/src/managed/Nota.App/AudioClipEditorView.cs b/src/managed/Nota.App/AudioClipEditorView.csindex 8b3935f5..13c38d72 100644--- a/src/managed/Nota.App/AudioClipEditorView.cs+++ b/src/managed/Nota.App/AudioClipEditorView.cs@@ -257,7 +257,14 @@ public sealed class AudioClipEditorView : UserControl_wave.SetSegmentBpm(seg, v); // → MarkersCommitted → engine + Reload}- private void HideBpm() { _bpmBox.IsVisible = false; _bpmSeg = -1; }+ // A hidden field that keeps the keyboard swallows Space / Delete and every other shortcut+ // (#141): hand focus back to the window when Enter / Escape closes it.+ private void HideBpm()+ {+ if (_bpmBox.IsKeyboardFocusWithin) TopLevel.GetTopLevel(this)?.FocusManager?.Focus(null);+ _bpmBox.IsVisible = false;+ _bpmSeg = -1;+ }// Mirror the waveform's zoom/scroll into the scrollbar (shown only when zoomed in).private void SyncWaveScroll()diff --git a/src/managed/Nota.App/BrowserView.cs b/src/managed/Nota.App/BrowserView.csindex 91e5bda7..c754ea71 100644--- a/src/managed/Nota.App/BrowserView.cs+++ b/src/managed/Nota.App/BrowserView.cs@@ -128,6 +128,7 @@ public sealed class BrowserView : UserControl}private const int TabCount = 8; // Instr / FX / MIDI / Files / Preset / Proj / Map / History+ private const int EffectsTab = 1; // Audio effectsprivate const int FilesTab = 3; // samples: the player auditions the fileprivate const int PresetsTab = 4; // Instr / FX / MIDI / Files / Presets carry the playerprivate const int MapTab = 6; // MIDI-learn mappings — hosts a MidiMapView, not a list@@ -187,6 +188,10 @@ public sealed class BrowserView : UserControlpublic event Action<BrowserItem>? CreateMultisampleRequested;/// <summary>Delete a project bundle (moves to Trash after confirmation).</summary>public event Action<BrowserItem>? DeleteProjectRequested;+ /// <summary>Delete a saved preset file (moves to Trash after confirmation).</summary>+ public event Action<BrowserItem>? DeletePresetRequested;+ /// <summary>Open the user presets folder in the OS file manager (a Presets tab folder row).</summary>+ public event Action? OpenPresetsFolderRequested;/// <summary>Open the tag editor. Item null = manage all tags; non-null = create a tag/// and assign it to that device.</summary>public event Action<BrowserItem?>? EditTagsRequested;@@ -425,6 +430,15 @@ public sealed class BrowserView : UserControlpublic void ShowMidiMap() { SelectTab(MapTab); SetCollapsed(false, persist: true); }/// <summary>Opens the History tab (the project's versions).</summary>public void ShowHistory() { SelectTab(HistoryTab); SetCollapsed(false, persist: true); }+ /// <summary>Unfolds the browser on Audio effects with the keyboard in its search, ready to+ /// type (the device chain's "+", #97).</summary>+ public void FocusEffectSearch()+ {+ SelectTab(EffectsTab);+ SetCollapsed(false, persist: true);+ // The search row was hidden while folded: focus it once it is laid out again.+ Avalonia.Threading.Dispatcher.UIThread.Post(() => { _search.Focus(); _search.SelectAll(); }, Avalonia.Threading.DispatcherPriority.Input);+ }/// <summary>Fold the browser down to its icon rail, or unfold it.</summary>public void SetCollapsed(bool collapsed, bool persist)@@ -1565,11 +1579,28 @@ public sealed class BrowserView : UserControlflyout.Items.Add(reveal);return flyout;}+ // A saved preset file on disk (#234). Synthetic rows (factory presets, drum kits)+ // carry a scheme instead of a path: built in, nothing to reveal or delete.+ case BrowserItemKind.Preset when System.IO.Path.IsPathRooted(item.Path):+ {+ var reveal = new MenuItem { Header = MenuKit.RevealLabel };+ reveal.Click += (_, _) => RevealRequested?.Invoke(item);+ flyout.Items.Add(reveal);+ flyout.Items.Add(new Separator());+ flyout.Items.Add(MenuKit.Danger("Delete…", GlyphKind.Trash, () => DeletePresetRequested?.Invoke(item)));+ return flyout;+ }+ // The Presets tab's category / device rows group by what a preset holds; the files+ // all sit in the one presets folder, so every row opens that.+ case BrowserItemKind.Folder when _active == PresetsTab && item.Path.StartsWith("preset", StringComparison.Ordinal):+ {+ var reveal = new MenuItem { Header = MenuKit.RevealLabel };+ reveal.Click += (_, _) => OpenPresetsFolderRequested?.Invoke();+ flyout.Items.Add(reveal);+ return flyout;+ }case BrowserItemKind.Sample:case BrowserItemKind.MidiFile:- // A saved preset file on disk. Synthetic rows (factory presets, drum kits)- // carry a scheme instead of a path and have nothing to reveal.- case BrowserItemKind.Preset when System.IO.Path.IsPathRooted(item.Path):{var reveal = new MenuItem { Header = MenuKit.RevealLabel };reveal.Click += (_, _) => RevealRequested?.Invoke(item);diff --git a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.csindex f67f9ec8..07b9b8ce 100644--- a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs+++ b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs@@ -758,14 +758,22 @@ internal sealed partial class RackCardViewswitch (item.Kind){case Nota.Presentation.BrowserItemKind.Sample:- if (existing >= 0) a.RemoveChain(existing);- added = E.RackAddSamplerChain(T, item.Path, note, false);- if (added >= 0)+ // An occupied pad keeps its chain (#237): level, pan, mute/solo, sends, choke and+ // effects stay, only the sound changes. A Sampler keeps its tune, envelope and+ // filter; another instrument gives way to a fresh Sampler.+ if (existing >= 0 && E.RackSetChainSamplerSample(T, existing, item.Path, note))+ {+ added = existing;+ ResetSampleWindow(existing);+ }+ else{- E.RackSetChainTriggerNote(T, added, note);- // Name the pad after the sample — sixteen pads reading "Nota Sampler" say nothing.- E.RackSetChainName(T, added, System.IO.Path.GetFileNameWithoutExtension(item.Path));+ if (existing >= 0) a.RemoveChain(existing);+ added = E.RackAddSamplerChain(T, item.Path, note, false);+ if (added >= 0) E.RackSetChainTriggerNote(T, added, note);}+ // Name the pad after the sample — sixteen pads reading "Nota Sampler" say nothing.+ if (added >= 0) E.RackSetChainName(T, added, System.IO.Path.GetFileNameWithoutExtension(item.Path));break;case Nota.Presentation.BrowserItemKind.BuiltinInstrument:if (existing >= 0) a.RemoveChain(existing);@@ -785,6 +793,18 @@ internal sealed partial class RackCardViewDeferRebuild();}+ // Start / end, reverse and the loop window belong to the sample that was on the pad: a new+ // sample starts from their defaults.+ private static readonly string[] SampleWindowParams = { "start", "end", "reverse", "loopstart", "loopend", "loopxfade" };++ private void ResetSampleWindow(int chain)+ {+ int n = E.RackChainInstrumentParamCount(T, chain);+ for (int p = 0; p < n; p++)+ if (Array.IndexOf(SampleWindowParams, E.RackChainInstrumentParamId(T, chain, p)) >= 0)+ E.RackChainInstrumentParamSet(T, chain, p, E.RackChainInstrumentParamDefault(T, chain, p));+ }+private void ShowAddPadMenu(IRackAccess a, Control anchor, int note){var f = new MenuFlyout();diff --git a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.csindex 27d2540e..32b0cf49 100644--- a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs+++ b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs@@ -28,8 +28,8 @@ namespace Nota.App;internal sealed partial class RackCardView(DeviceCardContext ctx){- private static readonly string[] RackDeviceNames = { "Nota EQ-3", "Nota EQ-8", "Nota Dynamic EQ-8", "Nota Compressor", "Nota Prism", "Nota Reverb", "Nota Chamber", "Nota Delay", "Nota Utility", "Nota Level", "Nota Ceiling", "Nota Shutter", "Nota Valve", "Nota Auto Filter", "Nota Vintage", "Nota Forge", "Nota Crush", "Nota Orbit", "Nota Auto Shift", "Nota Beat Repeat", "Nota Strata" };- private static readonly int[] RackDeviceKinds = { 16, 0, 13, 1, 21, 2, 20, 3, 4, 18, 14, 19, 6, 7, 8, 17, 12, 9, 10, 11, 15 };+ private static readonly string[] RackDeviceNames = { "Nota EQ-3", "Nota EQ-8", "Nota Dynamic EQ-8", "Nota Compressor", "Nota Prism", "Nota Reverb", "Nota Chamber", "Nota Delay", "Nota Utility", "Nota Level", "Nota Lens", "Nota Ceiling", "Nota Shutter", "Nota Valve", "Nota Auto Filter", "Nota Vintage", "Nota Forge", "Nota Crush", "Nota Chorus", "Nota Flanger", "Nota Phaser", "Nota Orbit", "Nota Auto Shift", "Nota Beat Repeat", "Nota Strata" };+ private static readonly int[] RackDeviceKinds = { 16, 0, 13, 1, 21, 2, 20, 3, 4, 18, 22, 14, 19, 6, 7, 8, 17, 12, 25, 23, 24, 9, 10, 11, 15 };private static readonly IBrush RowSel = NotaPalette.Wash(NotaPalette.Accent, 0x22); // selected chain washprivate readonly DeviceCardContext _ctx = ctx;diff --git a/src/managed/Nota.App/DeviceChainView.cs b/src/managed/Nota.App/DeviceChainView.csindex d73c0a14..576dbe1e 100644--- a/src/managed/Nota.App/DeviceChainView.cs+++ b/src/managed/Nota.App/DeviceChainView.cs@@ -75,6 +75,10 @@ public sealed partial class DeviceChainView : UserControl/// <summary>A one-line message for the status bar (e.g. a kit that loaded incompletely).</summary>public event Action<string>? StatusMessage;+ /// <summary>The "+" at the end of the chain was clicked: MainWindow opens the browser on+ /// Audio effects with the keyboard in its search.</summary>+ public event Action? AddDeviceRequested;+// Accent overlay shown while a browser item is dragged over the panel.private readonly Border _dropGlow = new(){@@ -268,9 +272,23 @@ public sealed partial class DeviceChainView : UserControlStroke = BorderStrong, StrokeThickness = 1, IsVisible = false,StrokeDashArray = new AvaloniaList<double>(4, 3), RadiusX = NotaRadius.ControlValue, RadiusY = NotaRadius.ControlValue,};- var host = new Grid { Children = { _addDash, new Glyph(GlyphKind.Plus, 12) { Foreground = TextTertiary } } };- var card = new Border { Width = 28, Height = CardH, Background = Brushes.Transparent, Child = host };- ToolTip.SetTip(card, "Add device — double-click in the browser or drop here");+ var plus = new Glyph(GlyphKind.Plus, 12) { Foreground = TextTertiary };+ var host = new Grid { Children = { _addDash, plus } };+ var card = new Border+ {+ Width = 28, Height = CardH, Background = Brushes.Transparent, Child = host,+ CornerRadius = NotaRadius.Control, Cursor = new Cursor(StandardCursorType.Hand),+ };+ // A real button (#97): a click opens the browser on Audio effects, typing into its search.+ card.PointerEntered += (_, _) => { card.BindResource(Border.BackgroundProperty, "Brush.SurfaceHover"); plus.BindResource(Glyph.ForegroundProperty, "Brush.TextSecondary"); };+ card.PointerExited += (_, _) => { card.Background = Brushes.Transparent; plus.Foreground = TextTertiary; };+ card.PointerReleased += (_, e) =>+ {+ if (e.InitialPressMouseButton != MouseButton.Left) return;+ AddDeviceRequested?.Invoke();+ e.Handled = true;+ };+ ToolTip.SetTip(card, "Add an audio effect: search the browser, or drop a device here");return card;}diff --git a/src/managed/Nota.App/MainWindow.Browser.cs b/src/managed/Nota.App/MainWindow.Browser.csindex c22a46c0..ffce0ec3 100644--- a/src/managed/Nota.App/MainWindow.Browser.cs+++ b/src/managed/Nota.App/MainWindow.Browser.cs@@ -68,7 +68,8 @@ public partial class MainWindow// Double-click on a browser row: an instrument replaces the selected instrument track's// instrument (clips and effects stay) — else, or with ⌥ held, it starts a track; effects- // go to the selected track (else the last instrument track), presets apply — through the+ // go to the selected track (else the last instrument track, else a new audio track),+ // presets apply — through the// same insert service as drag & drop and the command palette.private void OnBrowserItemActivated(BrowserItem item, KeyModifiers mods){@@ -90,8 +91,7 @@ public partial class MainWindowcase BrowserItemKind.PluginEffect:{int tgt = EffectTarget();- if (tgt <= 0) { _vm.StatusText = "Select a track first."; break; }- ApplyInsertResult(Insertion.RouteToTrack(item, tgt));+ ApplyInsertResult(tgt > 0 ? Insertion.RouteToTrack(item, tgt) : Insertion.EffectOnNewTrack(item));break;}case BrowserItemKind.Sample:@@ -145,6 +145,34 @@ public partial class MainWindow_vm.StatusText = done ? $"Moved {item.Name} to Trash" : $"Couldn't delete {item.Name}";}+ // Delete a saved preset (#234): confirm, then to the Trash, like a project.+ private async void OnBrowserDeletePreset(BrowserItem item)+ {+ if (_vm is null) return;+ bool ok = await new ConfirmWindow("Delete preset",+ $"Move “{item.Name}” to the Trash?", "Delete", "Cancel").ShowDialog<bool>(this);+ if (!ok) return;++ bool done = await Task.Run(() => MoveToTrash(item.Path));+ _vm.Browser.RebuildPresets();+ _vm.StatusText = done ? $"Moved {item.Name} to Trash" : $"Couldn't delete {item.Name}";+ }++ // Open the user presets folder itself (not its parent with it selected).+ private void OnBrowserOpenPresetsFolder()+ {+ if (_vm is null) return;+ try+ {+ string dir = _vm.Settings.PresetsFolder();+ Directory.CreateDirectory(dir); // nothing saved yet: open it empty rather than fail+ if (OperatingSystem.IsMacOS()) Process.Start("open", new[] { dir });+ else if (OperatingSystem.IsWindows()) Process.Start("explorer.exe", $"\"{dir}\"");+ else Process.Start("xdg-open", new[] { dir });+ }+ catch (Exception ex) { _vm.StatusText = $"Reveal failed: {ex.Message}"; }+ }+private static bool MoveToTrash(string path){trydiff --git a/src/managed/Nota.App/MainWindow.Dnd.cs b/src/managed/Nota.App/MainWindow.Dnd.csindex 4497fe90..828d4664 100644--- a/src/managed/Nota.App/MainWindow.Dnd.cs+++ b/src/managed/Nota.App/MainWindow.Dnd.cs@@ -162,6 +162,15 @@ public partial class MainWindowif (_modular?.IsVisible == true) _modular.Refresh();if (revealDevices && r.ShowDevices && t > 0) ShowDevices(t);else _deviceChain?.Refresh();+ if (r.PluginAdded is { } pa && _vm.Settings.Current.OpenPluginWindowOnInsert) OpenAddedPluginWindow(pa.TrackId, pa.DeviceIndex);+ }++ // A plug-in the user just added opens its window (#250). One without an editor, or whose+ // window fails, just stays closed: the card's Open editor reports the failure if asked.+ private void OpenAddedPluginWindow(int trackId, int deviceIndex)+ {+ try { Engine.OpenPluginEditor(trackId, deviceIndex); }+ catch { /* no editor: nothing to open */ }}private bool TrackIsAudio(int trackId) => Insertion.TrackIsAudio(trackId);diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.csindex cc196ea2..7f756c10 100644--- a/src/managed/Nota.App/MainWindow.axaml.cs+++ b/src/managed/Nota.App/MainWindow.axaml.cs@@ -404,6 +404,8 @@ public partial class MainWindow : WindowBrowser.RevealRequested += OnBrowserReveal;Browser.CreateMultisampleRequested += item => OpenMosaicCreate(new[] { item.Path }, -1);Browser.DeleteProjectRequested += OnBrowserDeleteProject;+ Browser.DeletePresetRequested += OnBrowserDeletePreset;+ Browser.OpenPresetsFolderRequested += OnBrowserOpenPresetsFolder;Browser.EditTagsRequested += OnBrowserEditTags;_deviceChain = new DeviceChainView(vm.Engine, _factory, App.Services.GetService<IPluginCatalog>(), _kits, App.Services.GetService<IMosaicPacks>());@@ -415,6 +417,7 @@ public partial class MainWindow : Window_deviceChain.RackPresetSaveRequested += OnSaveRackChainPreset;_deviceChain.ItemDropped += OnDevicePanelDrop; // browser drag onto the device panel_deviceChain.StatusMessage += msg => { if (_vm is not null) _vm.StatusText = msg; };+ _deviceChain.AddDeviceRequested += Browser.FocusEffectSearch; // the chain's "+" (#97)Timeline.TrackSelected += OnTrackSelected;Timeline.ClipGeometryChanged += OnClipGeometryChanged; // clip trimmed/moved → follow it in the open editorTimeline.StatusMessage += msg => { if (_vm is not null) _vm.StatusText = msg; }; // automation-follow hints etc.diff --git a/src/managed/Nota.App/PreferencesWindow.cs b/src/managed/Nota.App/PreferencesWindow.csindex 93d6c37b..8515ff18 100644--- a/src/managed/Nota.App/PreferencesWindow.cs+++ b/src/managed/Nota.App/PreferencesWindow.cs@@ -719,7 +719,16 @@ public sealed partial class PreferencesWindow : NotaWindowfinally { rescan.IsEnabled = true; rescan.Content = "Rescan plugins"; }};+ var settings = App.Services.GetRequiredService<ISettingsService>();+ var openOnInsert = SwitchRow("Open plug-in window on insert", settings.Current.OpenPluginWindowOnInsert, on =>+ {+ settings.Current.OpenPluginWindowOnInsert = on;+ settings.Save();+ });+return Sections(+ Section("Plug-in window", 10, openOnInsert,+ Caption("Adding a plug-in from the browser, by drag and drop or from the palette opens its editor. Loading a project, undo and paste never do.")),Section("Plugin scan folders", 10,well,new StackPanel { Orientation = Orientation.Horizontal, Spacing = 8, Children = { addBtn, removeBtn } },diff --git a/src/managed/Nota.Application/Settings.cs b/src/managed/Nota.Application/Settings.csindex 7e7fef02..89b13f66 100644--- a/src/managed/Nota.Application/Settings.cs+++ b/src/managed/Nota.Application/Settings.cs@@ -106,6 +106,10 @@ public sealed class Settings/// <summary>The last items applied from the palette, most recent first (its Recent section).</summary>public List<string> PaletteRecent { get; set; } = new();+ /// <summary>Adding a plug-in by hand (browser, drag & drop, palette) opens its editor window+ /// right away (#250). On by default; Preferences → Plug-ins.</summary>+ public bool OpenPluginWindowOnInsert { get; set; } = true;+// --- browser view options (the ⋮ button next to the browser search) ------/// <summary>Show each row's type as a quiet tag on the right edge of the browser list.</summary>public bool BrowserShowTypeTags { get; set; } = true;diff --git a/src/managed/Nota.Presentation/DeviceInsertService.cs b/src/managed/Nota.Presentation/DeviceInsertService.csindex 8fa0c204..d849edf4 100644--- a/src/managed/Nota.Presentation/DeviceInsertService.cs+++ b/src/managed/Nota.Presentation/DeviceInsertService.cs@@ -51,7 +51,10 @@ public sealed record InsertResult/// <summary>A preset that landed: chain, device index, its name and factory id ("" for a user preset).</summary>public (int TrackId, PresetChain Chain, int Index, string Name, string FactoryId)? PresetLanded { get; init; }- public static InsertResult Fail(string status) => new() { Ok = false, Status = status };+ /// <summary>The plug-in this insertion put on a track, for "Open plug-in window on insert"+ /// (#250): DeviceIndex -1 is the track's instrument.</summary>+ public (int TrackId, int DeviceIndex)? PluginAdded { get; init; }+ public static InsertResult Fail(string status) => new() { Ok = false, Status = status };}public sealed class DeviceInsertService@@ -193,14 +196,14 @@ public sealed class DeviceInsertServicepublic InsertResult DropOnArrangement(BrowserItem item, int trackId, double beat){if (item.Kind is BrowserItemKind.BuiltinInstrument or BrowserItemKind.PluginInstrument)- return Group(() =>+ return TagPlugin(item, Group(() =>{if (TryReplaceInstrument(item, trackId))return new InsertResult { Ok = true, TrackId = trackId, InstrumentReplaced = true, Status = $"Changed instrument to {item.Name} (track {trackId})" };int t = CreateInstrumentTrack(item, beat);return t > 0 ? new InsertResult { Ok = true, TrackId = t, CreatedTrack = true, Status = $"Added {item.Name} (track {t})" }: InsertResult.Fail($"Couldn't load {item.Name}.");- });+ }));// A preset on a plain instrument track loads into its instrument, like a bare instrument.if (item.Kind == BrowserItemKind.Preset) return ApplyPreset(item, new InsertTarget(trackId, Beat: beat, InPlace: true));return Group(() => RouteToTrack(item, trackId));@@ -211,7 +214,7 @@ public sealed class DeviceInsertService/// gap or in place of the card the target names, an instrument in place of the track's/// (a rack gets a chain / pad), presets and samples as usual. One undo step.</summary>public InsertResult Insert(BrowserItem item, InsertTarget target)- => Group(() => InsertCore(item, target));+ => TagPlugin(item, Group(() => InsertCore(item, target)));private InsertResult InsertCore(BrowserItem item, InsertTarget target){@@ -323,7 +326,9 @@ public sealed class DeviceInsertService}/// <summary>An effect appended to a track, or a preset applied to it (was MainWindow.RouteToTrack).</summary>- public InsertResult RouteToTrack(BrowserItem item, int trackId)+ public InsertResult RouteToTrack(BrowserItem item, int trackId) => TagPlugin(item, RouteToTrackCore(item, trackId));++ private InsertResult RouteToTrackCore(BrowserItem item, int trackId){// Presets first: an instrument preset spawns its own track, so it doesn't need a// target; an effect preset reports "Select a track first." itself.@@ -342,6 +347,32 @@ public sealed class DeviceInsertServicereturn InsertResult.Fail($"{item.Name} can't go on a track.");}+ /// <summary>An effect activated with nothing to land on (no selected track, no instrument+ /// track) starts its own audio track instead of failing quietly (#68); a MIDI effect can't,+ /// so it says what it needs. One undo step.</summary>+ public InsertResult EffectOnNewTrack(BrowserItem item) => Group(() =>+ {+ if (item.Kind == BrowserItemKind.BuiltinMidiEffect)+ return InsertResult.Fail("MIDI effects need an instrument track: add an instrument first.");+ int t = _engine.AddAudioTrack();+ if (t <= 0) return InsertResult.Fail($"Couldn't add a track for {item.Name}.");+ var r = RouteToTrack(item, t);+ if (!r.Ok) { _engine.RemoveTrack(t); return r; }+ return r with { CreatedTrack = true, Status = $"Added {item.Name} on a new audio track (track {t})" };+ });++ // Names the plug-in a successful insertion added (#250). Rack chains / pads are left out:+ // their plug-ins aren't addressed by a track device index.+ private InsertResult TagPlugin(BrowserItem item, InsertResult r)+ {+ if (!r.Ok || r.TrackId <= 0 || r.PluginAdded is not null) return r;+ if (item.Kind == BrowserItemKind.PluginInstrument && (r.CreatedTrack || r.InstrumentReplaced))+ return r with { PluginAdded = (r.TrackId, -1) };+ if (item.Kind == BrowserItemKind.PluginEffect)+ return r with { PluginAdded = (r.TrackId, r.Placed?.Final ?? _engine.TrackDeviceCount(r.TrackId) - 1) };+ return r;+ }+private int AddEffect(BrowserItem item, int t) => item.Kind switch{BrowserItemKind.BuiltinEffect => _engine.AddBuiltinDevice(t, item.BuiltinKind),diff --git a/src/native/nota.engine/src/devices/BuiltinDevices.cpp b/src/native/nota.engine/src/devices/BuiltinDevices.cppindex 2bcad1d8..4516d50d 100644--- a/src/native/nota.engine/src/devices/BuiltinDevices.cpp+++ b/src/native/nota.engine/src/devices/BuiltinDevices.cpp@@ -29,6 +29,10 @@#include "devices/effects/Shutter.h"#include "devices/effects/Chamber.h"#include "devices/effects/Prism.h"+#include "devices/effects/Lens.h"+#include "devices/effects/Flanger.h"+#include "devices/effects/Phaser.h"+#include "devices/effects/Chorus.h"namespace nota {@@ -55,6 +59,10 @@ std::shared_ptr<Device> makeChainDevice(int32_t kind) {case 19: return std::make_shared<Shutter>();case 20: return std::make_shared<Chamber>();case 21: return std::make_shared<Prism>();+ case 22: return std::make_shared<Lens>();+ case 23: return std::make_shared<Flanger>();+ case 24: return std::make_shared<Phaser>();+ case 25: return std::make_shared<Chorus>();default: return nullptr; // 5 = Effect Rack (nesting) / plugin: not via this factory}}