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
(feat) Type exact values into graphs, envelopes and mod matrices (#240) (#382)
Egor Khindikaynen58f57327fea2
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 417db1ef..b052e111 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,9 +20,33 @@ the GitHub release and the news posts — comes from the curated, summarisedEntry categories: `Added`, `Changed`, `Fixed`, `Removed`.+### Changed+- ⌥-click a cell of Consort's patch matrix now types its depth (double-click or **Clear**+ pulls the cable, as ⌥-click did); ⌥-click a Stereo Map handle types its pan and volume (⌥+ double-click no longer resets the volume — type 0). (#240)++### Fixed+- Clearing a Volt or Aurora mod-matrix cell is one undo step and records as an automation+ gesture, and a right-click on the Volt-family envelope and filter graphs no longer moves+ the value under the pointer. (#240)++## [Unreleased]### Added+- **Type exact values into graphs, envelopes and mod matrices** (#240): ⌥-click (Alt-click on+ Windows / Linux) a graph handle and type its value in the units shown, as on knobs and+ faders; a handle with several values (an EQ band's frequency · gain · Q, an envelope's decay+ · sustain) takes Tab between them, Return sets, Esc cancels, each value one undo step and+ one automation gesture. Covered: the envelope graphs of Volt, Bass, Aurora, Operator,+ Physical, Synth and Sampler / Mosaic, the ADSR handles of audio clips in the Arrangement,+ the Volt / Aurora and Consort mod matrices, and the graphs of EQ-8, Dynamic EQ, EQ-3, Auto+ Filter, Compressor, Delay, Chorus, Flanger, Phaser, Orbit, Crush, Auto Gain, Lens, Reverb,+ Shutter, Vintage and Vocoder, the filter pads of Volt-family and Consort instruments, Flux's+ vector pad, Grain's position, Keys' pickup, Rhythm's hit and sample views, Velocity's out+ range and the Stereo Map. Right-click a handle for **Type value…** and **Reset to default**+ (**Clear** on a matrix cell); EQ bands carry **Type value…** in their own menu. The A · D ·+ S · R read-outs under the Volt, Bass and Aurora envelopes take a double-click to type too.- **Sidechain from a single pad, chain or voice** (#190): a sidechain key can now listen to onepad of a Drum Rack, one chain of an Instrument Rack or one voice of Nota Rhythm instead of thewhole track — duck the bass from just the kick. Every key source picker lists the parts underdiff --git a/FEATURES.md b/FEATURES.mdindex 40f6303d..dd8b8439 100644--- a/FEATURES.md+++ b/FEATURES.md@@ -1220,7 +1220,11 @@ audio effects after it keep running and keep their settings; saved with the proj- **Popup rack editors** (full UI / Params).- **Typed values** — ⌥-click any knob, fader or slider (or double-click the number next toit) and type the value: "−6", "1.5k", "250 ms", "L 30", "1/16". Double-click the control- itself resets it to the default.+ itself resets it to the default; right-click offers **Type value…** and **Reset to+ default**. The same works on graph handles (EQ bands — frequency, gain, Q — filter+ pads, crossovers, thresholds, trim and loop markers, the Stereo Map dots), envelope nodes+ (instrument envelopes and audio clips' ADSR handles) and mod-matrix cells (double-click+ or **Clear** removes a route); Tab moves to the handle's next value.- **User manual** (EN / RU, https://nota-daw.github.io/nota-docs/) — **Help ▸ Documentation**opens it in the system language, the start window links to the first-track tutorial, andeach device header menu's **Documentation** item opens that device's page.diff --git a/specs/008-stereo-map/contracts/ui-stereo-map.md b/specs/008-stereo-map/contracts/ui-stereo-map.mdindex 4ff79ea2..e6b1dbda 100644--- a/specs/008-stereo-map/contracts/ui-stereo-map.md+++ b/specs/008-stereo-map/contracts/ui-stereo-map.md@@ -30,7 +30,7 @@ stays under both. In the Strips view the map panel is removed and the strips tak| Selected | 22 px ring, 2 px `Accent`, around the handle; drawn on top || Label | 10 px medium, right of the handle (+13, −7), max 84 px, ellipsis; `TextSecondary`, selected `TextPrimary`, dimmed `TextDisabled`; hidden if it would overlap a placed label || Tooltip | 188 px, `TooltipBg`, 1 px `BorderStrong`, radius 4, padding 8 / 10; name row (8 px colour dot + 11 px semibold `TextPrimary`); rows PAN, VOLUME, BALANCE, WIDTH, CORRELATION, LEVEL — key 7 px bold `TextTertiary` 62 px wide, value Mono 9 px (correlation < −0.05 in `Danger`); notes separated by a hairline: "Image is off the pan" (title `Accent`), "Muted", "Silent" (title `TextSecondary`), body 9 px `TextTertiary`; placed right/below the handle, flipped left/up near the edges |-| Bottom row (32 px, top hairline) | "MASTER CORR" 8 px bold `TextTertiary`; "−1"; a 180 × 6 well with a centre tick and a bar from centre to the value (`Success` ≥ −0.05, `Danger` < −0.05); "+1"; the value Mono 10 px (`Danger` when < −0.05); right-aligned hint 10 px `TextTertiary`: "Drag: pan + volume · Shift locks axis · double-click centres pan · ⌥ double-click 0 dB" |+| Bottom row (32 px, top hairline) | "MASTER CORR" 8 px bold `TextTertiary`; "−1"; a 180 × 6 well with a centre tick and a bar from centre to the value (`Success` ≥ −0.05, `Danger` < −0.05); "+1"; the value Mono 10 px (`Danger` when < −0.05); right-aligned hint 10 px `TextTertiary`: "Drag: pan + volume · Shift locks axis · double-click centres pan · ⌥-click types" |## Texts (exact)diff --git a/specs/008-stereo-map/spec.md b/specs/008-stereo-map/spec.mdindex fa89cb38..01d67561 100644--- a/specs/008-stereo-map/spec.md+++ b/specs/008-stereo-map/spec.md@@ -191,7 +191,7 @@ a dot and check the arrangement selection.at L100, L50, C, R50, R100) and Y = fader volume on the same scale as the Mixer fader(grid lines and labels at its top, 0 dB, −6, −12, −24), C and 0 dB lines emphasised.- **FR-004**: The map header MUST read **STEREO MAP**. A hint line under the map MUST read- "Drag: pan + volume · Shift locks axis · double-click centres pan · ⌥ double-click 0 dB".+ "Drag: pan + volume · Shift locks axis · double-click centres pan · ⌥-click types".**Measurement**diff --git a/specs/035-typed-value-entry/contracts/control-audit.md b/specs/035-typed-value-entry/contracts/control-audit.mdindex a3dfbae5..b27a0733 100644--- a/specs/035-typed-value-entry/contracts/control-audit.md+++ b/specs/035-typed-value-entry/contracts/control-audit.md@@ -13,14 +13,14 @@ A/D/S/R read-out row.## 1. Shared controls-| ☐ | Control | File | Gesture today | Plan |+| ☑ | Control | File | Gesture today | Plan ||---|---|---|---|---|| ☑ | `Knob` | Controls/Knob.cs | DC reset | A — `Format` property; `KnobCell` attaches when set; DC branch removed, ⌥ reset || ☑ | `PanKnob` | Controls/PanKnob.cs | — | A — L/R/C read-out, default C || ☑ | `MiniFader` | Controls/MiniFader.cs | DC reset | A — dB read-out; DC branch removed || ☑ | `VFader` | Controls/VFader.cs | — (a click jumped the value) | A — dB read-out, default 0 dB; the drag is now relative, so the first click of a double-click moves nothing || ☑ | `SliderTrack` | Controls/SliderTrack.cs | DC `Reset` | A via its row; `Reset` moves to ⌥ |-| ☐ | `RangeSliderTrack` | Controls/RangeSliderTrack.cs | DC `Reset` | H — low / high fields; `Reset` on ⌥ |+| ☑ | `RangeSliderTrack` | Controls/RangeSliderTrack.cs | DC `Reset` | H — `IValueHandles` (nearer handle); Velocity attaches Out low / Out high, the reset rides on the low field || ☑ | `DragNumber` | Controls/DragNumber.cs | DC types | already typed — move to the shared box and parser, add ⌥ reset where it has a default || ☑ | `PanBar` | Controls/PanBar.cs | DC reset to C | A — L/R/C read-out, default C || ☑ | `ValueBar` | Controls/ValueBar.cs | DC reset | A — ⌥ fallback in the control; no call sites today, so nothing to attach |@@ -33,14 +33,14 @@ A/D/S/R read-out row.## 2. Knob factories and direct builders-| ☐ | Site | Plan |+| ☑ | Site | Plan ||---|---|---|| ☑ | DeviceCards/DeviceParamControls.cs (built-in device params; generic knob) | set `Format` || ☑ | DeviceCards/InstrumentControls.cs | set `Format` || ☑ | DeviceCards/PluginCard.cs (VST3/AU generic params) | `Format` from `PluginParamText` via probe — exempt from pure `TextAt` (plug-in text is only readable at the current value); probe path allowed here, documented || ☑ | DeviceCards/Rack/RackCardView.cs (×5), Rack/MacroPanel.cs | set `Format`; merge menu into `MacroPanel.ShowMenu` || ☑ | ModularView.cs (×5) | set `Format`; merge into `ShowModulateMenu` |-| ☐ | DeviceChainView.cs | set `Format` |+| ☑ | DeviceChainView.cs | `Format` set on the Sends knobs (attached by `KnobCell`) || ☑ | Device bodies: AutoFilter, AutoShift, BeatRepeat, Ceiling, Chamber, Compressor, Crush, Delay, DynamicEq, Eq, Forge, Lens, Prism, Reverb, Shutter, Utility, Valve, Vintage, Vocoder | set `Format` in each body's knob helper || ☑ | MIDI bodies: Arp, Chord, Generic, Length, Random, Velocity | set `Format` || ☑ | Instrument cards: Aurora (×2), Bass, Consort, Flux, Grain, Monolith, Mosaic (×2), Pendulum, Physical, Rhythm, Sampler, Volt | set `Format` |@@ -51,50 +51,53 @@ A/D/S/R read-out row.## 3. Graph controls (handles that set numbers)-| ☐ | Control | File | Plan |+| ☑ | Control | File | Plan ||---|---|---|---|-| ☐ | `AutoFilterCurve` | Controls/AutoFilterCurve.cs | H — cutoff → resonance |-| ☐ | `AfFader`, `AfEnvView`, `AfLfoView` | Controls/AutoFilterViews.cs | A (fader) · H (env / LFO handles) |-| ☐ | `ChorusVoicesView`, `ChorusFieldView` | Controls/ChorusViews.cs | H |-| ☐ | `CompFader`, `CompTransferView` (threshold node), `CompMotionView`, `CompKeyView` | Controls/CompViews.cs | A · H; history view exempt (display only) |-| ☐ | `ConsortFilterCurve`, `ConsortDelayView`, `ConsortPitchLane`, `ConsortStepGrid` | Controls/ConsortViews.cs | H for curve / delay; step and pitch lanes keep ⌥ paint — **exempt** (step editors, out of scope) unless they set a card parameter |-| ☐ | `ConsortPatchMatrix` | Controls/ConsortViews.cs | H per cell — see §4 |-| ☐ | `CrSpectrumView`, `CrTransferView` | Controls/CrushViews.cs | H |-| ☐ | `DelayTaps`, `DelayFader`, `DelayFilterCurve` | Controls/DelayViews.cs | H · A · H (low cut → high cut) |-| ☐ | `DynamicEqCurve` | Controls/DynamicEqCurve.cs | H — band freq → gain → Q; keep empty-space DC |-| ☐ | `Eq3Fader`, `Eq3Graph` | Controls/Eq3Views.cs | A · H |-| ☐ | `Eq8Curve` | Controls/Eq8Views.cs | H — band freq → gain → Q; keep empty-space DC |-| ☐ | `FlangerSweepView`, `FlangerBar` | Controls/FlangerViews.cs | H · A; comb view exempt (display) |-| ☐ | `FluxVectorPad` | Controls/FluxVectorPad.cs | H — X → Y |-| ☐ | `GrainWaveViz` | Controls/GrainWaveViz.cs | H — position → spray |-| ☐ | `KeysPickupView`, `KeysTremView` | Controls/KeysViews.cs | H — symmetry → drive (per its handle) |-| ☐ | `LensVSlider` | Controls/LensViews.cs | A; spectrum / scope / waterfall exempt (display) |-| ☐ | `LvHistoryView`, `LvGainFader` | Controls/LevelViews.cs | H · A |-| ☐ | `OrbitGainView`, `OrbitPanBar` | Controls/OrbitViews.cs | H — amount → rate · A |-| ☐ | `PhaserSweepView` | Controls/PhaserViews.cs | H; response view exempt (display) |-| ☐ | `ReverbTailView` | Controls/ReverbViews.cs | H if it drags (verify) |-| ☐ | `RhythmHitView`, `RhythmSampleView` | Controls/RhythmViews.cs | H; `RhythmStepStrip` exempt (step editor) |-| ☐ | `ShSignalView`, `ShEnvelopeView`, `ShKeyView` | Controls/ShutterViews.cs | H; `ShPill`, `ShPatternView` verify |-| ☐ | `VtCurveView`, `VtWearView`, `VtHarmView` | Controls/VintageViews.cs | H if they drag (verify) |-| ☐ | `VocoderGraph` | Controls/VocoderGraph.cs | H — low edge → high edge |-| ☐ | `VoltFilter` | Controls/VoltFilter.cs | H — cutoff → resonance |-| ☐ | `SynthViz` Filter pad | Controls/SynthViz.cs | H — cutoff (X) → reso (Y) |-| ☐ | `AuroraLfoStrip`, `AuroraStack`, `StrataWave`, `PadWave`, `ChordKeysViz` | Controls/ | verify: display only → exempt |-| ☐ | `ArpGrid` | Controls/ArpGrid.cs | exempt (pattern editor, ⌥ already used) unless a handle sets a card parameter |-| ☐ | `StereoMapView` handles | StereoMapView.cs | DC reset (pan → C, ⌥ volume → 0 dB) | H — pan → volume per track dot; ⌥ already resets volume, keep; reset pan via menu |-| ☐ | Sampler / Mosaic views | DeviceCards/Sampler/SamplerViews.cs, Mosaic/MosaicViews.cs | H for start / end / loop / zone handles (verify) |+| ☑ | `AutoFilterCurve` | Controls/AutoFilterCurve.cs | `AttachAll` — cutoff → resonance (a drag anywhere moves it) |+| ☑ | `AfFader`, `AfEnvView`, `AfLfoView` | Controls/AutoFilterViews.cs | A (Shape faders, Vintage state faders) · `AttachAll` env amount · LFO amount → phase |+| ☑ | `ChorusVoicesView`, `ChorusFieldView` | Controls/ChorusViews.cs | `AttachAll` Amount; field view **exempt** (display only) |+| ☑ | `CompFader`, `CompTransferView` (threshold node), `CompMotionView`, `CompKeyView` | Controls/CompViews.cs | A (threshold, make-up / key gain) · `AttachAll` threshold → ratio · H HP → Q, LP → Q; motion and history **exempt** (display only) |+| ☑ | `ConsortFilterCurve`, `ConsortDelayView`, `ConsortPitchLane`, `ConsortStepGrid` | Controls/ConsortViews.cs | `AttachAll` cutoff → reso; delay view **exempt** (display only); step and pitch lanes **exempt** (step editors) |+| ☑ | `ConsortPatchMatrix` | Controls/ConsortViews.cs | H per cell — see §4 |+| ☑ | `CrQuantView`, `CrSpectrumView`, `CrTransferView` | Controls/CrushViews.cs | `AttachAll` bits → rate · H Nyquist (rate) / post filter · H drive |+| ☑ | `DelayTaps`, `DelayFader`, `DelayFilterCurve` | Controls/DelayViews.cs | taps **exempt** (display only) · A · H low cut / high cut |+| ☑ | `DynamicEqCurve` | Controls/DynamicEqCurve.cs | H — band freq → gain → Q (`DynEq.BandFields`); DC keeps band on/off and empty-space add; **Type value…** in the band menu |+| ☑ | `Eq3Fader`, `Eq3Graph` | Controls/Eq3Views.cs | A (reset lifts the kill) · H crossovers (box over the handle) and band zones |+| ☑ | `Eq8Curve` | Controls/Eq8Views.cs | H — band freq → gain → Q; DC keeps band on/off and empty-space add; **Type value…** in the band menu |+| ☑ | `FlangerCombView`, `FlangerSweepView`, `FlangerBar` | Controls/FlangerViews.cs | `AttachAll` delay → feedback on the comb (the view that drags); sweep and bar **exempt** (display only) |+| ☑ | `FluxVectorPad` | Controls/FluxVectorPad.cs | `AttachAll` X → Y; DC keeps its `DoubleTapped` reset (fields carry no default) |+| ☑ | `GrainWaveViz` | Controls/GrainWaveViz.cs | `AttachAll` position (spray is not dragged here); DC keeps `DoubleTapped` |+| ☑ | `KeysPickupView`, `KeysTremView` | Controls/KeysViews.cs | host — symmetry → distance (none for Clav); trem view **exempt** (display only) |+| ☑ | `LensVSlider` | Controls/LensViews.cs | A — the parameter the rail drives now; spectrum / scope / waterfall **exempt** (display) |+| ☑ | `LvHistoryView`, `LvGainFader` | Controls/LevelViews.cs | A target · A gain (+ the ceiling box) |+| ☑ | `OrbitGainView`, `OrbitPanBar` | Controls/OrbitViews.cs | `AttachAll` amount → phase; pan bar **exempt** (display only) |+| ☑ | `PhaserResponseView`, `PhaserSweepView` | Controls/PhaserViews.cs | `AttachAll` center → feedback on the response (the view that drags); sweep **exempt** (display) |+| ☑ | `ReverbTailView` | Controls/ReverbViews.cs | H — decay (the tail) / pre-delay (the marker) |+| ☑ | `RhythmHitView`, `RhythmSampleView` | Controls/RhythmViews.cs | `AttachAll` decay → tune · H start / end (DC keeps loading a file); `RhythmStepStrip` **exempt** (step editor) |+| ☑ | `ShSignalView`, `ShEnvelopeView`, `ShKeyView` | Controls/ShutterViews.cs | H via `ShDragView : IValueHandles` (also Crush, Ceiling, Forge, Beat Repeat views); the fill bars (Complexity / Smooth / Swing) A; `ShPill` **exempt** (display), `ShPatternView` **exempt** (step editor) |+| ☑ | `VtCurveView`, `VtWearView`, `VtHarmView` | Controls/VintageViews.cs | `AttachAll` drive · depth → rate (of what the window shows) · drive |+| ☑ | `VocoderGraph` | Controls/VocoderGraph.cs | H — low edge / high edge |+| ☑ | `VoltFilter` | Controls/VoltFilter.cs | host — cutoff → reso (all four cards); right-click no longer drags |+| ☑ | `SynthViz` Filter pad | Controls/SynthViz.cs | host — cutoff → reso |+| ☑ | `AuroraLfoStrip`, `AuroraStack`, `StrataWave`, `PadWave`, `ChordKeysViz` | Controls/ | **exempt** — display only (no pointer input) |+| ☑ | `ArpGrid` | Controls/ArpGrid.cs | **exempt** (pattern editor, ⌥ already used); the Arp steppers are A |+| ☑ | `StereoMapView` handles | StereoMapView.cs | host — pan → volume per track dot (master: select only); DC centres the pan as before; ⌥ double-click 0 dB is gone (⌥-click types; type 0) |+| ☑ | Sampler / Mosaic views | DeviceCards/Sampler/SamplerViews.cs, Mosaic/MosaicViews.cs | H wave markers (Sampler), env A · D→S · R, `AttachAll` filter cutoff → reso (both cards), A Mosaic curves; Mosaic zone markers and zone number boxes **exempt** (zone data in the program, not parameters) |+| ☑ | `ChamberFader`, `ChamberIrView`, `ChamberDecayGraph`, `ChamberEqCurve` | Controls/ChamberViews.cs | A blend / dry-wet · H IR start / decay trims · H band RT60 markers · H low cut → shelf, high cut → shelf; LFO view **exempt** (display) |+| ☑ | `PrismSpectrum`, `PrismTransfer`, Prism value boxes | Controls/PrismViews.cs | H crossovers · H threshold → ratio per dot · A |+| ☑ | Output / value boxes: EQ-8, Dynamic EQ, EQ-3, Auto Gain ceiling, Forge stage outputs, Chord velocity offsets, Scale range, Arp steppers, Consort cable depth, drum-pad pan | bodies | A over their read-outs |## 4. Envelopes and matrices-| ☐ | Control | Plan |+| ☑ | Control | Plan ||---|---|---|-| ☐ | `VoltEnv` — Volt (amp, filter), Bass (amp, filter), Aurora (×2), Operator, Physical noise | H — A · D→S · R nodes and segments; R where the card has no A/D/S/R controls beside the graph |-| ☐ | `SynthViz` Env tab | H — breakpoints; read-outs already in the graph |-| ☐ | Clip ADSR handles (`ClipAdsrKit`, arrangement lane) | H — commit via `CommitAdsr`; DC reset → ⌥ (Shortcuts row "double-click resets the stage" changes) |-| ☐ | Audio clip editor ADSR rows | K — already typed; reset → ⌥ |-| ☐ | Other envelope strips (Monolith / Pentad / Consort inline-knob ADSR) | covered by `Knob` |-| ☐ | `VoltMatrix` | H per cell, % −100…+100; DC types, ⌥ / menu **Clear**; RC → menu; clear wrapped in a gesture (undoable) |-| ☐ | `ConsortPatchMatrix` | H per cell; DC types depth (creates the cable); ⌥ / menu **Clear** removes |+| ☑ | `VoltEnv` — Volt (amp, filter), Bass (amp, filter), Aurora (×2), Operator, Physical noise | host — A · D→S · R nodes and segments, formatter per stage from the card; the cards' A/D/S/R read-out cells type too (Operator has knobs) — no extra `EnvReadouts` row needed |+| ☑ | `SynthViz` Env tab | host — A · D→S · R breakpoints |+| ☑ | Clip ADSR handles (`ClipAdsrKit`, arrangement lane) | host on the lane — each value one `CommitAdsr`; DC still resets the stage (gestures per #274) |+| ☑ | Audio clip editor ADSR rows | K — already typed |+| ☑ | Other envelope strips (Monolith / Pentad / Consort inline-knob ADSR) | covered by `Knob` |+| ☑ | `VoltMatrix` | host per cell, % −100…+100; ⌥ types, DC / menu **Clear** (one gesture, undoable); RC → menu; Tab walks the routed cells |+| ☑ | `ConsortPatchMatrix` | host per cell; ⌥ types the depth (creates the cable); DC / menu **Clear** pulls it |## 5. Out of scope (recorded, not converted)@@ -120,3 +123,11 @@ else there): EQ-8 / Dynamic EQ add-band and band on/off, Rhythm sample load, Conpainting, Flux pad / Grain view (`DoubleTapped`), `StereoMapView`, `VoltMatrix` (PR 2).The rack macro knobs type and reset but keep their own right-click menu (no Type value…item there yet).++## 7. Gestures after #274 (PR 2 / PR 3)++Part 1 swapped the gestures after review: **⌥-click types** (and a double-click on a read-out),+**double-click resets** (or clears a route). The graph, envelope and matrix hosts follow the+same scheme, so the "DC types" wording in older rows reads as "⌥ types" now. A host's fields+without a default let a double-click through to the control (EQ band on / off, Rhythm load,+Flux / Grain `DoubleTapped`).diff --git a/specs/035-typed-value-entry/spec.md b/specs/035-typed-value-entry/spec.mdindex 2da5dd05..36e52210 100644--- a/specs/035-typed-value-entry/spec.md+++ b/specs/035-typed-value-entry/spec.md@@ -210,24 +210,29 @@ type each value it sets, and check the graph and the paired controls.### Functional Requirements+> **Amendment (#274, after PR 1 review):** the gestures were swapped — **⌥/Alt-click types**+> (as does a double-click on a read-out) and **double-click resets** (or clears a route). The+> requirements below are written in the amended form; where the user stories still say+> "double-click types" / "⌥-click resets", read them the other way round.+- **FR-001**: Every control that edits a numeric parameter MUST offer a text-entry mode in which the user types the value in the units the control displays.-- **FR-002**: Text entry MUST open on double-click of the control or of its read-out, from a "Type value…" item in the control's context menu, and by Tab / Shift+Tab from another open box on the same card. Return outside a text box keeps its transport meaning (Stop; launch in the Session grid).+- **FR-002**: Text entry MUST open on ⌥/Alt-click of the control, on double-click of its read-out, from a "Type value…" item in the control's context menu, and by Tab / Shift+Tab from another open box on the same card. Return outside a text box keeps its transport meaning (Stop; launch in the Session grid).- **FR-003**: Typed text MUST be read by one shared parser everywhere: sign, decimals (dot or comma) and fractions, unit multipliers (k, ms, µs, s, Hz/kHz, dB, %, st/ct), L/R/C for pan, ∞, and any word the control's read-out shows (off, HOLD …).- **FR-004**: A typed value outside the parameter's range MUST be clamped to the range; text that cannot be read MUST leave the value unchanged and add nothing to undo or automation.- **FR-005**: Enter and a click outside the box MUST commit; Esc MUST cancel and restore the value shown before the box opened.- **FR-006**: A commit MUST be exactly one undo step and exactly one automation gesture (begin / end), indistinguishable in history and automation from a drag that ends at the same value.- **FR-007**: Tab MUST commit and open entry on the next typeable parameter of the same card (or editor panel) in reading order, wrapping at the end; Shift+Tab MUST go the other way.- **FR-008**: While the box is open, keystrokes MUST go to the box and not trigger app-wide shortcuts.-- **FR-009**: Reset to default MUST move from double-click to ⌥/Alt-click on every control that previously reset on double-click, and be available on every control that has a default; it MUST be one undo step and one automation gesture.+- **FR-009**: Reset to default MUST stay on double-click of the control (amended by #274: ⌥/Alt-click types instead), and be available on every control that has a default; a handle with several values resets them together; it MUST be one undo step and one automation gesture.- **FR-010**: Every typeable control's context menu MUST offer "Reset to default" (and "Clear" where the value is a route or point that can be removed), so reset is reachable where ⌥/Alt already has another meaning.- **FR-011**: Fine-drag modifiers (Shift, Ctrl/⌘) MUST keep their current behaviour.-- **FR-012**: Envelope / ADSR graph editors MUST open typed entry on double-click of a breakpoint (time first, Tab to level when it has one) and of a segment (that stage's time).+- **FR-012**: Envelope / ADSR graph editors MUST open typed entry on ⌥/Alt-click of a breakpoint (time first, Tab to level when it has one) and of a segment (that stage's time).- **FR-013**: Envelope graph editors that have no adjacent numeric controls for their stages MUST show compact editable A/D/S/R (or the editor's own stage) read-outs next to the graph.-- **FR-014**: Modulation matrix cells MUST open typed entry for their amount (−100…+100 %) on double-click; clearing a cell MUST move to ⌥/Alt-click and a "Clear" context-menu item.-- **FR-015**: Graph controls whose handles set numeric parameters (filter / compressor / EQ curves, XY pads, value / pan / mix bars) MUST open typed entry on double-click of a handle, cycling with Tab through the values that handle sets; existing double-click actions on empty graph space MUST be kept.+- **FR-014**: Modulation matrix cells MUST open typed entry for their amount (−100…+100 %) on ⌥/Alt-click; clearing a cell MUST be on double-click and a "Clear" context-menu item, and undoable.+- **FR-015**: Graph controls whose handles set numeric parameters (filter / compressor / EQ curves, XY pads, value / pan / mix bars) MUST open typed entry on ⌥/Alt-click of a handle, cycling with Tab through the values that handle sets; existing double-click actions on empty graph space MUST be kept.- **FR-016**: The text box MUST look the same on every control and in every colour theme: a flat box over (or beside) the read-out, Studio tokens, mono figures, current value pre-selected; it MUST stay inside the window.- **FR-017**: The feature MUST ship with an audit list of every numeric control type and every place that builds one outside the shared kits, each item checked off as converted (or recorded as exempt with a reason).-- **FR-018**: The Shortcuts pane, the user docs (EN + RU) and FEATURES.md MUST describe the new gestures (double-click = type, ⌥/Alt-click = reset, Enter / Tab / Esc in the box), and CHANGELOG `[Unreleased]` MUST note that double-click no longer resets.+- **FR-018**: The Shortcuts pane, the user docs (EN + RU) and FEATURES.md MUST describe the gestures (⌥/Alt-click or a double-click on the read-out = type, double-click = reset / clear, Enter / Tab / Esc in the box), and CHANGELOG `[Unreleased]` MUST note them.### Key Entitiesdiff --git a/specs/035-typed-value-entry/tasks.md b/specs/035-typed-value-entry/tasks.mdindex f8dbd4a8..505cf68e 100644--- a/specs/035-typed-value-entry/tasks.md+++ b/specs/035-typed-value-entry/tasks.md@@ -126,13 +126,13 @@ All app paths are under `src/managed/Nota.App/` unless they start with `tests/`,**Independent Test**: quickstart § 2 Volt env rows; each `VoltEnv` site; clip ADSR handle in the arrangement.-- [ ] T042 [US4] `Controls/VoltEnv.cs`: implement `IValueEntryHost` — attack node → A; decay/sustain node → D then S; release node → R; nearest segment within 6 px → that stage's time; fields use `PluginParamGet/Set`, `Gest`-style Begin/End per param, `TextAt` from a formatter set by the owner (`VoltEnv.Format(Func<string, double, string>)` keyed by stage); `ValueEntry.AttachHost(this)`-- [ ] T043 [US4] `DeviceCardKit.EnvReadouts(IValueEntryHost env)` in `DeviceCardKit.cs`: a compact four-column read-out row (labels A · D · S · R, mono 8, Studio tokens) whose read-outs are typeable fields, live-followed via the card's refresher-- [ ] T044 [P] [US4] `DeviceCards/Instruments/VoltInstrumentCard.cs` (amp + filter env) and `BassInstrumentCard.cs` (amp + filter env): pass stage formatters; add `EnvReadouts` where no A/D/S/R knobs sit beside the graph-- [ ] T045 [P] [US4] `DeviceCards/Instruments/AuroraInstrumentCard.cs` (×2), `OperatorInstrumentCard.cs`, `PhysicalInstrumentCard.cs` (noise env): same-- [ ] T046 [P] [US4] `Controls/SynthViz.cs` Env tab: host over the breakpoints (A, D→S, R), box anchored over the read-out caption drawn in the graph-- [ ] T047 [US4] Clip ADSR handles: `ClipAdsrKit.cs` exposes the handle fields (Attack time, Decay time → Sustain level, Release time, `TextAt` from `ClipAdsrKit.Readout`'s formatting); `ArrangementView.LaneControl.cs` attaches them as a host on the lane, commits through `CommitAdsr` (one undo step), and the current double-click reset (`ClipAdsrKit.Reset`) moves to ⌥-- [ ] T048 [P] [US4] Other envelope graphs from the audit (`AfEnvView` in `Controls/AutoFilterViews.cs`, `ShEnvelopeView` in `Controls/ShutterViews.cs`): host over their handles; `EnvReadouts` only if no numeric controls sit beside them+- [X] T042 [US4] `Controls/VoltEnv.cs`: implement `IValueEntryHost` — attack node → A; decay/sustain node → D then S; release node → R; nearest segment within 6 px → that stage's time; fields use `PluginParamGet/Set`, `Gest`-style Begin/End per param, `TextAt` from a formatter set by the owner (`VoltEnv.Format(Func<string, double, string>)` keyed by stage); `ValueEntry.AttachHost(this)`+- [X] T043 [US4] `DeviceCardKit.EnvReadouts(IValueEntryHost env)` in `DeviceCardKit.cs`: a compact four-column read-out row (labels A · D · S · R, mono 8, Studio tokens) whose read-outs are typeable fields, live-followed via the card's refresher — done without a new kit row: the A · D · S · R read-out cells under the Volt, Bass and Aurora graphs attach `VoltEnv.Field(k)`; Operator has knobs beside its graph; Physical keeps its summary line (the graph types)+- [X] T044 [P] [US4] `DeviceCards/Instruments/VoltInstrumentCard.cs` (amp + filter env) and `BassInstrumentCard.cs` (amp + filter env): pass stage formatters; add `EnvReadouts` where no A/D/S/R knobs sit beside the graph+- [X] T045 [P] [US4] `DeviceCards/Instruments/AuroraInstrumentCard.cs` (×2), `OperatorInstrumentCard.cs`, `PhysicalInstrumentCard.cs` (noise env): same+- [X] T046 [P] [US4] `Controls/SynthViz.cs` Env tab: host over the breakpoints (A, D→S, R), box anchored over the read-out caption drawn in the graph+- [X] T047 [US4] Clip ADSR handles: `ClipAdsrKit.cs` exposes the handle fields (Attack time, Decay time → Sustain level, Release time, `TextAt` from `ClipAdsrKit.Readout`'s formatting); `ArrangementView.LaneControl.cs` attaches them as a host on the lane, commits through `CommitAdsr` (one undo step), and the current double-click reset (`ClipAdsrKit.Reset`) moves to ⌥ — gestures per #274: ⌥ types, DC still resets the stage+- [X] T048 [P] [US4] Other envelope graphs from the audit (`AfEnvView` in `Controls/AutoFilterViews.cs`, `ShEnvelopeView` in `Controls/ShutterViews.cs`): host over their handles; `EnvReadouts` only if no numeric controls sit beside them — `AfEnvView` is a relative-drag window (`AttachAll` amount); `ShEnvelopeView` through `ShDragView : IValueHandles`---@@ -142,8 +142,8 @@ All app paths are under `src/managed/Nota.App/` unless they start with `tests/`,**Independent Test**: quickstart § 2 Volt matrix row; Consort patch matrix.-- [ ] T049 [US5] `Controls/VoltMatrix.cs`: implement `IValueEntryHost` — one field per routed cell, `TextAt` = signed % ("−100…+100 %", 0.5 = 0), `Set` via `PluginParamSet`, Begin/End via `BeginAutomationWrite` / `EndAutomationWrite` on `mtx{s}_{d}`, `Clear` = Begin → set 0.5 → End (makes clearing undoable); remove the right-click / double-click clear from `OnPointerPressed` (right-click now opens the parameter menu with **Type value…** / **Clear**); update the header comment-- [ ] T050 [US5] `ConsortPatchMatrix` in `Controls/ConsortViews.cs`: host per cell — double-click types the depth (raising `DepthChanged`, which creates the cable), ⌥-click and **Clear** raise `Removed` (⌥ keeps its meaning); remove the double-click removal; owner `DeviceCards/Instruments/ConsortInstrumentCard.cs` supplies Begin/End and `TextAt`+- [X] T049 [US5] `Controls/VoltMatrix.cs`: implement `IValueEntryHost` — one field per routed cell, `TextAt` = signed % ("−100…+100 %", 0.5 = 0), `Set` via `PluginParamSet`, Begin/End via `BeginAutomationWrite` / `EndAutomationWrite` on `mtx{s}_{d}`, `Clear` = Begin → set 0.5 → End (makes clearing undoable); remove the right-click / double-click clear from `OnPointerPressed` (right-click now opens the parameter menu with **Type value…** / **Clear**); update the header comment — per #274, ⌥ types and DC / **Clear** clear+- [X] T050 [US5] `ConsortPatchMatrix` in `Controls/ConsortViews.cs`: host per cell — double-click types the depth (raising `DepthChanged`, which creates the cable), ⌥-click and **Clear** raise `Removed` (⌥ keeps its meaning); remove the double-click removal; owner `DeviceCards/Instruments/ConsortInstrumentCard.cs` supplies Begin/End and `TextAt` — per #274, ⌥ types and DC / **Clear** pull the cable (⌥ no longer removes)---@@ -153,15 +153,16 @@ All app paths are under `src/managed/Nota.App/` unless they start with `tests/`,**Independent Test**: quickstart § 2 EQ-8 row; each graph control in contracts/control-audit.md § 3.-- [ ] T051 [P] [US6] `Controls/Eq8Views.cs` (`Eq8Curve`) and `Controls/DynamicEqCurve.cs`: host — band handle → frequency, gain, Q; `FieldsAt` null off a handle (keeps add-band double-click); owners `DeviceCards/Bodies/EqDeviceBody.cs` / `DynamicEqDeviceBody.cs` pass formatters and gestures-- [ ] T052 [P] [US6] `Controls/Eq3Views.cs` (`Eq3Fader` attach, `Eq3Graph` host) with `DeviceCards/Bodies/Eq3DeviceBody.cs`-- [ ] T053 [P] [US6] `Controls/AutoFilterCurve.cs` (cutoff → resonance), `Controls/AutoFilterViews.cs` (`AfFader` attach, `AfLfoView` host) with `DeviceCards/Bodies/AutoFilterDeviceBody.cs`-- [ ] T054 [P] [US6] `Controls/CompViews.cs` (`CompFader` attach, `CompTransferView` threshold, `CompMotionView`, `CompKeyView` hosts) with `DeviceCards/Bodies/CompressorDeviceBody.cs`-- [ ] T055 [P] [US6] `Controls/DelayViews.cs` (`DelayTaps` host, `DelayFader` attach, `DelayFilterCurve` low cut → high cut) with `DeviceCards/Bodies/DelayDeviceBody.cs`-- [ ] T056 [P] [US6] `Controls/ChorusViews.cs`, `Controls/FlangerViews.cs`, `Controls/PhaserViews.cs`, `Controls/OrbitViews.cs` hosts / attaches with their bodies (`ChorusDeviceBody.cs`, `FlangerDeviceBody.cs`, `PhaserDeviceBody.cs`, `AutoPanDeviceBody.cs` for Orbit)-- [ ] T057 [P] [US6] `Controls/CrushViews.cs`, `Controls/LevelViews.cs`, `Controls/LensViews.cs` (`LensVSlider`), `Controls/ShutterViews.cs` (`ShSignalView`, `ShKeyView`), `Controls/ReverbViews.cs`, `Controls/VintageViews.cs`, `Controls/VocoderGraph.cs` — the rows the audit marks H/A, with their bodies-- [ ] T058 [P] [US6] Instrument graphs: `Controls/VoltFilter.cs` (cutoff → resonance), `Controls/SynthViz.cs` Filter pad (X → Y), `Controls/FluxVectorPad.cs` (X → Y), `Controls/KeysViews.cs` (`KeysPickupView`, `KeysTremView`), `Controls/GrainWaveViz.cs`, `Controls/RhythmViews.cs` (`RhythmHitView`, `RhythmSampleView`), `Controls/ChordShiftTrack.cs`, `DeviceCards/Sampler/SamplerViews.cs`, `DeviceCards/Mosaic/MosaicViews.cs` — per audit-- [ ] T059 [US6] `Controls/RangeSliderTrack.cs` in `DeviceCards/Midi/VelocityMidiBody.cs`: host with low / high fields+- [X] T051 [P] [US6] `Controls/Eq8Views.cs` (`Eq8Curve`) and `Controls/DynamicEqCurve.cs`: host — band handle → frequency, gain, Q; `FieldsAt` null off a handle (keeps add-band double-click); owners `DeviceCards/Bodies/EqDeviceBody.cs` / `DynamicEqDeviceBody.cs` pass formatters and gestures+- [X] T052 [P] [US6] `Controls/Eq3Views.cs` (`Eq3Fader` attach, `Eq3Graph` host) with `DeviceCards/Bodies/Eq3DeviceBody.cs`+- [X] T053 [P] [US6] `Controls/AutoFilterCurve.cs` (cutoff → resonance), `Controls/AutoFilterViews.cs` (`AfFader` attach, `AfLfoView` host) with `DeviceCards/Bodies/AutoFilterDeviceBody.cs`+- [X] T054 [P] [US6] `Controls/CompViews.cs` (`CompFader` attach, `CompTransferView` threshold, `CompMotionView`, `CompKeyView` hosts) with `DeviceCards/Bodies/CompressorDeviceBody.cs`+- [X] T055 [P] [US6] `Controls/DelayViews.cs` (`DelayTaps` host, `DelayFader` attach, `DelayFilterCurve` low cut → high cut) with `DeviceCards/Bodies/DelayDeviceBody.cs`+- [X] T056 [P] [US6] `Controls/ChorusViews.cs`, `Controls/FlangerViews.cs`, `Controls/PhaserViews.cs`, `Controls/OrbitViews.cs` hosts / attaches with their bodies (`ChorusDeviceBody.cs`, `FlangerDeviceBody.cs`, `PhaserDeviceBody.cs`, `AutoPanDeviceBody.cs` for Orbit)+- [X] T057 [P] [US6] `Controls/CrushViews.cs`, `Controls/LevelViews.cs`, `Controls/LensViews.cs` (`LensVSlider`), `Controls/ShutterViews.cs` (`ShSignalView`, `ShKeyView`), `Controls/ReverbViews.cs`, `Controls/VintageViews.cs`, `Controls/VocoderGraph.cs` — the rows the audit marks H/A, with their bodies+- [X] T058 [P] [US6] Instrument graphs: `Controls/VoltFilter.cs` (cutoff → resonance), `Controls/SynthViz.cs` Filter pad (X → Y), `Controls/FluxVectorPad.cs` (X → Y), `Controls/KeysViews.cs` (`KeysPickupView`, `KeysTremView`), `Controls/GrainWaveViz.cs`, `Controls/RhythmViews.cs` (`RhythmHitView`, `RhythmSampleView`), `Controls/ChordShiftTrack.cs`, `DeviceCards/Sampler/SamplerViews.cs`, `DeviceCards/Mosaic/MosaicViews.cs` — per audit+- [X] T059 [US6] `Controls/RangeSliderTrack.cs` in `DeviceCards/Midi/VelocityMidiBody.cs`: host with low / high fields+- [X] T059a [US6] Interim controls from control-audit.md § 6 (they reset on ⌥ until now): `ShDragView : IValueHandles` for Ceiling / Forge / Beat Repeat / Crush views, Chamber (fader, IR trims, decay markers, tail EQ), Prism (crossovers, transfer dots, value boxes), the output / value boxes of EQ-8, Dynamic EQ, EQ-3, Auto Gain, Forge, Chord, Scale, Arp, Consort cable depth, the drum-pad pan, Mosaic curves, the Stereo Map handles---@@ -170,9 +171,9 @@ All app paths are under `src/managed/Nota.App/` unless they start with `tests/`,- [X] T060 [P] DESIGN.md § Controls → Interaction contract: "Double-click types a value (a flat field over the read-out); ⌥/Alt-click restores the default; right-click opens the parameter menu (Type value…, Reset to default) merged with CV-modulate / MIDI Learn where present"; `DragNumber` row; remove the "Slider reset on double-click…" known-gap line (PR 1)- [X] T061 [P] Preferences → Shortcuts in `PreferencesWindow.cs` via the `nota-shortcuts` skill: add "Double-click a knob, fader, slider or graph handle — type a value", "⌥-click — reset to default", "In the value field: Enter / Tab / ⇧Tab / Esc"; change "Double-click volume" (preview) and the clip ADSR handle row ("double-click resets the stage" → ⌥-click) (PR 1, extended in PR 2)- [X] T062 `CHANGELOG.md` `[Unreleased]`: Added — type exact values into every parameter control; Changed — double-click on knobs / faders / sliders now types a value, ⌥-click resets; Fixed — clearing a Volt mod-matrix cell is undoable (PR 1 / PR 2 entries)-- [ ] T063 FEATURES.md via `nota-features`; user docs EN + RU in `../nota-docs` via `nota-docs` (device-card basics, mixer, envelopes, mod matrix pages)-- [ ] T064 Tick every row of `specs/035-typed-value-entry/contracts/control-audit.md` (☑ or exempt with reason)-- [ ] T065 Run quickstart.md § 2 in the app in every colour theme (Studio Dark / Light, Ember Graphite / Paper); capture before/after screenshots of the box for the PR (`nota-pr`)+- [X] T063 FEATURES.md via `nota-features`; user docs EN + RU in `../nota-docs` via `nota-docs` (device-card basics, mixer, envelopes, mod matrix pages) — FEATURES "Typed values" extended; docs: devices (card basics), editing/audio-clips (ADSR), devices/instruments/volt (matrix), EN + RU; the shortcuts page is regenerated after merge (pending in nota-docs coverage.yml)+- [X] T064 Tick every row of `specs/035-typed-value-entry/contracts/control-audit.md` (☑ or exempt with reason)+- [X] T065 Run quickstart.md § 2 in the app in every colour theme (Studio Dark / Light, Ember Graphite / Paper); capture before/after screenshots of the box for the PR (`nota-pr`) — PR 2/3: headless harness (/tmp/typedharness) ⌥-clicks EQ-8, Compressor, Auto Filter, EQ-3, Volt env and Volt matrix handles in all four themes, types a value, Return: 24/24 change the right parameter; frames of the open box in each theme- [ ] T066 `/speckit-converge` until **Converged**### Nota closing tasks *(PR gates)*@@ -254,3 +255,11 @@ Phase 8, T063–T066, final build. Until PR 2 lands, a Volt matrix double-click- Do not commit: the maintainer reviews and commits (see project memory).- Keep the Studio box look identical everywhere — the design checks (`RunControls`, `RunMenus`) must stay green.- When a graph control already has a "nearest handle" hit test for dragging, reuse it for `FieldsAt`.++## Phase 10: Convergence++- [X] T071 Make the Stereo Map volume reset reachable again — the handle's menu **Reset to default** must also offer 0 dB volume (e.g. a menu-only reset on the volume field that a double-click does not trigger) in `StereoMapView.cs` / `Controls/ValueEntry.cs` per SC-005 (partial)+- [X] T072 Make a handle's multi-field reset (double-click / menu on AutoFilter curve, Compressor transfer, Flanger / Phaser / Orbit graphs, Crush quant, Volt env D·S node) one undo step instead of one per field in `Controls/ValueEntry.cs` per FR-009 (partial)+- [X] T073 Add typeable A · D · S · R read-outs beside the Physical noise envelope (it has only a summary line) in `DeviceCards/Instruments/PhysicalInstrumentCard.cs` per FR-013 (partial)+- [X] T074 Record the #274 gesture swap (⌥/Alt-click types, double-click resets / clears) in `spec.md` FR-002, FR-009, FR-012, FR-014, FR-015, FR-018 and the user stories, so the spec matches the shipped behaviour per FR-002 (contradicts)+- [ ] T075 Regenerate `reference/shortcuts` (EN + RU) in `../nota-docs` with `npm run shortcuts` once this branch merges, and drop the pending entry from `coverage.yml` per FR-018 (partial)diff --git a/src/managed/Nota.App/ArrangementView.LaneControl.cs b/src/managed/Nota.App/ArrangementView.LaneControl.csindex 33f8f969..81a9370e 100644--- a/src/managed/Nota.App/ArrangementView.LaneControl.cs+++ b/src/managed/Nota.App/ArrangementView.LaneControl.cs@@ -20,7 +20,7 @@ namespace Nota.App;public sealed partial class ArrangementView{// ---- lanes ------------------------------------------------------------- private sealed class LaneControl : Control, IAutoRows+ private sealed class LaneControl : Control, IAutoRows, IValueEntryHost{private readonly ArrangementView _o;private readonly AutoEditor _auto; // automation mode (M9-A3), shared with the footer's return rows@@ -29,8 +29,40 @@ public sealed partial class ArrangementView_o = o;ClipToBounds = true;_auto = new AutoEditor(o, this);+ ValueEntry.AttachHost(this, menu: false); // the right-press below shows the menu}+ // ⌥-click an audio clip's ADSR handle to type its stage (specs/035); one engine edit each.+ // The clip is found again by id on every read: a commit reloads the lane's clips.+ public IReadOnlyList<ValueField>? FieldsAt(Point p)+ {+ if (_o._automationMode || HitAdsr(p) is not { } ah) return null;+ int trackId = ah.track.Id, index = ah.clip.ClipIndex;+ ClipVM? Clip() => _o._tracks.FirstOrDefault(t => t.Id == trackId)?.Clips.FirstOrDefault(c => c.ClipIndex == index);+ var fs = ClipAdsrKit.Fields(ah.handle, () => Clip()?.Adsr ?? ah.clip.Adsr,+ a => { if (Clip() is { } c) CommitAdsr(trackId, c, a); }, ah.clip.LengthBeats, () => _o._engine?.Bpm ?? 120);+ _adsrFields = (trackId, index, ah.handle, fs);+ return fs;+ }+ private (int track, int clip, AdsrHandle handle, IReadOnlyList<ValueField> fields)? _adsrFields; // the handle last asked about++ public Rect AnchorOf(ValueField field)+ {+ if (_adsrFields is not { } af) return default;+ int row = _o._tracks.FindIndex(t => t.Id == af.track);+ if (row < 0 || _o._tracks[row].Clips.FirstOrDefault(c => c.ClipIndex == af.clip) is not { } clip) return default;+ var f = AdsrFrameOf(clip, row); var a = clip.Adsr.Fit(clip.LengthBeats);+ var at = af.handle switch+ {+ AdsrHandle.Attack => ClipAdsrKit.AttackPt(f, a),+ AdsrHandle.Release => ClipAdsrKit.ReleasePt(f, a),+ _ => ClipAdsrKit.DecayPt(f, a),+ };+ return ValueEntry.Near(at, Bounds.Size);+ }++ public IReadOnlyList<ValueField> AllFields => _adsrFields?.fields ?? [];+// The scrolling track rows, as the automation editor sees them.Control IAutoRows.Owner => this;int IAutoRows.RowAtY(double y) => _o.RowAtY(y);@@ -205,7 +237,8 @@ public sealed partial class ArrangementViewif (pt.Properties.IsRightButtonPressed){- if (hit is { } h) ShowClipMenu(h.track.Id, h.clip, beat);+ if (FieldsAt(pt.Position) is { Count: > 0 } adsr) ValueEntry.ShowMenu(this, adsr);+ else if (hit is { } h) ShowClipMenu(h.track.Id, h.clip, beat);else ShowLaneMenu(pt.Position, beat);return;}diff --git a/src/managed/Nota.App/ClipAdsrKit.cs b/src/managed/Nota.App/ClipAdsrKit.csindex 1ee85d3e..2bfa53ef 100644--- a/src/managed/Nota.App/ClipAdsrKit.cs+++ b/src/managed/Nota.App/ClipAdsrKit.cs@@ -8,7 +8,7 @@// Release — a square on the sustain line at len−R (drag sideways).// At the identity (0, 0, 1, 0) the attack square and the D·S dot share the top-left corner:// the first move decides — sideways grabs the attack, up/down grabs the sustain.-// Double-click on a handle resets its stage.+// Double-click on a handle resets its stage; ⌥-click types its values (specs/035).using System;using System.Collections.Generic;@@ -153,5 +153,43 @@ internal static class ClipAdsrKit};}+ /// <summary>The typeable values of handle <paramref name="h"/> (decay then sustain on the D·S dot).+ /// Positions run over the room the other stages leave, so any typed time fits the clip.+ /// <paramref name="commit"/> writes one ADSR (one undo step); a double-click's reset is one+ /// commit too, carried by the handle's first field.</summary>+ public static IReadOnlyList<ValueField> Fields(AdsrHandle h, Func<ClipAdsr> get, Action<ClipAdsr> commit, double len, Func<double> bpm)+ {+ string T(double beats) => NotaNum.Time(beats * 60.0 / Math.Max(1, bpm()));+ ClipAdsr A() => get().Fit(len);+ double Room(Func<ClipAdsr, double> others) => Math.Max(0, len - others(A()));+ ValueField Time(string name, Func<ClipAdsr, double> others, Func<ClipAdsr, double> read, Func<ClipAdsr, double, ClipAdsr> write, AdsrHandle stage)+ => new(name,+ () => Room(others) is var r && r > 0 ? Math.Clamp(read(A()) / r, 0, 1) : 0,+ n => T(n * Room(others)),+ n => commit(write(A(), n * Room(others))))+ { Reset = () => commit(Reset(stage, A())) };+ var list = new List<ValueField>(2);+ switch (h)+ {+ case AdsrHandle.Attack:+ list.Add(Time("Attack", a => a.DecayBeats + a.ReleaseBeats, a => a.AttackBeats, (a, b) => { a.AttackBeats = b; return a; }, AdsrHandle.Attack));+ break;+ case AdsrHandle.DecaySustain:+ list.Add(Time("Decay", a => a.AttackBeats + a.ReleaseBeats, a => a.DecayBeats, (a, b) => { a.DecayBeats = b; return a; }, AdsrHandle.DecaySustain));+ list.Add(new ValueField("Sustain", () => A().Sustain, SustainText, n => { var a = A(); a.Sustain = (float)n; commit(a); }));+ break;+ case AdsrHandle.AttackOrSustain: // the shared corner: attack, decay and sustain; one combined reset+ list.Add(Time("Attack", a => a.DecayBeats + a.ReleaseBeats, a => a.AttackBeats, (a, b) => { a.AttackBeats = b; return a; }, AdsrHandle.AttackOrSustain));+ list.Add(Time("Decay", a => a.AttackBeats + a.ReleaseBeats, a => a.DecayBeats, (a, b) => { a.DecayBeats = b; return a; }, AdsrHandle.DecaySustain)+ with { Reset = null });+ list.Add(new ValueField("Sustain", () => A().Sustain, SustainText, n => { var a = A(); a.Sustain = (float)n; commit(a); }));+ break;+ case AdsrHandle.Release:+ list.Add(Time("Release", a => a.AttackBeats + a.DecayBeats, a => a.ReleaseBeats, (a, b) => { a.ReleaseBeats = b; return a; }, AdsrHandle.Release));+ break;+ }+ return list;+ }+public static string SustainText(double s) => NotaNum.Db(s <= 0.0011 ? double.NegativeInfinity : AudioMath.LinToDb(s));}diff --git a/src/managed/Nota.App/Controls/ChamberViews.cs b/src/managed/Nota.App/Controls/ChamberViews.csindex 94e5de5c..5a5806d1 100644--- a/src/managed/Nota.App/Controls/ChamberViews.cs+++ b/src/managed/Nota.App/Controls/ChamberViews.cs@@ -113,7 +113,7 @@ internal sealed class ChamberFader : Control// The IR: a peak envelope of the source (left / LL above the centre line in neutral ink, right / RR// below in teal), veiled outside the Start … Decay window. Drag a trim line to move it,// double-click to reset both. Drop an audio file (Finder or the browser) to load it.-internal sealed class ChamberIrView : Control+internal sealed class ChamberIrView : Control, IValueHandles{private float[] _l = Array.Empty<float>(), _r = Array.Empty<float>();private double _sec, _start, _end = 1, _attackSec;@@ -171,6 +171,11 @@ internal sealed class ChamberIrView : Controlelse _end = Math.Max(f, Math.Max(0.05, _start + 0.02));TrimChanged?.Invoke(_start, _end); InvalidateVisual();}+ // Typed entry (specs/035): handle 0 = the start trim, 1 = the decay trim (source lane only).+ public int HandleAt(Point p)+ => _empty != null || p.Y > Bounds.Height * SourceShare ? -1 : Math.Abs(p.X - X(_start)) <= Math.Abs(p.X - X(_end)) ? 0 : 1;+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point(X(handle == 0 ? _start : _end), 0), Bounds.Size);+protected override void OnPointerPressed(PointerPressedEventArgs e){base.OnPointerPressed(e);@@ -326,7 +331,7 @@ internal sealed class ChamberIrView : Control// DECAY PER BAND: the energy decay (dB, straight lines) of the low / mid / high bands after the// pre-delay, each ending at its RT60 on the time axis. Drag a band's end marker to set its RT60// (mid = Decay; low / high are stored relative to it).-internal sealed class ChamberDecayGraph : Control+internal sealed class ChamberDecayGraph : Control, IValueHandles{private double _pre, _tmax = 4;private readonly double[] _rt = { 3, 3, 1.5 };@@ -363,6 +368,16 @@ internal sealed class ChamberDecayGraph : Controlprivate double X(double t) => Pad + t / _tmax * (Bounds.Width - 2 * Pad);private double T(double x) => (x - Pad) / Math.Max(1, Bounds.Width - 2 * Pad) * _tmax;+ // Typed entry (specs/035): handle b = band b's marker (low · mid · high), the nearest one.+ public int HandleAt(Point p)+ {+ if (_freeze) return -1;+ int hb = -1; double best = double.MaxValue;+ for (int b = 0; b < 3; b++) { double d = Math.Abs(p.X - X(_pre + _rt[b])); if (d < best) { best = d; hb = b; } }+ return hb;+ }+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point(X(_pre + _rt[handle]), Top), Bounds.Size);+protected override void OnPointerPressed(PointerPressedEventArgs e){base.OnPointerPressed(e);@@ -463,7 +478,7 @@ internal sealed class ChamberDecayGraph : Control// TAIL EQ response (log 30 Hz … 18 kHz, ±20 dB): low cut + low shelf, high shelf + high cut// (the same RBJ biquads the engine runs). Handle 0 (neutral ink) = low cut (X) + low shelf gain (Y);// handle 1 = high cut (X) + high shelf gain (Y).-internal sealed class ChamberEqCurve : Control+internal sealed class ChamberEqCurve : Control, IValueHandles{private double _lc, _lg = 0.5, _hs = 0.5, _hc = 1;private int _drag = -1;@@ -491,9 +506,16 @@ internal sealed class ChamberEqCurve : Controlif (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;var p = e.GetPosition(this);double d0 = Dist(p, X(LowCutHz(_lc)), Y((_lg - 0.5) * 36)), d1 = Dist(p, X(HighCutHz(_hc)), Y((_hs - 0.5) * 36));+_drag = d0 <= d1 ? 0 : 1;DragStarted?.Invoke(_drag); e.Pointer.Capture(this); OnPointerMoved(e); e.Handled = true;}+ // Typed entry (specs/035): handle 0 = low cut + low shelf, 1 = high cut + high shelf (the nearer).+ public int HandleAt(Point p)+ => Dist(p, X(LowCutHz(_lc)), Y((_lg - 0.5) * 36)) <= Dist(p, X(HighCutHz(_hc)), Y((_hs - 0.5) * 36)) ? 0 : 1;+ public Rect HandleRect(int handle) => ValueEntry.Near(handle == 0 ? new Point(X(LowCutHz(_lc)), Y((_lg - 0.5) * 36))+ : new Point(X(HighCutHz(_hc)), Y((_hs - 0.5) * 36)), Bounds.Size);+private static double Dist(Point p, double x, double y) => Math.Sqrt((p.X - x) * (p.X - x) + (p.Y - y) * (p.Y - y));protected override void OnPointerMoved(PointerEventArgs e){diff --git a/src/managed/Nota.App/Controls/CompViews.cs b/src/managed/Nota.App/Controls/CompViews.csindex deea0c0f..9f06e822 100644--- a/src/managed/Nota.App/Controls/CompViews.cs+++ b/src/managed/Nota.App/Controls/CompViews.cs@@ -6,7 +6,8 @@// gain-reduction history, the Motion envelope (reduction against the input, at a time scale// where attack and release can be read) and the sidechain key spectrum with its filters// (drag the HP / LP handles; up/down sets Q). They draw what the card hands them and own-// no engine state — every edit goes out through events.+// no engine state — every edit goes out through events; ⌥-click a fader, the transfer curve+// or a key handle to type its values (the card supplies the fields, specs/035).using System;using System.Collections.Generic;@@ -383,7 +384,7 @@ internal sealed class CompMotionView : Control// laid over it (teal dashed — the 2-pole HP × LP response with its Q). Drag a handle// sideways to move its corner, up / down to change Q; double-click opens that filter.// Framed in accent while Listen is on (the key is what you hear).-internal sealed class CompKeyView : Control+internal sealed class CompKeyView : Control, IValueHandles{private const int FftN = 2048, Bins = FftN / 2;private const double FMin = 20, FMax = 20000;@@ -452,6 +453,10 @@ internal sealed class CompKeyView : Controlprivate static double HzOf(double x, double w) => FMin * Math.Pow(FMax / FMin, Math.Clamp(x / Math.Max(1, w), 0, 1));private int Nearest(double x) => Math.Abs(x - XOf(_hp, Bounds.Width)) <= Math.Abs(x - XOf(_lp, Bounds.Width)) ? 1 : 2;+ // Typed entry: handle 0 = HP, 1 = LP (the nearer one, as a drag picks it).+ public int HandleAt(Point p) => Nearest(p.X) - 1;+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point(XOf(handle == 0 ? _hp : _lp, Bounds.Width), 14), Bounds.Size);+protected override void OnPointerPressed(PointerPressedEventArgs e){base.OnPointerPressed(e);diff --git a/src/managed/Nota.App/Controls/ConsortViews.cs b/src/managed/Nota.App/Controls/ConsortViews.csindex 65a4146d..fb59443e 100644--- a/src/managed/Nota.App/Controls/ConsortViews.cs+++ b/src/managed/Nota.App/Controls/ConsortViews.cs@@ -651,7 +651,9 @@ internal sealed class ConsortJackField : Control}// ---- source × destination matrix: rows = sources, columns = destinations, cell = depth -----internal sealed class ConsortPatchMatrix : Control+// Drag a cell for its depth (an empty one gets a cable); ⌥-click types it (−100…+100 %),+// double-click or the menu's Clear pulls the cable (specs/035).+internal sealed class ConsortPatchMatrix : Control, IValueEntryHost{private static readonly Typeface Mono = NotaFonts.Mono;private static readonly Typeface Sans = NotaFonts.Sans;@@ -668,7 +670,52 @@ internal sealed class ConsortPatchMatrix : Controlpublic event Action<int, int>? GestureEnd;public event Action<bool, int, Rect>? HeaderClicked; // (isRow, index, rect)- public ConsortPatchMatrix() { ClipToBounds = true; Cursor = new Cursor(StandardCursorType.Hand); }+ public ConsortPatchMatrix() { ClipToBounds = true; Cursor = new Cursor(StandardCursorType.Hand); ValueEntry.AttachHost(this); }++ // ---- typed entry ------------------------------------------------------------+ private readonly Dictionary<(int s, int d), ValueField> _fields = new();++ private ValueField FieldOf(int s, int d) => _fields.TryGetValue((s, d), out var f) ? f : _fields[(s, d)] =+ new ValueField($"{ConsortJacks.Src(s).Name} → {ConsortJacks.Dst(d).Name}", () => ((Find(s, d)?.Depth ?? 0) + 1) / 2,+ n => NotaNum.F($"{(n * 2 - 1) * 100:+0;−0;0}\u2009%"),+ n => DepthChanged?.Invoke(s, d, (float)Math.Round((Math.Clamp(n, 0, 1) * 2 - 1) * 100) / 100f),+ () => GestureBegin?.Invoke(s, d), () => GestureEnd?.Invoke(s, d))+ {+ Clear = () => { if (Find(s, d) != null) Removed?.Invoke(s, d); },+ After = InvalidateVisual,+ };++ private (int r, int c) CellAt(Point p)+ {+ if (p.X < RowHdrW || p.Y < HeadH || RowH <= 0 || ColW <= 0) return (-1, -1);+ int r = (int)((p.Y - HeadH) / RowH), c = (int)((p.X - RowHdrW) / ColW);+ return r < _rows.Length && c < _cols.Length ? (r, c) : (-1, -1);+ }++ public IReadOnlyList<ValueField>? FieldsAt(Point p)+ => CellAt(p) is var (r, c) && r >= 0 ? [FieldOf(_rows[r], _cols[c])] : null;++ public Rect AnchorOf(ValueField field)+ {+ for (int r = 0; r < _rows.Length; r++)+ for (int c = 0; c < _cols.Length; c++)+ if (_fields.TryGetValue((_rows[r], _cols[c]), out var f) && ReferenceEquals(f, field))+ return new Rect(RowHdrW + c * ColW + 2, HeadH + r * RowH + 3, ColW - 4, RowH - 6);+ return default;+ }++ // Tab walks the cables on screen, row by row.+ public IReadOnlyList<ValueField> AllFields+ {+ get+ {+ var list = new List<ValueField>();+ for (int r = 0; r < _rows.Length; r++)+ for (int c = 0; c < _cols.Length; c++)+ if (Find(_rows[r], _cols[c]) != null) list.Add(FieldOf(_rows[r], _cols[c]));+ return list;+ }+ }public void Set(int[] rows, int[] cols, IReadOnlyList<ConsortCable> cables) { _rows = rows; _cols = cols; _cables = cables; InvalidateVisual(); }private double RowH => _rows.Length == 0 ? 0 : (Bounds.Height - HeadH) / _rows.Length;@@ -688,7 +735,6 @@ internal sealed class ConsortPatchMatrix : Controlif (ri < 0 || ri >= _rows.Length || ci < 0 || ci >= _cols.Length) return;int s = _rows[ri], d = _cols[ci];var cur = Find(s, d);- if ((e.KeyModifiers & KeyModifiers.Alt) != 0 || (e.ClickCount == 2 && cur != null)) { Removed?.Invoke(s, d); e.Handled = true; return; }_drag = (ri, ci); _dragY = p.Y; _dragV = cur?.Depth ?? 0;GestureBegin?.Invoke(s, d);if (cur == null) { _dragV = 0.5; DepthChanged?.Invoke(s, d, 0.5f); }diff --git a/src/managed/Nota.App/Controls/DelayViews.cs b/src/managed/Nota.App/Controls/DelayViews.csindex 1c40ad8d..eed91877 100644--- a/src/managed/Nota.App/Controls/DelayViews.cs+++ b/src/managed/Nota.App/Controls/DelayViews.cs@@ -4,7 +4,8 @@// The custom-drawn views of the Nota Delay card: the repeat window (the echo train per// channel, L in neutral ink above the axis and R in rose below, the sounding repeat lit in accent),// the Loop column's vertical faders, and the feedback tone graph (low cut / high cut, dragged-// by its handles). They draw what the card hands them and own no engine state.+// by its handles). They draw what the card hands them and own no engine state; ⌥-click a+// fader or a tone handle to type its value (the card supplies the field, specs/035).using System;using System.Globalization;@@ -184,7 +185,7 @@ internal sealed class DelayFader : Control// The feedback tone: the band the repeats live in, between the low cut and the high cut.// Drag either handle horizontally to move its corner; double-click opens the band wide again.-internal sealed class DelayFilterCurve : Control+internal sealed class DelayFilterCurve : Control, IValueHandles{private const double FMin = 20, FMax = 20000;@@ -218,6 +219,10 @@ internal sealed class DelayFilterCurve : Controlprivate int NearestHandle(double x, double w)=> Math.Abs(x - XOf(_lowHz, w)) <= Math.Abs(x - XOf(_highHz, w)) ? 1 : 2;+ // Typed entry: handle 0 = low cut, 1 = high cut (the nearer one, as a drag picks it).+ public int HandleAt(Point p) => NearestHandle(p.X, Bounds.Width) - 1;+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point(XOf(handle == 0 ? _lowHz : _highHz, Bounds.Width), 10), Bounds.Size);+private void Apply(PointerEventArgs e){double w = Bounds.Width; if (w <= 4 || _drag == 0) return;diff --git a/src/managed/Nota.App/Controls/DynamicEqCurve.cs b/src/managed/Nota.App/Controls/DynamicEqCurve.csindex 968e7869..e8ab6779 100644--- a/src/managed/Nota.App/Controls/DynamicEqCurve.cs+++ b/src/managed/Nota.App/Controls/DynamicEqCurve.cs@@ -12,11 +12,13 @@// A tooltip beside the selected node reads the band, and for a dynamic band its gain now with// a 2-second history of it.//-// Drag a node — frequency and gain; the wheel over a node — Q; double-click a node turns the-// band on / off, double-click empty space switches on a free band there as a bell;-// right-click a node — type, mode, on and solo. The magnitude maths mirrors DynamicEq.h.+// Drag a node — frequency and gain; the wheel over a node — Q; ⌥-click a node types its+// frequency, gain and Q (Tab between them); double-click a node turns the band on / off,+// double-click empty space switches on a free band there as a bell; right-click a node —+// type, mode, on, solo and Type value…. The magnitude maths mirrors DynamicEq.h.using System;+using System.Collections.Generic;using System.Globalization;using Avalonia;using Avalonia.Controls;@@ -49,6 +51,24 @@ internal static class DynEqpublic static bool HasGain(int type) => type is LowShelf or Bell or HighShelf;public static int P(int band, int field) => band * PerBand + field;+ /// <summary>A band node's typeable values — frequency, gain (shelves and bells), Q — over the+ /// raw-unit parameters <paramref name="freqP"/> / <paramref name="gainP"/> / <paramref name="qP"/>+ /// (EQ-8 and Dynamic EQ share it, specs/035). No default: a double-click on a node keeps+ /// switching the band on / off.</summary>+ public static ValueField[] BandFields(IAudioEngine e, int track, int device, int band, int freqP, int gainP, int qP, bool hasGain, Action after)+ {+ ValueField F(string name, int p, Func<double, double> toN, Func<double, double> fromN, Func<double, string> text) => new(+ NotaNum.F($"Band {band + 1} · {name}"), () => toN(e.DeviceGetParam(track, device, p)), n => text(fromN(n)),+ n => e.DeviceSetParam(track, device, p, (float)fromN(Math.Clamp(n, 0, 1))),+ () => e.BeginAutomationWrite(track, AutomationTarget.DeviceParam, device, p, ""),+ () => e.EndAutomationWrite(track, AutomationTarget.DeviceParam, device, p, "")) { After = after };+ var freq = F("Frequency", freqP, FreqToN, NToFreq, Hz);+ var q = F("Q", qP, v => Math.Log(Math.Clamp(v, 0.1, 18) / 0.1) / Math.Log(180), n => 0.1 * Math.Pow(180, n), v => NotaNum.F($"{v:0.00}"));+ return hasGain+ ? [freq, F("Gain", gainP, g => (Math.Clamp(g, -18, 18) + 18) / 36, n => n * 36 - 18, g => Db(g) + "\u2009dB"), q]+ : [freq, q];+ }+public static double FreqToN(double f) => Math.Log(Math.Clamp(f, Fmin, Fmax) / Fmin) / Math.Log(Fmax / Fmin);public static double NToFreq(double n) => Fmin * Math.Pow(Fmax / Fmin, Math.Clamp(n, 0, 1));/// <summary>Gain → 0..1 from the top: ±18 dB span 5 % … 95 % of the height (the mockup's yF).</summary>@@ -101,7 +121,7 @@ internal static class DynEq}}-public sealed class DynamicEqCurve : Control+public sealed class DynamicEqCurve : Control, IValueEntryHost{public const int HistLen = 120; // 2 s at 60 Hzprivate const int Pts = 150;@@ -133,6 +153,7 @@ public sealed class DynamicEqCurve : Controlpublic DynamicEqCurve(IAudioEngine engine, int track, int device){+ ValueEntry.AttachHost(this, menu: false); // the band menu carries Type value…_engine = engine; _track = track; _device = device;ClipToBounds = true;MinHeight = 60;@@ -163,6 +184,36 @@ public sealed class DynamicEqCurve : Control}// ---- params ----+ // ---- typed entry (specs/035): a node's frequency, gain and Q ----+ // Cached per band (rebuilt when the band gains or loses its gain value): Tab finds the open+ // field by reference, so every read must hand out the same objects.+ private readonly (bool gain, ValueField[] fields)?[] _bandFields = new (bool, ValueField[])?[DynEq.Bands];+ private ValueField[] BandFields(int b)+ {+ bool g = DynEq.HasGain(BandType(b));+ if (_bandFields[b] is { } c && c.gain == g) return c.fields;+ var fs = DynEq.BandFields(_engine, _track, _device, b, DynEq.P(b, DynEq.FreqF), DynEq.P(b, DynEq.GainF),+ DynEq.P(b, DynEq.QF), g, () => { Edited?.Invoke(); InvalidateVisual(); });+ _bandFields[b] = (g, fs);+ return fs;+ }+ IReadOnlyList<ValueField>? IValueEntryHost.FieldsAt(Point p) => Hit(p) is var b and >= 0 ? BandFields(b) : null;+ Rect IValueEntryHost.AnchorOf(ValueField field)+ {+ for (int b = 0; b < DynEq.Bands; b++)+ if (field.Name.StartsWith(NotaNum.F($"Band {b + 1} "), StringComparison.Ordinal)) return ValueEntry.Near(NodeAt(b), Bounds.Size);+ return default;+ }+ IReadOnlyList<ValueField> IValueEntryHost.AllFields+ {+ get+ {+ var list = new List<ValueField>();+ for (int b = 0; b < DynEq.Bands; b++) if (BandOn(b)) list.AddRange(BandFields(b));+ return list;+ }+ }+private float P(int band, int field) => _engine.DeviceGetParam(_track, _device, DynEq.P(band, field));private void SetP(int band, int field, double v) => _engine.DeviceSetParam(_track, _device, DynEq.P(band, field), (float)v);private void Gesture(int p, Action a)@@ -333,6 +384,8 @@ public sealed class DynamicEqCurve : ControlEdited?.Invoke(); InvalidateVisual();};fly.Items.Add(solo);+ fly.Items.Add(new Separator());+ fly.Items.Add(MenuKit.Item("Type value…", GlyphKind.Edit, () => ValueEntry.Open(this, BandFields(b)[0])));fly.ShowAt(this, showAtPointer: true);}diff --git a/src/managed/Nota.App/Controls/Eq3Views.cs b/src/managed/Nota.App/Controls/Eq3Views.csindex 2f1bd306..d519ceac 100644--- a/src/managed/Nota.App/Controls/Eq3Views.cs+++ b/src/managed/Nota.App/Controls/Eq3Views.cs@@ -5,12 +5,12 @@// · Eq3Fader — a band's gain fader: a sunken slot, a fill from 0 dB to the value in the band's// hue, the range's ends and 0 dB marked, a 22 × 9 cap. Vertical drag (relative — a click never// jumps), 0.5 dB steps with a 0 dB detent; Shift / Ctrl / ⌘ for fine 0.1 dB steps;-// double-click resets (0 dB, and the kill off).+// double-click resets (0 dB, and the kill off); ⌥-click types the gain.// · Eq3Graph — the response window: the output spectrum (engine FFT) behind, each band's own// curve thin in its hue, the sum in neutral ink, the two crossovers as dashed lines with handles// along the top that drag left / right (the low/mid one held to at most half the mid/high// one). A drag anywhere else in a band's zone rides that band's gain up / down; double-click-// a handle or a zone to reset it.+// a handle or a zone to reset it, ⌥-click it to type the crossover / the band's gain.// Eq3Math mirrors Eq3.h (Linkwitz-Riley tree, the low band's allpass) so the curves are the DSP.using System;@@ -176,7 +176,7 @@ internal sealed class Eq3Fader : Control}}-internal sealed class Eq3Graph : Control+internal sealed class Eq3Graph : Control, IValueHandles{private readonly double[] _db = new double[3];private readonly bool[] _kill = new bool[3];@@ -241,6 +241,17 @@ internal sealed class Eq3Graph : Controlreturn f < _f1 ? 0 : f < _f2 ? 1 : 2;}+ // Typed entry: handles 0 / 1 are the crossovers (the box over the handle), 2…4 the bands' zones.+ public int HandleAt(Point p) => HitHandle(p) is var h and >= 0 ? h : 2 + ZoneAt(p.X);+ public Rect HandleRect(int handle)+ {+ if (handle < 2) return Handle(handle, out _);+ int b = handle - 2;+ double lo = b == 0 ? Eq3Math.FMin : b == 1 ? _f1 : _f2, hi = b == 0 ? _f1 : b == 1 ? _f2 : Eq3Math.FMax;+ double x = Eq3Math.X(Math.Sqrt(lo * hi)) * Bounds.Width;+ return ValueEntry.Near(new Point(x, Y(_db[b], Bounds.Height)), Bounds.Size);+ }+protected override void OnPointerExited(PointerEventArgs e) { base.OnPointerExited(e); if (_hover != -1) { _hover = -1; InvalidateVisual(); } }protected override void OnPointerPressed(PointerPressedEventArgs e)diff --git a/src/managed/Nota.App/Controls/Eq8Views.cs b/src/managed/Nota.App/Controls/Eq8Views.csindex c87c6e38..48594c28 100644--- a/src/managed/Nota.App/Controls/Eq8Views.cs+++ b/src/managed/Nota.App/Controls/Eq8Views.cs@@ -12,9 +12,10 @@// a Side band teal, the rest Ink 3, an off band Ink 6; a Mid band wears a neutral ring and a// left / right band a rose one. A tooltip beside the selected node reads the band.//-// Drag a node — frequency and gain; the wheel over a node — Q (Shift for fine); double-click a-// node turns the band on / off, double-click empty space switches on a free band there as a-// stereo bell; right-click a node — type, slope, channel and on. The maths mirrors Eq.h.+// Drag a node — frequency and gain; the wheel over a node — Q (Shift for fine); ⌥-click a node+// types its frequency, gain and Q (Tab between them); double-click a node turns the band on /+// off, double-click empty space switches on a free band there as a stereo bell; right-click a+// node — type, slope, channel, on and Type value…. The maths mirrors Eq.h.using System;using System.Collections.Generic;@@ -102,7 +103,7 @@ internal static class Eq8}}-public sealed class Eq8Curve : Control+public sealed class Eq8Curve : Control, IValueEntryHost{private const int Pts = 150;private const double NodeD = 11, HitR = 9;@@ -136,6 +137,7 @@ public sealed class Eq8Curve : Controlpublic Eq8Curve(IAudioEngine engine, int track, int device){+ ValueEntry.AttachHost(this, menu: false); // the band menu carries Type value…_engine = engine; _track = track; _device = device;ClipToBounds = true;MinHeight = 60;@@ -172,6 +174,36 @@ public sealed class Eq8Curve : Control// ---- params ----private float Pd(int p) => p < _engine.DeviceParamCount(_track, _device) ? _engine.DeviceGetParam(_track, _device, p) : 0f;+ // ---- typed entry (specs/035): a node's frequency, gain and Q ----+ // Cached per band (rebuilt when the band gains or loses its gain value): Tab finds the open+ // field by reference, so every read must hand out the same objects.+ private readonly (bool gain, ValueField[] fields)?[] _bandFields = new (bool, ValueField[])?[Eq8.Bands];+ private ValueField[] BandFields(int b)+ {+ bool g = Eq8.HasGain(BandType(b));+ if (_bandFields[b] is { } c && c.gain == g) return c.fields;+ var fs = DynEq.BandFields(_engine, _track, _device, b, Eq8.P(b, Eq8.FreqF), Eq8.P(b, Eq8.GainF),+ Eq8.P(b, Eq8.QF), g, () => { Edited?.Invoke(); InvalidateVisual(); });+ _bandFields[b] = (g, fs);+ return fs;+ }+ IReadOnlyList<ValueField>? IValueEntryHost.FieldsAt(Point p) => Hit(p) is var b and >= 0 ? BandFields(b) : null;+ Rect IValueEntryHost.AnchorOf(ValueField field)+ {+ for (int b = 0; b < Eq8.Bands; b++)+ if (field.Name.StartsWith(NotaNum.F($"Band {b + 1} "), StringComparison.Ordinal)) return ValueEntry.Near(NodeAt(b), Bounds.Size);+ return default;+ }+ IReadOnlyList<ValueField> IValueEntryHost.AllFields+ {+ get+ {+ var list = new List<ValueField>();+ for (int b = 0; b < Eq8.Bands; b++) if (BandOn(b)) list.AddRange(BandFields(b));+ return list;+ }+ }+private float P(int band, int field) => _engine.DeviceGetParam(_track, _device, Eq8.P(band, field));private void SetRaw(int p, double v) => _engine.DeviceSetParam(_track, _device, p, (float)v);private void SetP(int band, int field, double v) => SetRaw(Eq8.P(band, field), v);@@ -408,6 +440,8 @@ public sealed class Eq8Curve : Controlvar on = new MenuItem { Header = "Band on", ToggleType = MenuItemToggleType.CheckBox, IsChecked = BandOn(b) };on.Click += (_, _) => { Gesture(Eq8.P(b, Eq8.On), () => SetP(b, Eq8.On, BandOn(b) ? 0 : 1)); Edited?.Invoke(); InvalidateVisual(); };fly.Items.Add(on);+ fly.Items.Add(new Separator());+ fly.Items.Add(MenuKit.Item("Type value…", GlyphKind.Edit, () => ValueEntry.Open(this, BandFields(b)[0])));fly.ShowAt(this, showAtPointer: true);}diff --git a/src/managed/Nota.App/Controls/FluxVectorPad.cs b/src/managed/Nota.App/Controls/FluxVectorPad.csindex a5549589..45f4340d 100644--- a/src/managed/Nota.App/Controls/FluxVectorPad.cs+++ b/src/managed/Nota.App/Controls/FluxVectorPad.cs@@ -8,7 +8,8 @@// neutral dot is the vector the parameters hold (accent while dragged); a dashed teal ring, reached by a dashed arc, is// where Motion and React pull it right now.// X = 0..1 left→right, Y = 0..1 top→bottom. Reports drags via ValueChanged; Begin/End frame-// an automation-write gesture on both axes. Left button only; double-click resets.+// an automation-write gesture on both axes. Left button only; double-click resets; ⌥-click+// types X and Y (the card attaches the fields, specs/035).using System;using System.Globalization;diff --git a/src/managed/Nota.App/Controls/IValueEntryHost.cs b/src/managed/Nota.App/Controls/IValueEntryHost.csindex fbe6ca98..3d9188f2 100644--- a/src/managed/Nota.App/Controls/IValueEntryHost.cs+++ b/src/managed/Nota.App/Controls/IValueEntryHost.cs@@ -33,6 +33,9 @@ internal sealed record ValueField(string Name, Func<double> Get, Func<double, st/// parameters whose text is only readable at the current value); the position is restored/// before the gesture opens.</summary>public bool Probes { get; init; }+ /// <summary>False: only the menu's Reset to default resets this value; a double-click on the+ /// handle leaves it (the Stereo Map's volume — a double-click centres the pan).</summary>+ public bool ResetOnDoubleClick { get; init; } = true;public bool CanReset => Reset is not null || Default is not null;}@@ -52,3 +55,15 @@ internal interface IValueEntryHost/// <summary>Every field, in order, for the Tab chain.</summary>IReadOnlyList<ValueField> AllFields { get; }}++/// <summary>A graph with handles that set parameter values: it says which handle is under the+/// pointer and where it sits; the owner, which knows the parameters, supplies the fields+/// (<see cref="ValueEntry.AttachHandles"/>).</summary>+internal interface IValueHandles+{+ /// <summary>The handle at <paramref name="p"/> (an index into the owner's field lists), or −1.</summary>+ int HandleAt(Point p);++ /// <summary>Where handle <paramref name="handle"/> sits, in the control's coordinates.</summary>+ Rect HandleRect(int handle);+}diff --git a/src/managed/Nota.App/Controls/KeysViews.cs b/src/managed/Nota.App/Controls/KeysViews.csindex 7818f1fa..7c3938ce 100644--- a/src/managed/Nota.App/Controls/KeysViews.cs+++ b/src/managed/Nota.App/Controls/KeysViews.cs@@ -5,7 +5,8 @@//// KeysPickupView the Pickup transfer curve — the exact function the engine runs// (KeysModel.PickupRaw) — with the tine's travel drawn over it, a dashed-// linear reference and the handle: drag X = Symmetry, Y = Distance. L adds+// linear reference and the handle: drag X = Symmetry, Y = Distance (⌥-click+// types them, specs/035). L adds// the H1–H8 bars of what the curve does to a sine. For Clav it draws the// string instead, with its two pickups lit by Pickup Position.// KeysTremView the tremolo: the left (neutral ink) and right (teal) gains scrolling with the@@ -16,6 +17,7 @@using System;using System.Collections.Generic;using System.Globalization;+using System.Linq;using Avalonia;using Avalonia.Controls;using Avalonia.Input;@@ -24,7 +26,7 @@ using Nota.Application;namespace Nota.App;-internal sealed class KeysPickupView : Control, IMidiLearnRegions+internal sealed class KeysPickupView : Control, IMidiLearnRegions, IValueEntryHost{private readonly IAudioEngine _e;private readonly int _t;@@ -41,8 +43,20 @@ internal sealed class KeysPickupView : Control, IMidiLearnRegions_e = engine; _t = track; _idx = idx;MinWidth = 120; MinHeight = 60;Cursor = new Cursor(StandardCursorType.Hand);+ ValueEntry.AttachHost(this);}+ // ---- typed entry: the whole plot is the handle (Clav has none) ----+ private ValueField[]? _fields;+ public IReadOnlyList<ValueField> AllFields => Model == 3 ? [] : _fields ??= new[]+ {+ I("sym") is var s and >= 0 ? ValueEntry.InstrumentParam(_e, _t, s, "sym", "Pickup symmetry", v => NotaNum.F($"{(v - 0.5) * 200:+0;−0;0}\u2009%"), After) : null,+ I("dist") is var d and >= 0 ? ValueEntry.InstrumentParam(_e, _t, d, "dist", "Pickup distance", NotaNum.Pct, After) : null,+ }.OfType<ValueField>().ToArray();+ private void After() { InvalidateVisual(); Changed?.Invoke(); }+ public IReadOnlyList<ValueField>? FieldsAt(Point p) => AllFields.Count > 0 ? AllFields : null;+ public Rect AnchorOf(ValueField field) => ValueEntry.Near(new Point(Bounds.Width / 2, 0), Bounds.Size);+public void Refresh() => InvalidateVisual();private int I(string id) => _idx.TryGetValue(id, out var i) ? i : -1;diff --git a/src/managed/Nota.App/Controls/PrismViews.cs b/src/managed/Nota.App/Controls/PrismViews.csindex e565c4c4..bc6ea18c 100644--- a/src/managed/Nota.App/Controls/PrismViews.cs+++ b/src/managed/Nota.App/Controls/PrismViews.cs@@ -7,6 +7,7 @@// PrismTransfer — the selected band's static curve (compression above + expansion / upward// compression below, knee, floor) with the live detector level riding on it;// drag a threshold dot ← → for the threshold, ↑ ↓ for the ratio.+// ⌥-click a crossover line or a threshold dot to type its values (the card attaches them, specs/035).// PrismEnvTrace — the band's input peaks and its detector envelope against the threshold.// PrismGrMeter — a gain-reduction bar that grows down from the top (boost grows up), with// an optional peak-hold line.@@ -47,7 +48,7 @@ internal static class PrismInk// ---------------------------------------------------------------------------------------------// Spectrum + crossovers// ----------------------------------------------------------------------------------------------internal sealed class PrismSpectrum : Control+internal sealed class PrismSpectrum : Control, IValueHandles{private const int FftN = 2048, Bins = FftN / 2;private const double TopDb = -6, BottomDb = -96;@@ -106,6 +107,10 @@ internal sealed class PrismSpectrum : Control}private double X(double v) => v * Bounds.Width;+ // Typed entry: handle 0 = the low crossover, 1 = the high one.+ public int HandleAt(Point p) => HitLine(p);+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point((handle == 0 ? _xl : _xh) * Bounds.Width, 0), Bounds.Size);+private int HitLine(Point p){if (_bands >= 2 && Math.Abs(p.X - X(_xl)) <= 6) return 0;@@ -272,7 +277,7 @@ internal sealed class PrismSpectrum : Control// ---------------------------------------------------------------------------------------------// Transfer curve// ----------------------------------------------------------------------------------------------internal sealed class PrismTransfer : Control+internal sealed class PrismTransfer : Control, IValueHandles{private const double Lo = -72; // axes span −72 … 0 dBprivate double _thrA = -18, _slopeA = 0.5, _thrB = -40, _slopeB = 0.4, _floor = 24, _knee = 6, _level = -120;@@ -318,6 +323,11 @@ internal sealed class PrismTransfer : Controlreturn 0;}+ // Typed entry: handle 0 = the above dot, 1 = the below dot.+ public int HandleAt(Point p) => Hit(p) - 1;+ public Rect HandleRect(int handle)+ => ValueEntry.Near(handle == 0 ? Pt(_thrA, Out(_thrA)) : Pt(_thrB, Out(_thrB)), Bounds.Size);+protected override void OnPointerPressed(PointerPressedEventArgs e){base.OnPointerPressed(e);diff --git a/src/managed/Nota.App/Controls/RangeSliderTrack.cs b/src/managed/Nota.App/Controls/RangeSliderTrack.csindex ba4a8ad2..346e3923 100644--- a/src/managed/Nota.App/Controls/RangeSliderTrack.cs+++ b/src/managed/Nota.App/Controls/RangeSliderTrack.cs@@ -5,7 +5,8 @@// track, a brass fill between the handles and two 6×7 Brass Light handles. Works in// normalised 0..1 (the caller maps to its units and keeps a minimum gap). A press picks the// nearer handle and a horizontal drag moves it by the pointer's travel — a click never jumps-// a value; Shift (or Ctrl/⌘) drags fine. Double-click resets. GestureBegin / GestureEnd+// a value; Shift (or Ctrl/⌘) drags fine. Double-click resets; ⌥-click types the nearer+// handle (the owner attaches the fields, specs/035). GestureBegin / GestureEnd// (with the handle: 0 = low, 1 = high) bracket the drag for automation writes.using System;@@ -16,7 +17,7 @@ using Avalonia.Media;namespace Nota.App;-internal sealed class RangeSliderTrack : Control+internal sealed class RangeSliderTrack : Control, IValueHandles{private static readonly IBrush Groove = NotaPalette.BgSunken;private static readonly IBrush Fill = NotaPalette.VizInk; // at rest: neutral@@ -56,6 +57,10 @@ internal sealed class RangeSliderTrack : Controlreturn dl < dh || (dl == dh && x < _lo * w) ? 0 : 1;}+ // Typed entry: handle 0 = low, 1 = high (the nearer one, as a drag picks it).+ public int HandleAt(Point p) => Nearer(p.X);+ public Rect HandleRect(int handle) => new(Math.Max(1, Bounds.Width) * (handle == 0 ? _lo : _hi) - 20, 0, 40, Bounds.Height);+protected override void OnPointerPressed(PointerPressedEventArgs e){if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;diff --git a/src/managed/Nota.App/Controls/ReverbViews.cs b/src/managed/Nota.App/Controls/ReverbViews.csindex e37e7be2..da8ec664 100644--- a/src/managed/Nota.App/Controls/ReverbViews.cs+++ b/src/managed/Nota.App/Controls/ReverbViews.cs@@ -18,7 +18,7 @@ using Avalonia.Media;namespace Nota.App;-internal sealed class ReverbTailView : Control+internal sealed class ReverbTailView : Control, IValueHandles{public const double AxisSec = 4.0;// The pre-delay marker sits between 3 % and 33 % of the width (0 … 200 ms); the early@@ -69,6 +69,14 @@ internal sealed class ReverbTailView : Controlprivate (double x0, double x1, double top, double bot) Geo() => (8, Bounds.Width - 8, 15, Bounds.Height - 12);private double PreX() { var (x0, x1, _, _) = Geo(); return x0 + (PreLo + PreSpan * _preNorm) * (x1 - x0); }+ // Typed entry (specs/035): handle 0 = the decay (the tail anywhere), 1 = the pre-delay marker.+ public int HandleAt(Point p) => Math.Abs(p.X - PreX()) <= 8 ? 1 : 0;+ public Rect HandleRect(int handle)+ {+ var (x0, x1, top, _) = Geo();+ return ValueEntry.Near(new Point(handle == 1 ? PreX() : (x0 + x1) / 2, top), Bounds.Size);+ }+protected override void OnPointerPressed(PointerPressedEventArgs e){base.OnPointerPressed(e);diff --git a/src/managed/Nota.App/Controls/RhythmViews.cs b/src/managed/Nota.App/Controls/RhythmViews.csindex e497ea70..94009bab 100644--- a/src/managed/Nota.App/Controls/RhythmViews.cs+++ b/src/managed/Nota.App/Controls/RhythmViews.cs@@ -10,6 +10,7 @@// RhythmSampleView the selected sample voice: the file as bars in the voice's hue, the// played region between a Start line and a dashed End line (drag// either; the dragged one turns accent), the part outside dimmed, the play position in teal.+// ⌥-click a line (or the hit) to type its value — the card attaches the fields (specs/035).// RhythmStepStrip the sixteen steps of the selected voice and, under them, the velocity// lane. Click toggles, shift-click accents, alt-click makes a quiet step;// drag across paints, drag up / down (or the wheel) sets the velocity;@@ -163,7 +164,7 @@ internal sealed class RhythmHitView : Control}}-internal sealed class RhythmSampleView : Control+internal sealed class RhythmSampleView : Control, IValueHandles{private float[] _peaks = Array.Empty<float>();private string _name = "", _caption = "";@@ -219,6 +220,10 @@ internal sealed class RhythmSampleView : ControlCursor = near ? new Cursor(StandardCursorType.SizeWestEast) : new Cursor(StandardCursorType.Hand);}+ // Typed entry: handle 0 = Start, 1 = End (the nearer line, as a drag picks it); none without a file.+ public int HandleAt(Point p) => !_has ? -1 : Math.Abs(p.X - X(_start)) <= Math.Abs(p.X - X(_end)) ? 0 : 1;+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point(X(handle == 0 ? _start : _end), 0), Bounds.Size);+protected override void OnPointerPressed(PointerPressedEventArgs e){if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;diff --git a/src/managed/Nota.App/Controls/ShutterViews.cs b/src/managed/Nota.App/Controls/ShutterViews.csindex 52aa6872..37f76879 100644--- a/src/managed/Nota.App/Controls/ShutterViews.cs+++ b/src/managed/Nota.App/Controls/ShutterViews.cs@@ -17,7 +17,8 @@// levels) with the gain it makes on top — smooth and swing bend the curve — the current// step lit (accent) and the playhead. Draw / Line / Erase / Flip edit the steps with the mouse.// Shared drag contract (ShDragView): left button only, a gesture per drag, double-click-// resets the handle, right-click bubbles to the MIDI-learn menu.+// resets the handle, ⌥-click types its value (the card supplies the fields, specs/035),+// right-click opens the parameter menu on a handle and bubbles to MIDI learn elsewhere.using System;using System.Collections.Generic;@@ -68,7 +69,7 @@ internal sealed class ShPill : Control/// <summary>A window with draggable handles: subclasses say which handle is under the pointer/// and what value a drag gives it.</summary>-internal abstract class ShDragView : Control+internal abstract class ShDragView : Control, IValueHandles{private int _drag = -1;private Point _start;@@ -123,6 +124,11 @@ internal abstract class ShDragView : Control}protected virtual StandardCursorType CursorFor(int handle) => StandardCursorType.SizeNorthSouth;+ // Typed entry: the handles are the drag handles; the box opens by the one last pointed at.+ private Point _asked;+ public int HandleAt(Point p) { _asked = p; return Hit(p); }+ public Rect HandleRect(int handle) => ValueEntry.Near(_asked, Bounds.Size);+private void Move(Point p){double v = Math.Clamp(DragTo(_drag, _start, p, _v0), 0, 1);diff --git a/src/managed/Nota.App/Controls/SynthViz.cs b/src/managed/Nota.App/Controls/SynthViz.csindex 4f456047..fa9e6f33 100644--- a/src/managed/Nota.App/Controls/SynthViz.cs+++ b/src/managed/Nota.App/Controls/SynthViz.cs@@ -12,6 +12,10 @@// Filter also draws the mini (S) card's one graph (Mini = true): no Hz axis, a soft neutral// wash under the curve, and the captions cut to "LP · Saw" and the cutoff.//+// ⌥-click an Env breakpoint (attack · decay → sustain · release) or the Filter handle+// (cutoff → reso) to type its values, Tab between them; double-click resets them+// (specs/035-typed-value-entry).+//// All three read the engine's normalized params straight and denormalise them with the// exact maps Synth.h uses, so the scales are real. Drawn through NotaGraph — well ground,// hairline frame, corner axis labels, no fills under curves.@@ -19,6 +23,7 @@using System;using System.Collections.Generic;using System.Globalization;+using System.Linq;using Avalonia;using Avalonia.Controls;using Avalonia.Input;@@ -27,7 +32,7 @@ using Nota.Application;namespace Nota.App;-internal sealed class SynthViz : Control, IMidiLearnRegions+internal sealed class SynthViz : Control, IMidiLearnRegions, IValueEntryHost{public enum K { Osc, Adsr, Filter }@@ -53,7 +58,59 @@ internal sealed class SynthViz : Control, IMidiLearnRegions{_k = k; _e = engine; _t = track; _idx = idx;MinWidth = 180; MinHeight = 56;- if (k != K.Osc) Cursor = new Cursor(StandardCursorType.Hand);+ if (k != K.Osc) { Cursor = new Cursor(StandardCursorType.Hand); ValueEntry.AttachHost(this); }+ }++ // ---- typed entry -------------------------------------------------------+ private ValueField[]? _fields; // Env: attack · decay · sustain · release. Filter: cutoff · reso.++ public IReadOnlyList<ValueField> AllFields => _fields ??= _k == K.Adsr+ ? new[]+ {+ Field("attack", "Attack", v => NotaNum.Time(ExpMap(v, 0.001, 2.0))),+ Field("decay", "Decay", v => NotaNum.Time(ExpMap(v, 0.002, 2.0))),+ Field("sustain", "Sustain", v => NotaNum.Db(AudioMath.LinToDb((float)v))),+ Field("release", "Release", v => NotaNum.Time(ExpMap(v, 0.002, 3.0))),+ }.OfType<ValueField>().ToArray()+ : _k == K.Filter+ ? new[]+ {+ Field("cutoff", "Cutoff", v => NotaNum.Hz(ExpMap(v, 20, 18000))),+ Field("resonance", "Reso", v => v.ToString("0.00", NotaNum.Culture)),+ }.OfType<ValueField>().ToArray()+ : [];++ private ValueField? Field(string id, string name, Func<double, string> text)+ {+ int i = I(id);+ if (i < 0) return null;+ return new ValueField(name, () => G(id), text, v => Set(id, v),+ () => _e.BeginAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, id),+ () => _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, id),+ _e.PluginParamDefault(_t, -1, i)) { After = () => { InvalidateVisual(); Changed?.Invoke(); } };+ }++ private IReadOnlyList<ValueField>? Fields(params string[] names)+ => AllFields.Where(f => names.Contains(f.Name)).ToArray() is { Length: > 0 } fs ? fs : null;++ // Env: the breakpoint within 8 px. Filter: the whole pad is the handle (a press anywhere moves it).+ public IReadOnlyList<ValueField>? FieldsAt(Point p)+ {+ if (_k == K.Filter) return Fields("Cutoff", "Reso");+ if (_k != K.Adsr) return null;+ var (xa, xd, sy, _, xr) = EnvNodes();+ var (_, _, top, bot) = Geo();+ var nodes = new (Point at, string[] names)[] { (new(xa, top), ["Attack"]), (new(xd, sy), ["Decay", "Sustain"]), (new(xr, bot), ["Release"]) };+ var near = nodes.MinBy(n => Point.Distance(n.at, p));+ return Point.Distance(near.at, p) <= 8 ? Fields(near.names) : null;+ }++ public Rect AnchorOf(ValueField field)+ {+ var (x0, x1, top, bot) = Geo();+ if (_k == K.Filter) return ValueEntry.Near(new Point(x0 + G("cutoff") * (x1 - x0), CurveTop(top, bot, G("resonance"))), Bounds.Size);+ var (xa, xd, sy, _, xr) = EnvNodes();+ return ValueEntry.Near(field.Name switch { "Attack" => new Point(xa, top), "Release" => new Point(xr, bot), _ => new Point(xd, sy) }, Bounds.Size);}public void Refresh() => InvalidateVisual();diff --git a/src/managed/Nota.App/Controls/ValueEntry.Params.cs b/src/managed/Nota.App/Controls/ValueEntry.Params.csnew file mode 100644index 00000000..3c3d05a9--- /dev/null+++ b/src/managed/Nota.App/Controls/ValueEntry.Params.cs@@ -0,0 +1,51 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+//+// Fields over engine parameters for the graph controls of device cards (specs/035): the+// owner knows the parameter and its read-out, the graph knows where its handles are.++using System;+using System.Collections.Generic;+using Avalonia;+using Avalonia.Controls;+using Nota.Application;++namespace Nota.App;++internal static partial class ValueEntry+{+ /// <summary>A device (audio / MIDI effect) parameter: the same setter and automation gesture a drag uses.</summary>+ public static ValueField DeviceParam(IAudioEngine e, int track, int di, int p, string name, Func<double, string> text, Action? after = null)+ => new(name, () => e.DeviceGetParam(track, di, p), text, v => e.DeviceSetParam(track, di, p, (float)Math.Clamp(v, 0, 1)),+ () => e.BeginAutomationWrite(track, AutomationTarget.DeviceParam, di, p, ""),+ () => e.EndAutomationWrite(track, AutomationTarget.DeviceParam, di, p, ""),+ e.DeviceParamDefault(track, di, p)) { After = after };++ /// <summary>A device parameter held in its own units over <paramref name="lo"/>…<paramref name="hi"/>+ /// (EQ gains in dB, …): the field's position runs linearly over that range.</summary>+ public static ValueField DeviceRaw(IAudioEngine e, int track, int di, int p, string name, double lo, double hi, Func<double, string> text, Action? after = null)+ => new(name, () => (e.DeviceGetParam(track, di, p) - lo) / (hi - lo), n => text(lo + Math.Clamp(n, 0, 1) * (hi - lo)),+ n => e.DeviceSetParam(track, di, p, (float)(lo + Math.Clamp(n, 0, 1) * (hi - lo))),+ () => e.BeginAutomationWrite(track, AutomationTarget.DeviceParam, di, p, ""),+ () => e.EndAutomationWrite(track, AutomationTarget.DeviceParam, di, p, ""),+ (e.DeviceParamDefault(track, di, p) - lo) / (hi - lo)) { After = after };++ /// <summary>An instrument parameter (index <paramref name="pi"/>, id <paramref name="id"/>).</summary>+ public static ValueField InstrumentParam(IAudioEngine e, int track, int pi, string id, string name, Func<double, string> text, Action? after = null)+ => new(name, () => e.PluginParamGet(track, -1, pi), text, v => e.PluginParamSet(track, -1, pi, (float)Math.Clamp(v, 0, 1)),+ () => e.BeginAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id),+ () => e.EndAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id),+ e.PluginParamDefault(track, -1, pi)) { After = after };++ /// <summary>A graph that is one handle all over (a drag anywhere moves it): ⌥-click anywhere+ /// types <paramref name="fields"/>, in order; the box sits at the top middle.</summary>+ public static void AttachAll(Control view, params ValueField[] fields)+ => AttachHost(view, new Whole(view, fields));++ private sealed class Whole(Control view, IReadOnlyList<ValueField> fields) : IValueEntryHost+ {+ public IReadOnlyList<ValueField>? FieldsAt(Point p) => fields;+ public Rect AnchorOf(ValueField field) => Near(new Point(view.Bounds.Width / 2, 0), view.Bounds.Size);+ public IReadOnlyList<ValueField> AllFields => fields;+ }+}diff --git a/src/managed/Nota.App/Controls/ValueEntry.cs b/src/managed/Nota.App/Controls/ValueEntry.csindex 4628db3c..1a1e13ca 100644--- a/src/managed/Nota.App/Controls/ValueEntry.cs+++ b/src/managed/Nota.App/Controls/ValueEntry.cs@@ -114,18 +114,52 @@ internal static partial class ValueEntry/// <summary>Make the handles of <paramref name="host"/> typeable.</summary>public static void AttachHost<T>(T host, bool menu = true) where T : Control, IValueEntryHost+ => AttachHost(host, host, menu);++ /// <summary>Make the handles of a graph typeable: <paramref name="handles"/>[k] are the fields of+ /// handle k (null or empty = that handle has none), in Tab order.</summary>+ public static void AttachHandles<T>(T view, params IReadOnlyList<ValueField>?[] handles) where T : Control, IValueHandles+ => AttachHost(view, new Handles(view, handles));++ /// <summary>A box anchor next to a handle at <paramref name="at"/>: a strip just above it (below+ /// it near the top of <paramref name="area"/>, the control's size), so the box never hides the+ /// handle it edits, kept inside the control sideways.</summary>+ public static Rect Near(Point at, Size area)+ {+ const double w = 48, h = 12;+ double x = Math.Clamp(at.X - w / 2, 0, Math.Max(0, area.Width - w));+ double y = at.Y - 10 - h >= 0 ? at.Y - 10 - h : at.Y + 10;+ return new Rect(x, y, w, h);+ }++ private sealed class Handles(IValueHandles view, IReadOnlyList<ValueField>?[] handles) : IValueEntryHost{- Anchor AnchorOf(ValueField f) => new(host, host.AnchorOf(f), null);- Entries.AddOrUpdate(host, new Entry(host, () => host.AllFields, AnchorOf));+ public IReadOnlyList<ValueField>? FieldsAt(Point p)+ => view.HandleAt(p) is var k && k >= 0 && k < handles.Length && handles[k] is { Count: > 0 } fs ? fs : null;++ public Rect AnchorOf(ValueField field)+ {+ for (int k = 0; k < handles.Length; k++)+ if (handles[k] is { } fs && fs.Contains(field)) return view.HandleRect(k);+ return default;+ }++ public IReadOnlyList<ValueField> AllFields => handles.Where(h => h is not null).SelectMany(h => h!).ToArray();+ }++ private static void AttachHost(Control host, IValueEntryHost logic, bool menu = true)+ {+ Anchor AnchorOf(ValueField f) => new(host, logic.AnchorOf(f), null);+ Entries.AddOrUpdate(host, new Entry(host, () => logic.AllFields, AnchorOf));host.AddHandler(InputElement.PointerPressedEvent, (_, e) =>{- if (host.FieldsAt(e.GetPosition(host)) is not { Count: > 0 } fs) return;+ if (logic.FieldsAt(e.GetPosition(host)) is not { Count: > 0 } fs) return;if (Pressed(e, host, fs[0], fs)) Open(host, fs[0], AnchorOf(fs[0]));}, RoutingStrategies.Tunnel);if (!menu) return;host.AddHandler(Control.ContextRequestedEvent, (_, e) =>{- if (e.Handled || !e.TryGetPosition(host, out var p) || host.FieldsAt(p) is not { Count: > 0 } fs) return;+ if (e.Handled || !e.TryGetPosition(host, out var p) || logic.FieldsAt(p) is not { Count: > 0 } fs) return;e.Handled = true;ShowMenu(host, fs[0], () => Open(host, fs[0], AnchorOf(fs[0])), fs);});@@ -156,15 +190,30 @@ internal static partial class ValueEntryreturn true;}if (e.ClickCount != 2) return false;- if (field.Clear is null && !(all ?? [field]).Any(f => f.CanReset)) return false; // the control keeps its own double-click+ var resets = (all ?? [field]).Where(f => f.CanReset && f.ResetOnDoubleClick).ToList();+ if (field.Clear is null && resets.Count == 0) return false; // the control keeps its own double-clicke.Handled = true;if (field.Clear is not null) Clear(field);- else foreach (var f in all ?? [field]) Reset(f);+ else ResetAll(resets);return false;}// ---- reset / clear / commit ----------------------------------------------------------+ /// <summary>Groups several gestures into one undo step (the engine's undo group); set at start-up.</summary>+ public static (Action Begin, Action End)? UndoGroup { get; set; }++ // A handle's values back to their defaults as one undo step.+ private static void ResetAll(IReadOnlyList<ValueField> fs)+ {+ var todo = fs.Where(f => f.CanReset && !AtDefault(f)).ToList();+ if (todo.Count == 0) return;+ if (todo.Count == 1) { Reset(todo[0]); return; }+ UndoGroup?.Begin();+ try { foreach (var f in todo) Reset(f); }+ finally { UndoGroup?.End(); }+ }+/// <summary>Back to the default as one gesture; nothing without a default or when already there.</summary>public static void Reset(ValueField f){@@ -215,10 +264,17 @@ internal static partial class ValueEntryyield return MenuKit.Item("Type value…", GlyphKind.Edit, open);var fs = all ?? [field];if (field.Clear is not null) yield return MenuKit.Danger("Clear", GlyphKind.Trash, () => Clear(field));- else yield return MenuKit.Item("Reset to default", GlyphKind.Cycle, () => { foreach (var f in fs) Reset(f); },+ else yield return MenuKit.Item("Reset to default", GlyphKind.Cycle, () => ResetAll(fs),enabled: fs.Any(f => f.CanReset && !AtDefault(f)));}+ /// <summary>The parameter menu for a host's handle, for a host that shows menus on its own press.</summary>+ public static void ShowMenu(Control host, IReadOnlyList<ValueField> fields)+ {+ if (fields.Count == 0) return;+ ShowMenu(host, fields[0], () => Open(host, fields[0]), fields);+ }+private static void ShowMenu(Control control, ValueField field, Action open, IReadOnlyList<ValueField>? all = null){var fly = new MenuFlyout();diff --git a/src/managed/Nota.App/Controls/ValueText.cs b/src/managed/Nota.App/Controls/ValueText.csindex 0cc44590..f3ecad22 100644--- a/src/managed/Nota.App/Controls/ValueText.cs+++ b/src/managed/Nota.App/Controls/ValueText.cs@@ -11,7 +11,8 @@// shows that quantity is searched for: the read-out is sampled across the range, the// bracketing step is bisected, and on a match the middle of the run of positions that// display it is taken — so typing "0" lands on 0 dB, not on the edge of the "0.0" bucket.-// A word the read-out shows (off, HOLD) is matched as text.+// A word the read-out shows (off, HOLD) is matched as text. A note name (C4, F#2) reads as its+// MIDI number, and a word before the number ("Out −6 dB", "Swing 30 %") is skipped.using System;using System.Collections.Generic;@@ -153,6 +154,30 @@ internal static partial class ValueText{mul = 1; hasUnit = false;string s = Clean(text).Replace('−', '-').Replace(',', '.').Replace("±", "");+ if (Note().Match(s) is { Success: true } nm) // a note name: C-1 = 0, C4 = 60 (DeviceCardKit.NoteName)+ {+ int pc = "C D EF G A B".IndexOf(char.ToUpperInvariant(nm.Groups["n"].Value[0]));+ int acc = nm.Groups["acc"].Value switch { "#" or "♯" => 1, "b" or "♭" => -1, _ => 0 };+ // MIDI's range only (C-1 … G9); a runaway octave ("C99999999999") reads as nothing.+ if (!int.TryParse(nm.Groups["oct"].Value, NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out int oct) || oct is < -1 or > 9)+ return null;+ hasUnit = true;+ return (oct + 1) * 12 + pc + acc;+ }+ if (ReadQuantity(s, out mul, out hasUnit) is { } v) return v;+ // A label before the number: "Out −6 dB", "Complexity 40 %".+ return Label().Match(s) is { Success: true } lm ? ReadQuantity(s[lm.Length..], out mul, out hasUnit) : null;+ }++ [GeneratedRegex(@"^(?<n>[A-Ga-g])(?<acc>[#♯♭b]?)(?<oct>-?\d+)$")]+ private static partial Regex Note();++ [GeneratedRegex(@"^[A-Za-z][A-Za-z/]+\s+(?=[+\-∞\d.])")]+ private static partial Regex Label();++ private static double? ReadQuantity(string s, out double mul, out bool hasUnit)+ {+ mul = 1; hasUnit = false;var m = Quantity().Match(s);if (!m.Success) return null;string pan = m.Groups["pan"].Value.ToUpperInvariant();diff --git a/src/managed/Nota.App/Controls/VocoderGraph.cs b/src/managed/Nota.App/Controls/VocoderGraph.csindex 43b7132d..ab9aa32e 100644--- a/src/managed/Nota.App/Controls/VocoderGraph.cs+++ b/src/managed/Nota.App/Controls/VocoderGraph.cs@@ -18,7 +18,7 @@ using Avalonia.Media;namespace Nota.App;-internal sealed class VocoderGraph : Control+internal sealed class VocoderGraph : Control, IValueHandles{private const double LoHz = 20, HiHz = 20000, Top = 16, Bottom = 13;private const int Max = 32;@@ -62,6 +62,10 @@ internal sealed class VocoderGraph : Controlreturn dl <= dh ? 0 : 1;}+ // Typed entry (specs/035): handle 0 = the Low edge, 1 = the High edge.+ public int HandleAt(Point p) => EdgeAt(p);+ public Rect HandleRect(int handle) => ValueEntry.Near(new Point(X(handle == 0 ? _low : _high), Top), Bounds.Size);+protected override void OnPointerMoved(PointerEventArgs e){base.OnPointerMoved(e);diff --git a/src/managed/Nota.App/Controls/VoltEnv.cs b/src/managed/Nota.App/Controls/VoltEnv.csindex 9815aa42..779dd10d 100644--- a/src/managed/Nota.App/Controls/VoltEnv.cs+++ b/src/managed/Nota.App/Controls/VoltEnv.cs@@ -4,6 +4,7 @@using System;using System.Collections.Generic;using System.Globalization;+using System.Linq;using Avalonia;using Avalonia.Controls;using Avalonia.Input;@@ -15,7 +16,9 @@ namespace Nota.App;// Interactive ADSR editor for Nota Volt: draw the envelope and drag its three// breakpoints (attack peak · decay/sustain · release end) to set the A/D/S/R params// directly, recording automation gestures. Retargetable between the amp / filter env.- internal sealed class VoltEnv : Control, IMidiLearnRegions+ // ⌥-click a breakpoint to type its values (attack → A, decay/sustain → D then S,+ // release → R; Tab walks them), double-click resets them (specs/035-typed-value-entry).+ internal sealed class VoltEnv : Control, IMidiLearnRegions, IValueEntryHost{private static readonly IBrush Sunken = NotaPalette.BgSunken;private static readonly IBrush BorderDef = NotaPalette.BorderDefault;@@ -37,11 +40,73 @@ namespace Nota.App;// in a header above it (Nota Bass).public bool ShowTitle { get; set; } = true;- public VoltEnv(IAudioEngine e, int t) { _e = e; _t = t; MinWidth = 150; MinHeight = 96; }+ // The read-out of stage k (0 A · 1 D · 2 S · 3 R) at a 0..1 position, for typing;+ // without it a typed value is read back from the engine's own parameter text.+ public Func<int, double, string>? Format { get => _format; set { _format = value; _stages = null; } }+ private Func<int, double, string>? _format;++ public VoltEnv(IAudioEngine e, int t) { _e = e; _t = t; MinWidth = 150; MinHeight = 96; ValueEntry.AttachHost(this); }public void Target(string title, (int, string) a, (int, string) d, (int, string) s, (int, string) r)- { _title = title; _a = a; _d = d; _s = s; _r = r; InvalidateVisual(); }+ {+ if (title != _title || a != _a || d != _d || s != _s || r != _r) _stages = null; // re-targeted every tick by some cards+ _title = title; _a = a; _d = d; _s = s; _r = r; InvalidateVisual();+ }public void Refresh() => InvalidateVisual();+ // ---- typed entry ------------------------------------------------------------+ private ValueField?[]? _stages; // A · D · S · R of the current target; null where unmapped++ private ValueField?[] Stages => _stages ??= Enumerable.Range(0, 4).Select(BuildField).ToArray();++ private ValueField? BuildField(int stage)+ {+ var p = stage switch { 0 => _a, 1 => _d, 2 => _s, _ => _r };+ if (p.i < 0) return null;+ void Begin() => _e.BeginAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, p.id);+ void End() => _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, p.id);+ string name = $"{NotaText.Label(_title)} · {new[] { "Attack", "Decay", "Sustain", "Release" }[stage]}";+ double def = _e.PluginParamDefault(_t, -1, p.i);+ return Format is { } fmt+ ? new ValueField(name, () => G(p), n => fmt(stage, n), n => Set(p, n), Begin, End, def) { After = InvalidateVisual }+ : ValueEntry.Probing(name, () => G(p), n => Set(p, n), () => _e.PluginParamText(_t, -1, p.i), Begin, End, InvalidateVisual) with { Default = def };+ }++ /// <summary>The typeable value of stage <paramref name="stage"/> (0 A · 1 D · 2 S · 3 R), for a read-out row.</summary>+ public ValueField? Field(int stage) => Stages[stage];++ public IReadOnlyList<ValueField> AllFields => Stages.OfType<ValueField>().ToArray();++ private IReadOnlyList<ValueField>? Of(params int[] stages)+ => stages.Select(k => Stages[k]).OfType<ValueField>().ToArray() is { Length: > 0 } fs ? fs : null;++ // A breakpoint within 8 px, or a segment within 6 px: the rise → attack, the fall → decay+ // then sustain, the sustain line → sustain, the release fall → release.+ public IReadOnlyList<ValueField>? FieldsAt(Point p)+ {+ var (x0, _, top, bot) = Geo(); var (xa, xd, sy, xh, xr) = Nodes();+ static double Dist(Point p, Point a, Point b)+ {+ Vector ab = b - a, ap = p - a; double l2 = ab.X * ab.X + ab.Y * ab.Y;+ double t = l2 <= 0 ? 0 : Math.Clamp((ap.X * ab.X + ap.Y * ab.Y) / l2, 0, 1);+ return Point.Distance(p, a + ab * t);+ }+ var nodes = new (Point at, int[] stages)[] { (new(xa, top), [0]), (new(xd, sy), [1, 2]), (new(xr, bot), [3]) };+ var near = nodes.MinBy(n => Point.Distance(n.at, p));+ if (Point.Distance(near.at, p) <= 8) return Of(near.stages);+ if (Dist(p, new Point(x0, bot), new Point(xa, top)) <= 6) return Of(0);+ if (Dist(p, new Point(xa, top), new Point(xd, sy)) <= 6) return Of(1, 2);+ if (Dist(p, new Point(xd, sy), new Point(xh, sy)) <= 6) return Of(2);+ if (Dist(p, new Point(xh, sy), new Point(xr, bot)) <= 6) return Of(3);+ return null;+ }++ public Rect AnchorOf(ValueField field)+ {+ var (_, _, top, bot) = Geo(); var (xa, xd, sy, _, xr) = Nodes();+ int k = Array.IndexOf(Stages, field);+ return ValueEntry.Near(k switch { 0 => new Point(xa, top), 3 => new Point(xr, bot), _ => new Point(xd, sy) }, Bounds.Size);+ }+// MIDI-learn: the A/D/S/R params live only in this drag editor, so expose them as// four vertical strips (left→right) that each learn one stage.public IReadOnlyList<(Rect rect, MidiTarget target, string name)> GetMidiLearnRegions()@@ -70,6 +135,7 @@ namespace Nota.App;protected override void OnPointerPressed(PointerPressedEventArgs e){+ if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return; // right-click: the parameter menuvar p = e.GetPosition(this); var (xa, xd, sy, _, xr) = Nodes(); var (_, _, top, bot) = Geo();double dA = Math.Abs(p.X - xa) + Math.Abs(p.Y - top);double dDS = Math.Abs(p.X - xd) + Math.Abs(p.Y - sy);diff --git a/src/managed/Nota.App/Controls/VoltFilter.cs b/src/managed/Nota.App/Controls/VoltFilter.csindex 8fe2f536..22f73d26 100644--- a/src/managed/Nota.App/Controls/VoltFilter.cs+++ b/src/managed/Nota.App/Controls/VoltFilter.cs@@ -4,6 +4,7 @@using System;using System.Collections.Generic;using System.Globalization;+using System.Linq;using Avalonia;using Avalonia.Controls;using Avalonia.Input;@@ -14,8 +15,9 @@ namespace Nota.App;// Interactive filter response for Nota Volt: drag anywhere to set cutoff (X) and// resonance (Y) of the targeted filter, recording gestures. Curve shape follows the- // filter type (LP/HP/BP/Notch).- internal sealed class VoltFilter : Control, IMidiLearnRegions+ // filter type (LP/HP/BP/Notch). ⌥-click types the cutoff, then (Tab) the resonance;+ // double-click resets both (specs/035-typed-value-entry).+ internal sealed class VoltFilter : Control, IMidiLearnRegions, IValueEntryHost{private static readonly IBrush Sunken = NotaPalette.BgSunken;private static readonly IBrush BorderDef = NotaPalette.BorderDefault;@@ -34,9 +36,28 @@ namespace Nota.App;/// engine actually does.</summary>public (double Lo, double Hi) FreqRange { get; set; } = (20.0, 18000.0);- public VoltFilter(IAudioEngine e, int t) { _e = e; _t = t; MinWidth = 150; MinHeight = 96; }+ public VoltFilter(IAudioEngine e, int t) { _e = e; _t = t; MinWidth = 150; MinHeight = 96; ValueEntry.AttachHost(this); }public void Target(string title, (int, string) freq, (int, string) reso, int type)- { _title = title; _freq = freq; _reso = reso; _type = type; InvalidateVisual(); }+ {+ if (title != _title || freq != _freq || reso != _reso) _fields = null;+ _title = title; _freq = freq; _reso = reso; _type = type; InvalidateVisual();+ }++ // ---- typed entry: the whole pad is the handle (a press anywhere moves it) ----+ private ValueField[]? _fields;+ public IReadOnlyList<ValueField> AllFields => _fields ??= new[]+ {+ Field(_freq, "Cutoff", v => NotaNum.Hz(FreqRange.Lo * Math.Pow(FreqRange.Hi / FreqRange.Lo, v))),+ Field(_reso, "Reso", NotaNum.Pct),+ }.OfType<ValueField>().ToArray();+ private ValueField? Field((int i, string id) p, string name, Func<double, string> text) => p.i < 0 ? null+ : ValueEntry.InstrumentParam(_e, _t, p.i, p.id, $"{NotaText.Label(_title)} · {name}", text, InvalidateVisual);+ public IReadOnlyList<ValueField>? FieldsAt(Point p) => AllFields.Count > 0 ? AllFields : null;+ public Rect AnchorOf(ValueField field)+ {+ var (x0, x1, top, _) = Geo();+ return ValueEntry.Near(new Point(x0 + G(_freq) * (x1 - x0), top), Bounds.Size);+ }public void Refresh() => InvalidateVisual();private float G((int i, string id) p) => p.i >= 0 ? _e.PluginParamGet(_t, -1, p.i) : 0f;@@ -52,7 +73,9 @@ namespace Nota.App;}protected override void OnPointerPressed(PointerPressedEventArgs e)- { _drag = true; Gest(true); e.Pointer.Capture(this); Apply(e.GetPosition(this)); e.Handled = true; }+ {+ if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return; // right-click: the parameter menu+ _drag = true; Gest(true); e.Pointer.Capture(this); Apply(e.GetPosition(this)); e.Handled = true; }protected override void OnPointerMoved(PointerEventArgs e) { if (_drag) Apply(e.GetPosition(this)); }protected override void OnPointerReleased(PointerReleasedEventArgs e){ if (_drag) { _drag = false; InvalidateVisual(); Gest(false); e.Pointer.Capture(null); } }diff --git a/src/managed/Nota.App/Controls/VoltMatrix.cs b/src/managed/Nota.App/Controls/VoltMatrix.csindex 546dcd7d..d2cf838f 100644--- a/src/managed/Nota.App/Controls/VoltMatrix.cs+++ b/src/managed/Nota.App/Controls/VoltMatrix.cs@@ -2,14 +2,17 @@// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.//// Nota Volt modulation matrix: a source×destination grid of bipolar cells. Drag a cell-// vertically to set its amount (up = positive, down = negative); right-click or-// double-click clears it. A route reads as a neutral-washed cell carrying its signed+// vertically to set its amount (up = positive, down = negative); ⌥-click types it+// (−100…+100 %), double-click clears it, right-click opens Type value… / Clear — every+// clear one gesture, so it undoes (specs/035). A route reads as a neutral-washed cell carrying its signed// amount — the deeper the wash, the more of it — and an empty one stays a dark well, so// the routes a patch actually uses are the only thing on screen. Modulator rows are// named in teal, performance sources in plain ink. Reads/writes the mtx{s}_{d} plugin// params and records automation gestures, like the other Volt drag controls.using System;+using System.Collections.Generic;+using System.Linq;using System.Globalization;using Avalonia;using Avalonia.Controls;@@ -19,7 +22,7 @@ using Nota.Application;namespace Nota.App;-internal sealed class VoltMatrix : Control+internal sealed class VoltMatrix : Control, IValueEntryHost{private static readonly IBrush Sunken = NotaPalette.BgSunken;private static readonly IBrush BorderDef = NotaPalette.BorderDefault;@@ -51,7 +54,71 @@ internal sealed class VoltMatrix : Controlpublic event Action? Changed;public VoltMatrix(IAudioEngine e, int t, int[,] idx, string[] src, string[] dst)- { _e = e; _t = t; _idx = idx; _src = src; _dst = dst; }+ {+ _e = e; _t = t; _idx = idx; _src = src; _dst = dst;+ _fields = new ValueField?[src.Length, dst.Length];+ ValueEntry.AttachHost(this);+ }++ // ---- typed entry ------------------------------------------------------------+ private readonly ValueField?[,] _fields;++ private ValueField? FieldOf(int s, int d)+ {+ int i = _idx[s, d];+ if (i < 0) return null;+ return _fields[s, d] ??= new ValueField($"{_src[s]} → {_dst[d]}", () => _e.PluginParamGet(_t, -1, i),+ v => NotaNum.F($"{(v - 0.5) * 200:+0;−0;0}\u2009%"), v => _e.PluginParamSet(_t, -1, i, (float)Math.Clamp(v, 0, 1)),+ () => _e.BeginAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, Id(s, d)),+ () => _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, Id(s, d)), 0.5)+ {+ Clear = () => Clear(s, d),+ After = () => { InvalidateVisual(); Changed?.Invoke(); },+ };+ }++ // One gesture, so the clear is an undo step and records like a drag.+ private void Clear(int s, int d)+ {+ int i = _idx[s, d];+ if (i < 0 || Math.Abs(_e.PluginParamGet(_t, -1, i) - 0.5f) < 1e-6) return;+ _e.BeginAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, Id(s, d));+ _e.PluginParamSet(_t, -1, i, 0.5f);+ _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, Id(s, d));+ }++ private (int s, int d) CellAt(Point p)+ {+ var (cw, ch) = Cell();+ if (p.X < LabelW || p.Y < HeaderH || cw <= 0 || ch <= 0) return (-1, -1);+ int d = (int)((p.X - LabelW) / cw), s = (int)((p.Y - HeaderH) / ch);+ return s < _src.Length && d < _dst.Length ? (s, d) : (-1, -1);+ }++ public IReadOnlyList<ValueField>? FieldsAt(Point p)+ => CellAt(p) is var (s, d) && s >= 0 && FieldOf(s, d) is { } f ? [f] : null;++ public Rect AnchorOf(ValueField field)+ {+ var (cw, ch) = Cell();+ for (int s = 0; s < _src.Length; s++)+ for (int d = 0; d < _dst.Length; d++)+ if (ReferenceEquals(_fields[s, d], field)) return new Rect(LabelW + d * cw + 1, HeaderH + s * ch + 1, cw - 2, ch - 2);+ return default;+ }++ // Tab walks the routes the patch uses, row by row.+ public IReadOnlyList<ValueField> AllFields+ {+ get+ {+ var list = new List<ValueField>();+ for (int s = 0; s < _src.Length; s++)+ for (int d = 0; d < _dst.Length; d++)+ if (_idx[s, d] is var i and >= 0 && Math.Abs(_e.PluginParamGet(_t, -1, i) - 0.5f) > 0.005f && FieldOf(s, d) is { } f) list.Add(f);+ return list;+ }+ }public void Refresh() => InvalidateVisual();public void ClearAll()@@ -67,13 +134,11 @@ internal sealed class VoltMatrix : Controlprotected override void OnPointerPressed(PointerPressedEventArgs e){- var p = e.GetPosition(this); var (cw, ch) = Cell();- int d = (int)((p.X - LabelW) / cw), s = (int)((p.Y - HeaderH) / ch);- if (s < 0 || s >= _src.Length || d < 0 || d >= _dst.Length) return;+ var p = e.GetPosition(this);+ if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return; // right-click: the parameter menu+ var (s, d) = CellAt(p);+ if (s < 0) return;int i = _idx[s, d]; if (i < 0) return;- var pt = e.GetCurrentPoint(this);- if (pt.Properties.IsRightButtonPressed || e.ClickCount == 2)- { _e.PluginParamSet(_t, -1, i, 0.5f); InvalidateVisual(); Changed?.Invoke(); e.Handled = true; return; }_dragS = s; _dragD = d; _startY = p.Y; _startVal = _e.PluginParamGet(_t, -1, i);_e.BeginAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, Id(s, d));e.Pointer.Capture(this); e.Handled = true;diff --git a/src/managed/Nota.App/DeviceCards/Bodies/AutoFilterDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/AutoFilterDeviceBody.csindex f3edb055..97eb0f83 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/AutoFilterDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/AutoFilterDeviceBody.cs@@ -64,6 +64,8 @@ internal sealed class AutoFilterDeviceBody : IDeviceBodyvar readouts = new List<Action>();void RefreshAll() { foreach (var a in readouts) a(); }+ // A typeable value for a graph handle (⌥-click it, specs/035).+ ValueField F(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, RefreshAll);var scope = new float[kScope];int scN = 0;double Sc(int i) => scN > i ? scope[i] : 0;@@ -265,7 +267,8 @@ internal sealed class AutoFilterDeviceBody : IDeviceBodyf.GestureBegin += () => Begin(p);f.GestureEnd += () => End(p);Learn(f, p);- ToolTip.SetTip(f, tip);+ ToolTip.SetTip(f, MenuKit.Keys(tip));+ ValueEntry.Attach(f, F(p, p == Freq ? "Cutoff" : "Resonance", p == Freq ? v => Hz(HzOf(v)) : Pct));readouts.Add(() => f.Set(P(p), scN > liveSlot && Assigned() ? Sc(liveSlot) : double.NaN));var lb = Caps(label); lb.HorizontalAlignment = HorizontalAlignment.Center;return new DockPanel { Children = { Docked(lb, Dock.Bottom), new Border { Margin = new Thickness(0, 0, 0, 3), Child = f } } };@@ -280,8 +283,8 @@ internal sealed class AutoFilterDeviceBody : IDeviceBodyshapeTitle.Foreground = Assigned() && scN > 0 && Math.Abs(Sc(S_Cut) - P(Freq)) > 0.01 ? AccentBright : TextTertiary;});var faders = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto"), ColumnSpacing = 9, HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(0, 4, 0, 4) };- faders.Children.Add(ShapeFader(Freq, "FRQ", NotaPalette.VizInk, S_Cut, "Cutoff — the base the modulation moves from; the dashed mark is where it is now. Double-click resets."));- faders.Children.Add(Col(ShapeFader(Res, "RES", Teal, S_Res, "Resonance — the peak at the cutoff; the dashed mark is where it is now. Double-click resets."), 1));+ faders.Children.Add(ShapeFader(Freq, "FRQ", NotaPalette.VizInk, S_Cut, "Cutoff — the base the modulation moves from; the dashed mark is where it is now. Double-click resets, ⌥-click types a value."));+ faders.Children.Add(Col(ShapeFader(Res, "RES", Teal, S_Res, "Resonance — the peak at the cutoff; the dashed mark is where it is now. Double-click resets, ⌥-click types a value."), 1));var shapeCol = new RuleSection{Width = 56, Padding = new Thickness(0, 5, 0, 4),@@ -302,6 +305,7 @@ internal sealed class AutoFilterDeviceBody : IDeviceBodycurve.ResChanged += v => Raw(Res, (float)v);ToolTip.SetTip(curve, "Drag sideways for the cutoff, up and down for the resonance. The teal band is how far the envelope and LFO can move the cutoff; the dashed curve is where they have it now.");Learn(curve, Freq);+ ValueEntry.AttachAll(curve, F(Freq, "Cutoff", v => Hz(HzOf(v))), F(Res, "Resonance", Pct));var q = Mono("", 7, TextTertiary);readouts.Add(() => q.Text = NotaNum.F($"Q {Q(P(Res)):0.00}"));@@ -342,6 +346,7 @@ internal sealed class AutoFilterDeviceBody : IDeviceBodyenvView.GestureEnd += () => End(EnvAmt);ToolTip.SetTip(envView, "The input's envelope (teal) and the cutoff it drives (neutral ink), the base cutoff dashed. Drag up or down for the amount.");Learn(envView, EnvAmt);+ ValueEntry.AttachAll(envView, F(EnvAmt, "Env amount", Bip));// → Freq / → Reso: the shared Mod Target, as two switches that can both be lit.void PickTarget(int i)@@ -419,6 +424,7 @@ internal sealed class AutoFilterDeviceBody : IDeviceBodylfoView.GestureEnd += () => { End(LfoAmt); End(LfoOffset); };ToolTip.SetTip(lfoView, "The LFO's movement over the window — raw shape dashed, what the filter follows (after Smooth) in neutral ink, the right channel in rose when stereo is on. Drag up or down for the amount, sideways for the start phase.");Learn(lfoView, LfoAmt);+ ValueEntry.AttachAll(lfoView, F(LfoAmt, "LFO amount", Pct), F(LfoOffset, "LFO phase", v => Deg(v, 360)));var waves = Chips(WaveNames, i => Sel(LfoWave, 5) == i, i => SetP(LfoWave, i / 4f), LfoWave, padX: 6);var rate = Mono("", 7, TextSecondary);diff --git a/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.csindex 621445cb..bfe29fd9 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.cs@@ -215,7 +215,8 @@ internal sealed class AutoGainDeviceBody : IDeviceBodyfader.Changed += db => { Raw(Gain, GainNorm(db)); RefreshAll(); };fader.ResetRequested += () => { Reset(Gain); RefreshAll(); };Learn(fader, Gain);- ToolTip.SetTip(fader, "The correction around 0\u2009dB, ±Max Gain. In Manual drag it (Shift for fine steps); double-click resets to 0\u2009dB. In Auto it shows the ride");+ ToolTip.SetTip(fader, MenuKit.Keys("The correction around 0\u2009dB, ±Max Gain. In Manual drag it (Shift for fine steps); ⌥-click types, double-click resets to 0\u2009dB. In Auto it shows the ride"));+ ValueEntry.Attach(fader, ValueEntry.DeviceParam(engine, track, di, Gain, "Gain", v => Sgn(GainDb(v)) + "\u2009dB", RefreshAll));var maxTop = Mono("", 7, TextDisabled);var modeTag = Mono("", 7, TextDisabled);@@ -290,7 +291,8 @@ internal sealed class AutoGainDeviceBody : IDeviceBodyhist.Changed += v => { Raw(Target, v); RefreshAll(); };hist.ResetRequested += () => { Reset(Target); RefreshAll(); };Learn(hist, Target);- ToolTip.SetTip(hist, "The last 8\u2009s: input, output and the target with its ±1\u2009LU band (momentary loudness). Drag up / down to move the target; double-click resets it");+ ToolTip.SetTip(hist, MenuKit.Keys("The last 8\u2009s: input, output and the target with its ±1\u2009LU band (momentary loudness). Drag up / down to move the target; ⌥-click types, double-click resets it"));+ ValueEntry.Attach(hist, ValueEntry.DeviceParam(engine, track, di, Target, "Target", TargetF, RefreshAll));IBrush Dim() => TextDisabled;var rIn = Mono("", 8, TextSecondary); var rOut = Mono("", 8, TextPrimary); var rDelta = Mono("", 8, TextSecondary); var rTp = Mono("", 8, TextSecondary);@@ -362,7 +364,8 @@ internal sealed class AutoGainDeviceBody : IDeviceBodyceilBox.PointerReleased += (_, e) => { if (cd) { cd = false; End(Ceiling); e.Pointer.Capture(null); } };ceilBox.PointerCaptureLost += (_, _) => { if (cd) { cd = false; End(Ceiling); } };Learn(ceilBox, Ceiling);- ToolTip.SetTip(ceilBox, "Ceiling, −6 … 0\u2009dBTP — drag up / down (Shift for fine steps), double-click resets to −1.0");+ ToolTip.SetTip(ceilBox, MenuKit.Keys("Ceiling, −6 … 0\u2009dBTP — drag up / down (Shift for fine steps), ⌥-click to type, double-click resets to −1.0"));+ ValueEntry.Attach(ceilBox, ValueEntry.DeviceParam(engine, track, di, Ceiling, "Ceiling", v => NotaNum.F($"{CeilingDb(v):0.0;−0.0;0.0}\u2009dBTP"), RefreshAll), ceilTxt);readouts.Add(() =>{ceilTxt.Text = NotaNum.F($"{CeilingDb(P(Ceiling)):0.0;−0.0;0.0}\u2009dBTP");diff --git a/src/managed/Nota.App/DeviceCards/Bodies/AutoPanDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/AutoPanDeviceBody.csindex 1a4de2ae..c07a2aa2 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/AutoPanDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/AutoPanDeviceBody.cs@@ -196,7 +196,8 @@ internal sealed class AutoPanDeviceBody : IDeviceBodygraph.Changed += (a, ph) => { Raw(Amount, a); Raw(Phase, ph); RefreshAll(); };graph.ResetRequested += () => { Reset(Amount); Reset(Phase); RefreshAll(); };Learn(graph, Amount);- ToolTip.SetTip(graph, "Both channels' gain over two LFO cycles — L neutral, R teal, Phase later — with the floor the depth reaches. Drag up / down for Amount, left / right for Phase; double-click resets both.");+ ToolTip.SetTip(graph, MenuKit.Keys("Both channels' gain over two LFO cycles — L neutral, R teal, Phase later — with the floor the depth reaches. Drag up / down for Amount, left / right for Phase; ⌥-click types, double-click resets both."));+ ValueEntry.AttachAll(graph, ValueEntry.DeviceParam(engine, track, di, Amount, "Amount", PctF, RefreshAll), ValueEntry.DeviceParam(engine, track, di, Phase, "Phase", v => NotaNum.F($"{v * 360:0}°"), RefreshAll));var panBar = new OrbitPanBar { VerticalAlignment = VerticalAlignment.Center };var panTxt = Mono("", 8, TextPrimary); panTxt.TextAlignment = TextAlignment.Right; panTxt.Width = 28;diff --git a/src/managed/Nota.App/DeviceCards/Bodies/BeatRepeatDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/BeatRepeatDeviceBody.csindex 673154d0..839b0ec3 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/BeatRepeatDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/BeatRepeatDeviceBody.cs@@ -15,6 +15,7 @@using System;using System.Collections.Generic;+using System.Linq;using Avalonia;using Avalonia.Controls;using Avalonia.Controls.Primitives;@@ -318,8 +319,10 @@ internal sealed class BeatRepeatDeviceBody : IDeviceBodyLastChildFill = true, Margin = new Thickness(8, 5, 8, 0),Children = { Docked(head, Dock.Top), Docked(knobs, Dock.Bottom), new Border { Margin = new Thickness(0, 5, 0, 0), Child = window } },};- void WireDrag(ShDragView v, Func<int, int> param)+ void WireDrag<T>(T v, Func<int, int> param, params ValueField[] handles) where T : ShDragView{+ // ⌥-click a handle to type it (specs/035): one field per handle, in the view's handle order.+ ValueEntry.AttachHandles(v, handles.Select(f => (IReadOnlyList<ValueField>)new[] { f }).ToArray());v.Value = h => P(param(h));v.Changed += (h, x) => { Raw(param(h), x); Refresh(); };v.GestureBegin += h => Begin(param(h));@@ -327,6 +330,8 @@ internal sealed class BeatRepeatDeviceBody : IDeviceBodyv.ResetRequested += h => { Reset(param(h)); RefreshAll(); };}+ ValueField F(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, RefreshAll);+// ---- shared knob formats ----string ChanceF(double v) => PctF(v);string GateF(double v) => NotaNum.F($"{Steps16(v)}/16");@@ -404,8 +409,8 @@ internal sealed class BeatRepeatDeviceBody : IDeviceBodyControl SlicesTab(){slices = new BrSlicesView();- WireDrag(slices, h => h == BrSlicesView.HGate ? Gate : Offset);- ToolTip.SetTip(slices, "The last interval's sound (teal) on the grid: the gate from the offset is shaded and the captured slice is brass. Drag the offset line or the gate's end sideways; double-click resets.");+ WireDrag(slices, h => h == BrSlicesView.HGate ? Gate : Offset, F(Offset, "Offset", OffsetF), F(Gate, "Gate", GateF));+ ToolTip.SetTip(slices, MenuKit.Keys("The last interval's sound (teal) on the grid: the gate from the offset is shaded and the captured slice is brass. Drag the offset line or the gate's end sideways; ⌥-click to type, double-click resets."));Learn(slices, Offset);var head = HeadRow(Row(6, Caps("INTERVAL"), IntervalSegC(), Caps("GRID"), GridSegC(), TripletChip()), new Border());var knobs = KnobRow(new[]@@ -429,8 +434,9 @@ internal sealed class BeatRepeatDeviceBody : IDeviceBodyControl FilterTab(){filter = new BrFilterView();- WireDrag(filter, h => h == BrFilterView.HFreq ? FilterFreq : FilterWidth);- ToolTip.SetTip(filter, "The repeat filter — only the repeats go through it. Solid: the first repeat; teal dashed: a later one when the band narrows and follows the pitch. Drag the node for the frequency, a band edge for the width; double-click resets.");+ WireDrag(filter, h => h == BrFilterView.HFreq ? FilterFreq : FilterWidth,+ F(FilterFreq, "Freq", FreqF), F(FilterWidth, "Width", WidthF), F(FilterWidth, "Width", WidthF));+ ToolTip.SetTip(filter, MenuKit.Keys("The repeat filter — only the repeats go through it. Solid: the first repeat; teal dashed: a later one when the band narrows and follows the pitch. Drag the node for the frequency, a band edge for the width; ⌥-click to type, double-click resets."));Learn(filter, FilterFreq);var type = Seg(FilterNames, () => On(FilterOn) ? FType() + 1 : 0,i => { if (i == 0) SetP(FilterOn, 0f); else { SetP(FilterType, (i - 1) / 2f); if (!On(FilterOn)) SetP(FilterOn, 1f); } },diff --git a/src/managed/Nota.App/DeviceCards/Bodies/CeilingDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/CeilingDeviceBody.csindex c1ff35bb..504152ad 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/CeilingDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/CeilingDeviceBody.cs@@ -331,8 +331,11 @@ internal sealed class CeilingDeviceBody : IDeviceBodyLastChildFill = true, Margin = new Thickness(8, 5, 8, 0),Children = { Docked(head, Dock.Top), Docked(knobs, Dock.Bottom), new Border { Margin = new Thickness(0, 5, 0, 0), Child = window } },};- void WireDrag(ShDragView v, int param)+ void WireDrag<T>(T v, int param, string name, Func<double, string> fmt) where T : ShDragView{+ // ⌥-click the handle to type it (specs/035).+ ValueEntry.Attach(v, new ValueField(name, () => N(param), n => fmt(FromN(param, n)), n => SetN(param, n),+ () => Begin(param), () => End(param), DefN(param)) { After = RefreshAll });v.Value = _ => N(param);v.Changed += (_, x) => { SetN(param, x); RefreshAll(); };v.GestureBegin += _ => Begin(param);@@ -398,8 +401,8 @@ internal sealed class CeilingDeviceBody : IDeviceBodyControl LevelTab(){level = new CeLevelView { CeilToNorm = db => ToN(Ceil, db) };- WireDrag(level, Ceil);- ToolTip.SetTip(level, "The last 4 s: the input (teal), the part over the ceiling (red) and the output (neutral ink), with the reduction under it. Drag the ceiling line; double-click resets.");+ WireDrag(level, Ceil, "Ceiling", CeilF);+ ToolTip.SetTip(level, MenuKit.Keys("The last 4 s: the input (teal), the part over the ceiling (red) and the output (neutral ink), with the reduction under it. Drag the ceiling line; ⌥-click to type, double-click resets."));var head = HeadRow(CharSeg(), Info(() => "ceiling " + CeilF(P(Ceil))));var knobs = KnobRow(() => ScDb(S_WinInPeak) <= -119 ? "no signal" : NotaNum.F($"in {Lvl(ScDb(S_WinInPeak))} → out {Lvl(ScDb(S_WinOutPeak))}"),@@ -421,8 +424,8 @@ internal sealed class CeilingDeviceBody : IDeviceBodyControl LoudnessTab(){loudness = new CeLoudnessView { TargetToNorm = t => ToN(Target, t) };- WireDrag(loudness, Target);- ToolTip.SetTip(loudness, "Momentary (teal), short-term (neutral ink) and integrated (rose) loudness over the last 60 s around the target, ±1 LU shaded. Drag the target line; double-click resets.");+ WireDrag(loudness, Target, "Target", TargetF);+ ToolTip.SetTip(loudness, MenuKit.Keys("Momentary (teal), short-term (neutral ink) and integrated (rose) loudness over the last 60 s around the target, ±1 LU shaded. Drag the target line; ⌥-click to type, double-click resets."));var head = HeadRow(Row(6, CharSeg(false), Caps("TARGET"), TargetDrop()),Info(() => HaveI() ? NotaNum.F($"{FromTarget():+0.0;−0.0;0.0}\u2009LU from target") : "measuring…"));var knobs = KnobRow(diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ChamberDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ChamberDeviceBody.csindex 488e2674..ebf12881 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ChamberDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ChamberDeviceBody.cs@@ -100,6 +100,8 @@ internal sealed class ChamberDeviceBody : IDeviceBody// ---- formatters -------------------------------------------------------------static double Exp(double v, double lo, double hi) => lo * Math.Pow(hi / lo, Math.Clamp(v, 0, 1));+ // A typeable value for a fader or a graph handle (⌥-click it, specs/035).+ ValueField CF(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, () => { foreach (var a in readouts) a(); });static string Secs(double s) => s >= 10 ? NotaNum.F($"{s:0.0}\u2009s") : s >= 1 ? NotaNum.F($"{s:0.00}\u2009s") : NotaNum.F($"{s * 1000:0}\u2009ms");static string Ms(double ms) => ms >= 100 ? NotaNum.F($"{ms:0}\u2009ms") : ms >= 10 ? NotaNum.F($"{ms:0.0}\u2009ms") : NotaNum.F($"{ms:0.0}\u2009ms");static string Hz(double hz) => hz >= 1000 ? NotaNum.F($"{hz / 1000:0.0}\u2009k") : NotaNum.F($"{hz:0}\u2009Hz");@@ -271,6 +273,7 @@ internal sealed class ChamberDeviceBody : IDeviceBodyf.DragEnded += () => End(p);readouts.Add(() => f.Set(P(p)));MidiLearn.Bind(f, MidiTarget.DeviceParam(track, di, p), engine.DeviceParamName(track, di, p));+ ValueEntry.Attach(f, CF(p, split ? "Blend" : "Dry/wet", split ? v => NotaNum.F($"{v * 100:0}\u2009% algorithm") : Pct));ToolTip.SetTip(f, split ? "Blend — convolution (slate, top) ⇄ algorithm (neutral, bottom). Double-click: 50 / 50" : "Dry/Wet — double-click resets");var lb = Caps(label); lb.HorizontalAlignment = HorizontalAlignment.Center;if (!split) readouts.Add(() => lb.Foreground = P(DryWet) > 0.995f || On(WetOnly) ? TxtC : MutedC);@@ -357,7 +360,9 @@ internal sealed class ChamberDeviceBody : IDeviceBodyirView.TrimChanged += (s, e) => { Raw(IrStart, (float)s); Raw(IrDecay, (float)e); };irView.DragStarted += h => Begin(h == 1 ? IrStart : IrDecay);irView.DragEnded += h => End(h == 1 ? IrStart : IrDecay);- ToolTip.SetTip(irView, "Drag the trim lines to trim the IR (Start · Decay); double-click resets. Drop an audio file here to load it.");+ ValueEntry.AttachHandles(irView, [CF(IrStart, "IR start", v => IrSecs() > 0 ? Secs(v * IrSecs()) : Pct(v))],+ [CF(IrDecay, "IR decay", v => IrSecs() > 0 ? Secs(v * IrSecs()) : Pct(v))]);+ ToolTip.SetTip(irView, MenuKit.Keys("Drag the trim lines to trim the IR (Start · Decay); ⌥-click to type, double-click resets. Drop an audio file here to load it."));readouts.Add(() =>{string sig = NotaNum.F($"{Sel(IrSelect, IrCount)}|{Sc(S_IrSeconds):0.000}|{Sc(S_IrChannels)}|{Sc(S_UserIr)}");@@ -413,7 +418,9 @@ internal sealed class ChamberDeviceBody : IDeviceBody};graph.DragStarted += b => Begin(b == 0 ? AlgoLowDecay : b == 1 ? AlgoDecay : AlgoHighDecay);graph.DragEnded += b => End(b == 0 ? AlgoLowDecay : b == 1 ? AlgoDecay : AlgoHighDecay);- ToolTip.SetTip(graph, "Drag a marker to set that band's RT60 (mid = Decay; low / high follow it as ratios). The Damping knob sets the high crossover.");+ ValueEntry.AttachHandles(graph, [CF(AlgoLowDecay, "Low decay", v => Secs(RtMid() * Math.Pow(16, v - 0.5)))],+ [CF(AlgoDecay, "Decay", v => Secs(Exp(v, 0.2, 20)))], [CF(AlgoHighDecay, "High decay", v => Secs(RtMid() * Math.Pow(16, v - 0.5)))]);+ ToolTip.SetTip(graph, MenuKit.Keys("Drag a marker to set that band's RT60 (mid = Decay; low / high follow it as ratios). The Damping knob sets the high crossover. · ⌥-click to type"));readouts.Add(() =>{FetchPreviews();@@ -450,7 +457,9 @@ internal sealed class ChamberDeviceBody : IDeviceBody};eq.DragStarted += h => { if (h == 0) { Begin(EqLowCut); Begin(EqLowGain); } else { Begin(EqHighCut); Begin(EqHighShelf); } };eq.DragEnded += h => { if (h == 0) { End(EqLowCut); End(EqLowGain); } else { End(EqHighCut); End(EqHighShelf); } };- ToolTip.SetTip(eq, "Left handle: low cut (X) + low shelf (Y) · right handle: high cut (X) + high shelf (Y)");+ ValueEntry.AttachHandles(eq, [CF(EqLowCut, "Low cut", LowCutF), CF(EqLowGain, "Low shelf", GainF)],+ [CF(EqHighCut, "High cut", HighCutF), CF(EqHighShelf, "High shelf", GainF)]);+ ToolTip.SetTip(eq, MenuKit.Keys("Left handle: low cut (X) + low shelf (Y) · right handle: high cut (X) + high shelf (Y) · ⌥-click to type"));readouts.Add(() => eq.Set(P(EqLowCut), P(EqLowGain), P(EqHighShelf), P(EqHighCut)));var eqKnobs = new Grid { ColumnDefinitions = new ColumnDefinitions("*,*,*,*"), Height = 50 };eqKnobs.Children.Add(K(EqLowCut, "LOW-CUT", LowCutF, 30, 48));diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ChorusDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ChorusDeviceBody.csindex b1c30387..fa8cef1a 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ChorusDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ChorusDeviceBody.cs@@ -245,7 +245,8 @@ internal sealed class ChorusDeviceBody : IDeviceBodyplot.Changed += a => { Raw(Amount, Math.Round(a * 100) / 100); RefreshAll(); };plot.ResetRequested += () => { Reset(Amount); RefreshAll(); };Learn(plot, Amount);- ToolTip.SetTip(plot, "Each voice over two LFO cycles — its delay (τ) or its detune (ct) — and where it is now. Drag up / down for Amount; double-click resets it.");+ ToolTip.SetTip(plot, MenuKit.Keys("Each voice over two LFO cycles — its delay (τ) or its detune (ct) — and where it is now. Drag up / down for Amount; ⌥-click types, double-click resets it."));+ ValueEntry.AttachAll(plot, ValueEntry.DeviceParam(engine, track, di, Amount, "Amount", PctF, RefreshAll));var field = new ChorusFieldView { Margin = new Thickness(0, 4, 0, 0) };ToolTip.SetTip(field, "Where the voices sit in the stereo field (Width) and how far each is detuned right now");diff --git a/src/managed/Nota.App/DeviceCards/Bodies/CompressorDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/CompressorDeviceBody.csindex d1ccb982..0b8e0781 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/CompressorDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/CompressorDeviceBody.cs@@ -80,6 +80,11 @@ internal sealed class CompressorDeviceBody : IDeviceBody(Func<double, double> N, Func<double, double> V) RangeMap() =>(v => v >= 47.5 ? 0 : Math.Clamp((48 - v) / 47, 0, 1), n => n <= 0.005 ? 48 : 48 - 47 * Math.Clamp(n, 0, 1));+ // A typeable value over a raw-unit parameter through its 0..1 map (⌥-click, specs/035).+ ValueField F(string name, Func<int> param, Func<int, (Func<double, double> N, Func<double, double> V)> map, Func<double, string> fmt, bool reset = true)+ => new(name, () => map(param()).N(P(param())), n => fmt(map(param()).V(n)), n => Raw(param(), map(param()).V(n)),+ () => Begin(param()), () => End(param()), reset ? map(param()).N(Def(param())) : null) { After = () => { foreach (var a in readouts) a(); } };+// ---- formatters -------------------------------------------------------------------static string Ms(double ms) => ms >= 100 ? NotaNum.F($"{ms:0} ms") : NotaNum.F($"{ms:0.0} ms");static string MsShort(double ms) => ms >= 100 ? NotaNum.F($"{ms:0}") : NotaNum.F($"{ms:0.0}");@@ -231,7 +236,7 @@ internal sealed class CompressorDeviceBody : IDeviceBodythrFader.GestureBegin += () => Begin(Threshold);thrFader.GestureEnd += () => End(Threshold);MidiLearn.Bind(thrFader, MidiTarget.DeviceParam(track, di, Threshold), "Thresh");- ToolTip.SetTip(thrFader, "Threshold — the tick is the key's level right now. Double-click resets.");+ ToolTip.SetTip(thrFader, MenuKit.Keys("Threshold — the tick is the key's level right now. ⌥-click types, double-click resets."));// The second fader is make-up on Curve / Motion and the key's gain on Sidechain.int F2() => centreTab == 2 ? ScGain : Makeup;@@ -255,8 +260,10 @@ internal sealed class CompressorDeviceBody : IDeviceBodythrVal.Text = Db(P(Threshold));f2Val.Text = SDb(P(p2));f2Lbl.Text = NotaText.Label(p2 == ScGain ? "SC IN" : "MKP");- ToolTip.SetTip(f2, p2 == ScGain ? "Key gain — drives the detector harder or softer. Double-click resets." : "Make-up gain. Double-click resets.");+ ToolTip.SetTip(f2, MenuKit.Keys(p2 == ScGain ? "Key gain — drives the detector harder or softer. ⌥-click types, double-click resets." : "Make-up gain. ⌥-click types, double-click resets."));});+ ValueEntry.Attach(thrFader, F("Threshold", () => Threshold, Lin, Db), thrVal);+ ValueEntry.Attach(f2, F("Make-up", F2, Lin, SDb), f2Val);var faders = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto"), ColumnSpacing = 9, HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(0, 4, 0, 3) };faders.Children.Add(new DockPanel { Children = { Docked(thrLbl, Dock.Bottom), thrFader } });faders.Children.Add(Col(new DockPanel { Children = { Docked(f2Lbl, Dock.Bottom), f2 } }, 1));@@ -311,6 +318,7 @@ internal sealed class CompressorDeviceBody : IDeviceBodytransfer.GestureEnd += () => { End(Threshold); End(Ratio); };transfer.Changed += (thr, ratio) => { Raw(Threshold, thr); Raw(Ratio, ratio); };transfer.Reset += () => { Reset(Threshold); Reset(Ratio); };+ ValueEntry.AttachAll(transfer, F("Threshold", () => Threshold, Lin, Db), F("Ratio", () => Ratio, Log, RatioF));MidiLearn.Bind(transfer, MidiTarget.DeviceParam(track, di, Threshold), "Thresh");readouts.Add(() => { if (!transfer.Dragging) transfer.Set(P(Threshold), P(Ratio), P(Knee), P(Range), KeyDb()); });@@ -383,13 +391,15 @@ internal sealed class CompressorDeviceBody : IDeviceBodyhead.Children.Add(Col(info, 3));var key = new CompKeyView();- ToolTip.SetTip(key, "The key's spectrum under its filters — drag a handle sideways to move HP / LP, up / down for Q. Double-click a handle to open it.");+ ToolTip.SetTip(key, MenuKit.Keys("The key's spectrum under its filters — drag a handle sideways to move HP / LP, up / down for Q. ⌥-click a handle to type it, double-click to open it."));int KParam(int h) => h == 0 ? ScHP : h == 1 ? ScLP : ScQ;key.GestureBegin += h => Begin(KParam(h));key.GestureEnd += h => End(KParam(h));key.FreqChanged += (h, hz) => Raw(h == 0 ? ScHP : ScLP, hz);key.QChanged += q => Raw(ScQ, q);key.Reset += h => Reset(h == 0 ? ScHP : ScLP);+ var keyQ = F("SC Q", () => ScQ, Log, v => NotaNum.F($"{v:0.00}"), reset: false);+ ValueEntry.AttachHandles(key, [F("SC HP", () => ScHP, Log, HpF), keyQ], [F("SC LP", () => ScLP, Log, LpF), keyQ]);MidiLearn.Bind(key, MidiTarget.DeviceParam(track, di, ScHP), "SC HP");readouts.Add(() =>{diff --git a/src/managed/Nota.App/DeviceCards/Bodies/CrushDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/CrushDeviceBody.csindex 0e2aae07..e3223f0e 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/CrushDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/CrushDeviceBody.cs@@ -60,6 +60,8 @@ internal sealed class CrushDeviceBody : IDeviceBodyvar readouts = new List<Action>();void RefreshAll() { for (int i = 0; i < readouts.Count; i++) readouts[i](); }+ // A typeable value for a graph (⌥-click it, specs/035).+ ValueField F(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, RefreshAll);var scope = new float[kScope];int scN = 0;double Sc(int i) => scN > i ? scope[i] : 0;@@ -261,7 +263,8 @@ internal sealed class CrushDeviceBody : IDeviceBodyquant.Changed += (b, r) => { Raw(Bits, b); Raw(Rate, r); RefreshAll(); };quant.ResetRequested += () => { Reset(Bits); Reset(Rate); RefreshAll(); };Learn(quant, Bits);- ToolTip.SetTip(quant, "10\u2009ms of a sine through the crusher: the source dashed, the held and quantised steps in neutral ink. Drag up / down for Bits, left / right for Rate; double-click resets both.");+ ToolTip.SetTip(quant, MenuKit.Keys("10\u2009ms of a sine through the crusher: the source dashed, the held and quantised steps in neutral ink. Drag up / down for Bits, left / right for Rate; ⌥-click types, double-click resets both."));+ ValueEntry.AttachAll(quant, F(Bits, "Bits", BitsF), F(Rate, "Rate", RateF));var knobs = KnobRow(() => NotaNum.F($"{KHz(Sr())} → {KHz(RateHz(P(Rate)))} · 1 of {Hold():0.#}"),() => NotaNum.F($"quant. noise {-(6.02 * BitsOf(P(Bits)) + 1.76):0}\u2009dB"));@@ -279,7 +282,8 @@ internal sealed class CrushDeviceBody : IDeviceBodyspectrum.GestureEnd += h => End(map[h]);spectrum.ResetRequested += h => { Reset(map[h]); RefreshAll(); };Learn(spectrum, Rate);- ToolTip.SetTip(spectrum, "The output spectrum: neutral ink is the signal, teal what the crush added — bright above the reduced Nyquist (the images). Drag the Nyquist line for Rate, the filter line for the post filter; double-click resets.");+ ToolTip.SetTip(spectrum, MenuKit.Keys("The output spectrum: neutral ink is the signal, teal what the crush added — bright above the reduced Nyquist (the images). Drag the Nyquist line for Rate, the filter line for the post filter; ⌥-click types, double-click resets."));+ ValueEntry.AttachHandles(spectrum, [F(Rate, "Rate", RateF)], [F(PostFilter, "Post filter", FiltF)]);var knobs = KnobRow(() => Sc(S_Analysed) < 0.5 ? "no signal" : ScDb(S_Images) <= -119 ? NotaNum.F($"no images above {KHz(Sc(S_Nyquist))}"): NotaNum.F($"images above {KHz(Sc(S_Nyquist))} {ScDb(S_Images):0}\u2009dB"),@@ -298,7 +302,8 @@ internal sealed class CrushDeviceBody : IDeviceBodycurve.GestureEnd += _ => End(Drive);curve.ResetRequested += _ => { Reset(Drive); RefreshAll(); };Learn(curve, Drive);- ToolTip.SetTip(curve, "Input → output through Drive, the mode and the levels; the dot is where the signal peaks. Drag up / down for Drive; double-click resets.");+ ToolTip.SetTip(curve, MenuKit.Keys("Input → output through Drive, the mode and the levels; the dot is where the signal peaks. Drag up / down for Drive; ⌥-click types, double-click resets."));+ ValueEntry.AttachHandles(curve, [F(Drive, "Drive", DriveF)]);wave = new CrWaveView();ToolTip.SetTip(wave, "Two cycles of a sine at the driven level (dashed) and what comes out");var pair = new DockPanel { LastChildFill = true, Children = { Docked(curve, Dock.Left), new Border { Margin = new Thickness(5, 0, 0, 0), Child = wave } } };diff --git a/src/managed/Nota.App/DeviceCards/Bodies/DelayDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/DelayDeviceBody.csindex ebe788ed..aa54e744 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/DelayDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/DelayDeviceBody.cs@@ -247,16 +247,18 @@ internal sealed class DelayDeviceBody : IDeviceBody// ======================================================================// LEFT — Loop column (Feedback · Spread)// ======================================================================- Control LoopFader(int p, string label, IBrush ink, IBrush handle, Func<string> value, string tip)+ Control LoopFader(int p, string label, IBrush ink, IBrush handle, Func<double, string> fmt, string tip){var f = new DelayFader { Ink = ink, Handle = handle, Width = 18, VerticalAlignment = VerticalAlignment.Stretch, Default = engine.DeviceParamDefault(track, di, p) };f.Changed += v => Raw(p, (float)v);f.GestureBegin += () => Begin(p);f.GestureEnd += () => End(p);MidiLearn.Bind(f, MidiTarget.DeviceParam(track, di, p), engine.DeviceParamName(track, di, p));- ToolTip.SetTip(f, tip);+ ToolTip.SetTip(f, MenuKit.Keys(tip));var lb = Caps(label); lb.HorizontalAlignment = HorizontalAlignment.Center;var val = Mono("", 7, TextPrimary); val.HorizontalAlignment = HorizontalAlignment.Center;+ ValueEntry.Attach(f, ValueEntry.DeviceParam(engine, track, di, p, NotaText.Label(label), fmt), val);+ string value() => fmt(P(p));readouts.Add(() =>{f.Set(P(p));@@ -270,11 +272,11 @@ internal sealed class DelayDeviceBody : IDeviceBodyvar loopTitle = Caps("LOOP"); loopTitle.HorizontalAlignment = HorizontalAlignment.Center;var faders = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto"), ColumnSpacing = 4, HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(0, 4, 0, 2) };faders.Children.Add(LoopFader(Feedback, "FEEDBACK", NotaPalette.VizInk, NotaPalette.VizInk,- () => On(Freeze) ? "Hold" : Pct(P(Feedback)),- "Feedback — how much of each repeat goes round again; Freeze pins it at 100 %. Double-click resets."));+ v => On(Freeze) ? "Hold" : Pct(v),+ "Feedback — how much of each repeat goes round again; Freeze pins it at 100 %. ⌥-click types, double-click resets."));faders.Children.Add(Col(LoopFader(Spread, "SPREAD", NotaPalette.Rose, NotaPalette.RoseBright,- () => NotaNum.F($"{P(Spread) * 50:0} ms"),- "Spread — pushes the right channel later, up to 50 ms. Double-click resets."), 1));+ v => NotaNum.F($"{v * 50:0} ms"),+ "Spread — pushes the right channel later, up to 50 ms. ⌥-click types, double-click resets."), 1));var loopCol = new RuleSection{Width = 96, Padding = new Thickness(0, 5, 0, 4),@@ -352,7 +354,9 @@ internal sealed class DelayDeviceBody : IDeviceBodyfilter.GestureBegin += h => Begin(h == 0 ? LowCut : HighCut);filter.GestureEnd += h => End(h == 0 ? LowCut : HighCut);filter.Reset += h => Reset(h == 0 ? LowCut : HighCut);- ToolTip.SetTip(filter, "The band the repeats live in — drag the left handle for the low cut, the right one for the high cut. Double-click a handle to open it.");+ ValueEntry.AttachHandles(filter, [ValueEntry.DeviceParam(engine, track, di, LowCut, "Low cut", v => Hz(LowHz(v)))],+ [ValueEntry.DeviceParam(engine, track, di, HighCut, "High cut", v => Hz(HighHz(v)))]);+ ToolTip.SetTip(filter, MenuKit.Keys("The band the repeats live in — drag the left handle for the low cut, the right one for the high cut. ⌥-click a handle to type it, double-click to open it."));MidiLearn.Bind(filter, MidiTarget.DeviceParam(track, di, LowCut), "Low Cut");readouts.Add(() => { if (!filter.Dragging) filter.Set(P(LowCut), P(HighCut), LowHz(P(LowCut)), HighHz(P(HighCut))); });diff --git a/src/managed/Nota.App/DeviceCards/Bodies/DynamicEqDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/DynamicEqDeviceBody.csindex eb6690af..6840a817 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/DynamicEqDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/DynamicEqDeviceBody.cs@@ -460,7 +460,8 @@ internal sealed class DynamicEqDeviceBody : IDeviceBodyoutBox.PointerReleased += (_, e) => { OutEnd(); e.Pointer.Capture(null); };outBox.PointerCaptureLost += (_, _) => OutEnd();Learn(outBox, DynEq.OutputP);- ToolTip.SetTip(outBox, "Output — drag up / down (Shift for fine), double-click for 0 dB");+ ToolTip.SetTip(outBox, MenuKit.Keys("Output — drag up / down (Shift for fine), ⌥-click to type, double-click for 0 dB"));+ ValueEntry.Attach(outBox, ValueEntry.DeviceRaw(engine, track, di, DynEq.OutputP, "Output", -18, 18, v => "Out " + DynEq.Db(v) + " dB", RefreshAll), outTb);readouts.Add(() =>{float o = P(DynEq.OutputP);diff --git a/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.csindex 632c389f..cadb4658 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.cs@@ -74,6 +74,21 @@ internal sealed class Eq3DeviceBody : IDeviceBody// Band edits in dB (the Range law decides the param value).void GainRaw(int b, double db) => Raw(Low + b, Eq3Math.GainNorm(db, Iso()));+ // Typeable values (⌥-click, specs/035): a band's gain (its reset also lifts the kill) and the+ // crossovers (held an octave apart, as a drag holds them).+ ValueField BandField(int b) => new(NotaText.Label(Eq3Math.Names[b]) + " gain", () => P(Low + b),+ v => Eq3Math.Db(Eq3Math.GainDb(v, Iso())) + "\u2009dB", v => Raw(Low + b, v), () => Begin(Low + b), () => End(Low + b))+ { Reset = () => ResetBand(b), After = RefreshAll };+ ValueField XoverField(int w) => new(w == 0 ? "Low / mid crossover" : "Mid / high crossover", () => P(w == 0 ? FreqLo : FreqHi),+ v => Eq3Math.Hz(w == 0 ? Eq3Math.LoHz(v) : Eq3Math.HiHz(v)),+ v => { if (w == 0) Raw(FreqLo, Eq3Math.LoNorm(Math.Min(Eq3Math.LoHz(v), F2() / 2))); else Raw(FreqHi, Eq3Math.HiNorm(Math.Max(Eq3Math.HiHz(v), F1() * 2))); },+ () => Begin(w == 0 ? FreqLo : FreqHi), () => End(w == 0 ? FreqLo : FreqHi))+ { Reset = () => XoverReset(w), After = RefreshAll };+ void XoverReset(int w)+ {+ if (w == 0) SetP(FreqLo, Eq3Math.LoNorm(Math.Min(250, F2() / 2)));+ else SetP(FreqHi, Eq3Math.HiNorm(Math.Max(2500, F1() * 2)));+ }void ResetBand(int b){Begin(Low + b); GainRaw(b, 0); End(Low + b);@@ -129,8 +144,9 @@ internal sealed class Eq3DeviceBody : IDeviceBodyfader.GestureEnd += () => End(Low + b);fader.Changed += db => { GainRaw(b, db); RefreshAll(); };fader.ResetRequested += () => ResetBand(b);- ToolTip.SetTip(fader, "Drag up / down for the band's gain (Shift for fine steps); double-click resets to 0\u2009dB and lifts the kill");+ ToolTip.SetTip(fader, MenuKit.Keys("Drag up / down for the band's gain (Shift for fine steps); ⌥-click types it; double-click resets to 0\u2009dB and lifts the kill"));Learn(fader, Low + b);+ ValueEntry.Attach(fader, BandField(b), val);readouts.Add(() =>{bool k = Killed(b), iso = Iso();@@ -166,18 +182,14 @@ internal sealed class Eq3DeviceBody : IDeviceBodygraph.XoverBegin += w => Begin(w == 0 ? FreqLo : FreqHi);graph.XoverEnd += w => End(w == 0 ? FreqLo : FreqHi);graph.XoverChanged += (w, hz) => { if (w == 0) Raw(FreqLo, Eq3Math.LoNorm(hz)); else Raw(FreqHi, Eq3Math.HiNorm(hz)); RefreshAll(); };- graph.XoverReset += w =>- {- if (w == 0) SetP(FreqLo, Eq3Math.LoNorm(Math.Min(250, F2() / 2)));- else SetP(FreqHi, Eq3Math.HiNorm(Math.Max(2500, F1() * 2)));- RefreshAll();- };+ graph.XoverReset += w => { XoverReset(w); RefreshAll(); };graph.GainBegin += b => Begin(Low + b);graph.GainEnd += b => End(Low + b);graph.GainChanged += (b, db) => { GainRaw(b, db); RefreshAll(); };graph.GainReset += ResetBand;Learn(graph, FreqLo);- ToolTip.SetTip(graph, "Each band in its colour, the sum in brass, the output spectrum behind. Drag a crossover handle left / right; drag anywhere else to ride that band's gain. Double-click resets.");+ ValueEntry.AttachHandles(graph, [XoverField(0)], [XoverField(1)], [BandField(0)], [BandField(1)], [BandField(2)]);+ ToolTip.SetTip(graph, MenuKit.Keys("Each band in its colour, the sum in brass, the output spectrum behind. Drag a crossover handle left / right; drag anywhere else to ride that band's gain. Double-click resets, ⌥-click types."));// Header: crossover readouts · Output · Range · Slope.Control XRead(string label, Func<string> text)@@ -218,8 +230,10 @@ internal sealed class Eq3DeviceBody : IDeviceBodyv.Text = Eq3Math.Db(db) + "\u2009dB";v.Foreground = Math.Abs(db) > 0.05 ? TextPrimary : TextSecondary;});- ToolTip.SetTip(box, "Output gain, ±24\u2009dB — drag up / down (Shift for fine), double-click resets");+ ToolTip.SetTip(box, MenuKit.Keys("Output gain, ±24\u2009dB — drag up / down (Shift for fine), ⌥-click types, double-click resets"));Learn(box, Gain);+ ValueEntry.Attach(box, new ValueField("Output", () => P(Gain), x => Eq3Math.Db(OutDb(x)) + "\u2009dB", x => Raw(Gain, x),+ () => Begin(Gain), () => End(Gain), 0.5) { After = RefreshAll }, v);return Row(4, Caps("OUT"), box);}diff --git a/src/managed/Nota.App/DeviceCards/Bodies/EqDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/EqDeviceBody.csindex cee52aef..fc94af5b 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/EqDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/EqDeviceBody.cs@@ -480,7 +480,8 @@ internal sealed class EqDeviceBody : IDeviceBodyoutBox.PointerReleased += (_, e) => { OutEnd(); e.Pointer.Capture(null); };outBox.PointerCaptureLost += (_, _) => OutEnd();Learn(outBox, Eq8.OutputP);- ToolTip.SetTip(outBox, "Output (plus the auto gain in effect) — drag up / down (Shift for fine), double-click for 0\u2009dB");+ ToolTip.SetTip(outBox, MenuKit.Keys("Output (plus the auto gain in effect) — drag up / down (Shift for fine), ⌥-click to type, double-click for 0\u2009dB"));+ ValueEntry.Attach(outBox, ValueEntry.DeviceRaw(engine, track, di, Eq8.OutputP, "Output", -12, 12, v => "Out " + Eq8.Db(v) + " dB", RefreshAll), outTb);readouts.Add(() =>{float o = P(Eq8.OutputP);diff --git a/src/managed/Nota.App/DeviceCards/Bodies/FlangerDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/FlangerDeviceBody.csindex 5f9a04bb..2e82030d 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/FlangerDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/FlangerDeviceBody.cs@@ -199,7 +199,8 @@ internal sealed class FlangerDeviceBody : IDeviceBodycomb.Changed += (d, f) => { Raw(Delay, d); Raw(Feedback, f); RefreshAll(); };comb.ResetRequested += () => { Reset(Delay); Reset(Feedback); RefreshAll(); };Learn(comb, Delay);- ToolTip.SetTip(comb, "The comb the delay carves into the spectrum, L neutral and R teal, with the first notch dashed. Drag left / right to move the notch (Delay), up / down for Feedback; double-click resets both.");+ ToolTip.SetTip(comb, MenuKit.Keys("The comb the delay carves into the spectrum, L neutral and R teal, with the first notch dashed. Drag left / right to move the notch (Delay), up / down for Feedback; ⌥-click types, double-click resets both."));+ ValueEntry.AttachAll(comb, ValueEntry.DeviceParam(engine, track, di, Delay, "Delay", v => FlangerMath.Ms(FlangerMath.BaseMs(v)) + " ms", RefreshAll), ValueEntry.DeviceParam(engine, track, di, Feedback, "Feedback", v => FbF(FlangerMath.Fb(v)), RefreshAll));var sweep = new FlangerSweepView { Margin = new Thickness(0, 4, 0, 0) };ToolTip.SetTip(sweep, "The delay τ of both channels over two LFO cycles, and where each is now");diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.csindex 88264378..7aec4b28 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.cs@@ -211,7 +211,8 @@ internal sealed class ForgeDeviceBody : IDeviceBodyoutBox.PointerReleased += (_, e) => { if (od) { od = false; End(OutP(s)); e.Pointer.Capture(null); } };outBox.PointerCaptureLost += (_, _) => { if (od) { od = false; End(OutP(s)); } };Learn(outBox, OutP(s));- ToolTip.SetTip(outBox, $"Stage {s + 1} output, −12 … +12 dB — drag up / down, double-click resets");+ ToolTip.SetTip(outBox, MenuKit.Keys($"Stage {s + 1} output, −12 … +12 dB — drag up / down, ⌥-click to type, double-click resets"));+ ValueEntry.Attach(outBox, ValueEntry.DeviceParam(engine, track, di, OutP(s), $"Stage {s + 1} output", OutF, Refresh), outTxt);readouts.Add(() =>{@@ -250,7 +251,8 @@ internal sealed class ForgeDeviceBody : IDeviceBodytransfer.Changed += (_, v) => { Raw(Amount, v); Refresh(); };transfer.ResetRequested += _ => { Reset(Amount); Refresh(); };Learn(transfer, Amount);- ToolTip.SetTip(transfer, "Input → output through the device (in M/S and Multi through the selected stage): each stage alone faint, the LFO-modulated curve dashed teal, the node where the input sits now. Drag up / down for Amount; double-click resets.");+ ToolTip.SetTip(transfer, MenuKit.Keys("Input → output through the device (in M/S and Multi through the selected stage): each stage alone faint, the LFO-modulated curve dashed teal, the node where the input sits now. Drag up / down for Amount; ⌥-click to type, double-click resets."));+ ValueEntry.Attach(transfer, new ValueField("Amount", () => P(Amount), AmtF, v => Raw(Amount, v), () => Begin(Amount), () => End(Amount), engine.DeviceParamDefault(track, di, Amount)) { After = Refresh });var harm = new FgHarmonicsView { Height = 50 };ToolTip.SetTip(harm, "Harmonics 2 … 9 of a −6 dB sine through the curve: odd partials in full ink (hard, buzzy), even ones dimmer (warm, round), and the total harmonic distortion");var graphs = new DockPaneldiff --git a/src/managed/Nota.App/DeviceCards/Bodies/LensDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/LensDeviceBody.csindex ba3ad87f..16d3605e 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/LensDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/LensDeviceBody.cs@@ -458,6 +458,9 @@ internal sealed class LensDeviceBody : IDeviceBodys.GestureBegin += () => Begin(param());s.GestureEnd += () => End(param());s.ValueChanged += v => Raw(param(), (float)v);+ // ⌥-click types the value of whichever parameter the rail drives now (specs/035).+ ValueEntry.Attach(s, new ValueField("Scale", () => P(param()), v => RailText(param(), v), v => { Raw(param(), (float)v); s.Value = v; },+ () => Begin(param()), () => End(param()), null) { Reset = () => { Raw(param(), Def(param())); s.Value = Def(param()); } });readouts.Add(() =>{lbl.Text = NotaText.Label(caption());@@ -470,6 +473,13 @@ internal sealed class LensDeviceBody : IDeviceBodyreturn g;}+ string RailText(int p, double v) => p switch+ {+ VoltDivP => Inv($"{Exp(v, 0.02, 2.0):0.00} /d"),+ TimeDivP => Ms(Exp(v, 0.00002, 0.02)),+ ScaleTopP => Inv($"{24 - v * 60:0}\u2009dB"),+ _ => Inv($"{30 + v * 90:0}\u2009dB"),+ };int centreTab = Sel(ViewP, 3);var railA = RailSlider(() => centreTab == 1 ? VoltDivP : ScaleTopP, NotaPalette.VizInk, () => centreTab == 1 ? "V/D" : "TOP");var railB = RailSlider(() => centreTab == 1 ? TimeDivP : ScaleRangeP, NotaPalette.Teal, () => centreTab == 1 ? "T/D" : "RNG");diff --git a/src/managed/Nota.App/DeviceCards/Bodies/PhaserDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/PhaserDeviceBody.csindex 1b8f9dce..7ee49c36 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/PhaserDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/PhaserDeviceBody.cs@@ -202,7 +202,8 @@ internal sealed class PhaserDeviceBody : IDeviceBodyresponse.Changed += (c, f) => { Raw(Center, c); Raw(Feedback, f); RefreshAll(); };response.ResetRequested += () => { Reset(Center); Reset(Feedback); RefreshAll(); };Learn(response, Center);- ToolTip.SetTip(response, "The notches the stages cut into the spectrum, L neutral and R teal, with the corner dashed and each notch ticked on top. Drag left / right to move Center, up / down for Feedback; double-click resets both.");+ ToolTip.SetTip(response, MenuKit.Keys("The notches the stages cut into the spectrum, L neutral and R teal, with the corner dashed and each notch ticked on top. Drag left / right to move Center, up / down for Feedback; ⌥-click types, double-click resets both."));+ ValueEntry.AttachAll(response, ValueEntry.DeviceParam(engine, track, di, Center, "Center", v => PhaserMath.HzF(PhaserMath.CenterHz(v)) + " Hz", RefreshAll), ValueEntry.DeviceParam(engine, track, di, Feedback, "Feedback", v => FbF(PhaserMath.Fb(v)), RefreshAll));var sweep = new PhaserSweepView { Margin = new Thickness(0, 4, 0, 0) };ToolTip.SetTip(sweep, "The corner frequency of both channels over two LFO cycles (20 Hz … 20 kHz), and where each is now");diff --git a/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.csindex f153f7b8..30a2487c 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.cs@@ -177,6 +177,9 @@ internal sealed class PrismDeviceBody : IDeviceBody}// A mono readout that edits its param by vertical drag (~140 px full range); double-click resets.+ // A typeable value for a graph handle (⌥-click it, specs/035).+ ValueField PF(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, () => { foreach (var a in readouts) a(); });+Control DragVal(int p, Func<double, string> fmt, Func<IBrush> color){var tb = Mono("", 8, TxtC); tb.TextAlignment = TextAlignment.Right; tb.HorizontalAlignment = HorizontalAlignment.Stretch;@@ -193,6 +196,7 @@ internal sealed class PrismDeviceBody : IDeviceBodyhost.PointerCaptureLost += (_, _) => { if (drag) { drag = false; End(p); } };readouts.Add(() => { tb.Text = fmt(P(p)); tb.Foreground = color(); });Learn(host, p);+ ValueEntry.Attach(host, ValueEntry.DeviceParam(engine, track, di, p, engine.DeviceParamName(track, di, p), fmt), tb); // ⌥-click types (specs/035)return host;}@@ -256,7 +260,8 @@ internal sealed class PrismDeviceBody : IDeviceBodyspec.DragStarted += h => Begin(h == 0 ? XoverLow : XoverHigh);spec.DragEnded += h => End(h == 0 ? XoverLow : XoverHigh);spec.BandClicked += SelectBand;- ToolTip.SetTip(spec, "Input spectrum (fill) and output (line). Drag a crossover line to move it; double-click resets. Click a band to select it.");+ ValueEntry.AttachHandles(spec, [PF(XoverLow, "Low / mid crossover", v => HzF(XHz(v)))], [PF(XoverHigh, "Mid / high crossover", v => HzF(XHz(v)))]);+ ToolTip.SetTip(spec, MenuKit.Keys("Input spectrum (fill) and output (line). Drag a crossover line to move it; ⌥-click to type, double-click resets. Click a band to select it."));readouts.Add(() => { spec.Set(P(XoverLow), P(XoverHigh), BandCount(), band, Sc(S_SampleRate)); spec.Tick(); });const string cols = "50,*,*,40,40";@@ -323,12 +328,15 @@ internal sealed class PrismDeviceBody : IDeviceBodyforeach (var a in readouts) a();};tr.DragEnded += _ => { End(dragThr); End(dragRat); };+ ValueEntry.AttachHandles(tr,+ [PF(BP(b, AboveThresh), "Above threshold", v => ThrF(ThrA(v))), PF(BP(b, AboveRatio), "Above ratio", RatioAF)],+ [PF(BP(b, BelowThresh), "Below threshold", v => ThrF(ThrB(v))), PF(BP(b, BelowRatio), "Below ratio", RatioBF)]);tr.ResetRequested += h =>{int t = BP(b, h == 1 ? AboveThresh : BelowThresh), r = BP(b, h == 1 ? AboveRatio : BelowRatio);SetP(t, Def(t)); SetP(r, Def(r));};- ToolTip.SetTip(tr, "Drag a dot: ← → threshold, ↑ ↓ ratio (down = more). The bright dot is compression above, the grey one expansion below. Double-click a dot resets it.");+ ToolTip.SetTip(tr, MenuKit.Keys("Drag a dot: ← → threshold, ↑ ↓ ratio (down = more). The bright dot is compression above, the grey one expansion below. Double-click a dot resets it. · ⌥-click to type"));readouts.Add(() =>{if (!tr.IsEffectivelyVisible) return;diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ReverbDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ReverbDeviceBody.csindex 31f6d4ab..ac3c5b46 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ReverbDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ReverbDeviceBody.cs@@ -165,7 +165,9 @@ internal sealed class ReverbDeviceBody : IDeviceBodyt.GestureBegin += target => Begin(target == 0 ? Decay : PreDelay);t.GestureEnd += target => End(target == 0 ? Decay : PreDelay);t.Reset += target => { Reset(target == 0 ? Decay : PreDelay); SyncTail(); };- ToolTip.SetTip(t, "The decay tail — the impulse at the pre-delay (teal), the early reflections (drawn magnified), then the RT60 curve over 4 s. Drag the teal marker for the pre-delay, drag the tail for the decay; double-click to reset.");+ ToolTip.SetTip(t, MenuKit.Keys("The decay tail — the impulse at the pre-delay (teal), the early reflections (drawn magnified), then the RT60 curve over 4 s. Drag the teal marker for the pre-delay, drag the tail for the decay; ⌥-click to type, double-click to reset."));+ ValueEntry.AttachHandles(t, [ValueEntry.DeviceParam(engine, track, di, Decay, "Decay", DecayF, SyncTail)],+ [ValueEntry.DeviceParam(engine, track, di, PreDelay, "Pre-delay", PreF, SyncTail)]);MidiLearn.Bind(t, MidiTarget.DeviceParam(track, di, Decay), "Decay");tails.Add(t);return t;diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.csindex 1043c927..8f477f2e 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.cs@@ -16,6 +16,7 @@using System;using System.Collections.Generic;+using System.Linq;using Avalonia;using Avalonia.Controls;using Avalonia.Controls.Primitives;@@ -88,6 +89,8 @@ internal sealed class ShutterDeviceBody : IDeviceBodyvar readouts = new List<Action>();void RefreshAll() { for (int i = 0; i < readouts.Count; i++) readouts[i](); }+ // A typeable value for a graph handle (⌥-click it, specs/035).+ ValueField F(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, RefreshAll);var scope = new float[kScope];var frozen = new float[kScope];int scN = 0;@@ -351,8 +354,9 @@ internal sealed class ShutterDeviceBody : IDeviceBodyLastChildFill = true, Margin = new Thickness(8, 5, 8, 0),Children = { Docked(head, Dock.Top), Docked(knobs, Dock.Bottom), new Border { Margin = new Thickness(0, 5, 0, 0), Child = window } },};- void WireDrag(ShDragView v, Func<int, int> param)+ void WireDrag<T>(T v, Func<int, int> param, params ValueField[] fields) where T : ShDragView{+ ValueEntry.AttachHandles(v, fields.Select(f => (IReadOnlyList<ValueField>)new[] { f }).ToArray());v.Value = h => P(param(h));v.Changed += (h, x) => { Raw(param(h), x); Refresh(); }; // the graph redraws from the new value at oncev.GestureBegin += h => Begin(param(h));@@ -402,8 +406,9 @@ internal sealed class ShutterDeviceBody : IDeviceBodyControl SignalTab(){signal = new ShSignalView();- WireDrag(signal, h => h == ShSignalView.HThreshold ? Threshold : Return);- ToolTip.SetTip(signal, "The input (teal) and what passes (neutral ink) over the window, with the threshold (dashed) and where the gate closes again (dashed). Drag a line up or down; double-click resets it.");+ WireDrag(signal, h => h == ShSignalView.HThreshold ? Threshold : Return,+ F(Threshold, "Threshold", v => ThrShort(v) + "\u2009dB"), F(Return, "Return", RetF));+ ToolTip.SetTip(signal, MenuKit.Keys("The input (teal) and what passes (neutral ink) over the window, with the threshold (dashed) and where the gate closes again (dashed). Drag a line up or down; double-click resets it, ⌥-click types it."));Learn(signal, Threshold);var liveBtn = Latch(-1, () => live, () => { live = !live; if (!live) Array.Copy(scope, frozen, kScope); }, () => live ? "Live" : "Frozen",@@ -431,8 +436,9 @@ internal sealed class ShutterDeviceBody : IDeviceBodyControl EnvelopeTab(){envView = new ShEnvelopeView();- WireDrag(envView, h => h switch { ShEnvelopeView.HAttack => Attack, ShEnvelopeView.HHold => Hold, ShEnvelopeView.HRelease => Release, _ => Floor });- ToolTip.SetTip(envView, "One opening: attack, hold, release in the chosen shape, down to the floor (inverted for Duck). Drag a node sideways for its time, the teal floor up or down; double-click resets.");+ WireDrag(envView, h => h switch { ShEnvelopeView.HAttack => Attack, ShEnvelopeView.HHold => Hold, ShEnvelopeView.HRelease => Release, _ => Floor },+ F(Attack, "Attack", AtkF), F(Hold, "Hold", HoldF), F(Release, "Release", RelF), F(Floor, "Floor", FloorF));+ ToolTip.SetTip(envView, MenuKit.Keys("One opening: attack, hold, release in the chosen shape, down to the floor (inverted for Duck). Drag a node sideways for its time, the teal floor up or down; double-click resets, ⌥-click types."));Learn(envView, Release);var shapes = Chips(Shapes, i => Sel(Shape, 3) == i, i => SetP(Shape, i / 2f), Shape,@@ -460,8 +466,8 @@ internal sealed class ShutterDeviceBody : IDeviceBodyControl SidechainTab(){keyView = new ShKeyView();- WireDrag(keyView, h => h == ShKeyView.HHp ? DetHP : DetLP);- ToolTip.SetTip(keyView, "The detector's band-pass (teal) — only this part of the key opens the gate — over the reduction in the window (neutral ink). Drag the nodes sideways; double-click resets.");+ WireDrag(keyView, h => h == ShKeyView.HHp ? DetHP : DetLP, F(DetHP, "SC HP", HpF), F(DetLP, "SC LP", LpF));+ ToolTip.SetTip(keyView, MenuKit.Keys("The detector's band-pass (teal) — only this part of the key opens the gate — over the reduction in the window (neutral ink). Drag the nodes sideways; double-click resets, ⌥-click types."));Learn(keyView, DetHP);var eq = Latch(DetFilter, () => On(DetFilter), () => SetP(DetFilter, On(DetFilter) ? 0f : 1f), () => On(DetFilter) ? "SC EQ on" : "SC EQ off",@@ -519,7 +525,7 @@ internal sealed class ShutterDeviceBody : IDeviceBodyint patTool = 0;// A slider drawn as a filled bar with its value inside (Complexity / Smooth / Swing).- Control FillBar(int p, Func<string> text, string tip)+ Control FillBar(int p, string name, Func<double, string> fmt, string tip){var fill = new Border { HorizontalAlignment = HorizontalAlignment.Left, Background = NotaPalette.Wash(NotaPalette.VizInk, 0x30) };var tb = new TextBlock { FontSize = 9, Foreground = TextPrimary, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center };@@ -534,7 +540,7 @@ internal sealed class ShutterDeviceBody : IDeviceBody{double v = P(p);fill.Width = Math.Max(0, grid.Bounds.Width * v);- tb.Text = text();+ tb.Text = fmt(P(p));host.BorderBrush = drag ? Brass : v > 0.004 ? NotaPalette.BorderStrong : BorderDef;tb.Foreground = v > 0.004 ? TextPrimary : TextSecondary;}@@ -551,7 +557,8 @@ internal sealed class ShutterDeviceBody : IDeviceBodygrid.SizeChanged += (_, _) => Paint();readouts.Add(() => { if (!drag) Paint(); });Learn(host, p);- ToolTip.SetTip(host, tip);+ ToolTip.SetTip(host, MenuKit.Keys(tip + " · ⌥-click to type"));+ ValueEntry.Attach(host, F(p, name, fmt), tb);return host;}@@ -629,12 +636,12 @@ internal sealed class ShutterDeviceBody : IDeviceBody};ToolTip.SetTip(browser, "Pattern shapes — the arrows step through them (fitted to the grid)");var rnd = Button("Rnd", Randomize, "Roll a new pattern — Complexity sets how busy and how varied it is");- var cx = FillBar(PatComplexity, () => "Complexity " + Pct(P(PatComplexity)), "Complexity — how busy and varied Rnd makes the pattern");+ var cx = FillBar(PatComplexity, "Complexity", v => "Complexity " + Pct((float)v), "Complexity — how busy and varied Rnd makes the pattern");var head = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*,Auto,110"), ColumnSpacing = 5, Height = 20 };head.Children.Add(tools); head.Children.Add(Col(browser, 1)); head.Children.Add(Col(rnd, 2)); head.Children.Add(Col(cx, 3));- var smooth = FillBar(PatSmooth, () => "Smooth " + Pct(P(PatSmooth)), "Smooth — ramps into each step instead of jumping (up to half a step)");- var swing = FillBar(PatSwing, () => NotaNum.F($"Swing {P(PatSwing) * 75:0} %"), "Swing — every second step comes late");+ var smooth = FillBar(PatSmooth, "Smooth", v => "Smooth " + Pct((float)v), "Smooth — ramps into each step instead of jumping (up to half a step)");+ var swing = FillBar(PatSwing, "Swing", v => NotaNum.F($"Swing {v * 75:0} %"), "Swing — every second step comes late");var nSt = Mono("", 9, TextPrimary); var nLv = Mono("", 9, TextPrimary);readouts.Add(() => { nSt.Text = NSteps().ToString(); nLv.Text = NLevels().ToString(); });Border Cycle(TextBlock t, Action a, string tip)diff --git a/src/managed/Nota.App/DeviceCards/Bodies/VintageDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/VintageDeviceBody.csindex f246cbf8..a8aa5d04 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/VintageDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/VintageDeviceBody.cs@@ -60,6 +60,8 @@ internal sealed class VintageDeviceBody : IDeviceBodyvar readouts = new List<Action>();// by index: a panel built lazily inside a readout (the Tone tab's two bodies) adds its ownvoid RefreshAll() { for (int i = 0; i < readouts.Count; i++) readouts[i](); }+ // A typeable value for a fader or a graph (⌥-click it, specs/035).+ ValueField F(int p, string name, Func<double, string> fmt) => ValueEntry.DeviceParam(engine, track, di, p, name, fmt, RefreshAll);var scope = new float[kScope];int scN = 0;double Sc(int i) => scN > i ? scope[i] : 0;@@ -272,14 +274,15 @@ internal sealed class VintageDeviceBody : IDeviceBody// ======================================================================// LEFT — STATE column (drive · wear)// ======================================================================- Control StateFader(int p, string label, IBrush ink, string tip)+ Control StateFader(int p, string label, IBrush ink, Func<double, string> fmt, string tip){var f = new AfFader { Ink = ink, Width = 16, VerticalAlignment = VerticalAlignment.Stretch, Default = engine.DeviceParamDefault(track, di, p) };f.Changed += v => { Raw(p, (float)v); RefreshAll(); };f.GestureBegin += () => Begin(p);f.GestureEnd += () => End(p);Learn(f, p);- ToolTip.SetTip(f, tip);+ ToolTip.SetTip(f, MenuKit.Keys(tip));+ ValueEntry.Attach(f, F(p, NotaText.Label(label), fmt));readouts.Add(() => f.Set(P(p), double.NaN));var lb = Caps(label); lb.HorizontalAlignment = HorizontalAlignment.Center;return new DockPanel { Children = { Docked(lb, Dock.Bottom), new Border { Margin = new Thickness(0, 0, 0, 3), Child = f } } };@@ -294,8 +297,8 @@ internal sealed class VintageDeviceBody : IDeviceBodystateTitle.Foreground = Sc(S_InPk) > 0.01 ? AccentBright : TextTertiary; // lit while signal passes});var faders = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto"), ColumnSpacing = 9, HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(0, 4, 0, 4) };- faders.Children.Add(StateFader(Drive, "DRV", NotaPalette.VizInk, "Drive — how hard the signal hits the saturation. Double-click resets."));- faders.Children.Add(Col(StateFader(Wear, "WEAR", Teal, "Wear — the age of the medium: a narrower band, more hiss and crackle, a wandering flutter. Double-click resets."), 1));+ faders.Children.Add(StateFader(Drive, "DRV", NotaPalette.VizInk, Pct, "Drive — how hard the signal hits the saturation. ⌥-click types, double-click resets."));+ faders.Children.Add(Col(StateFader(Wear, "WEAR", Teal, Pct, "Wear — the age of the medium: a narrower band, more hiss and crackle, a wandering flutter. ⌥-click types, double-click resets."), 1));var stateCol = new RuleSection{Width = 56, Padding = new Thickness(0, 5, 0, 4),@@ -314,7 +317,8 @@ internal sealed class VintageDeviceBody : IDeviceBodycurve.DragV += v => Raw(Drive, (float)v);curve.GestureBegin += () => Begin(Drive);curve.GestureEnd += () => End(Drive);- ToolTip.SetTip(curve, "The transfer curve the saturation runs — input level across, output up; dashed is the dry line, teal what you hear with Mix and Output, the dot where the input peak sits. Drag up or down for the drive.");+ ToolTip.SetTip(curve, MenuKit.Keys("The transfer curve the saturation runs — input level across, output up; dashed is the dry line, teal what you hear with Mix and Output, the dot where the input peak sits. Drag up or down for the drive, ⌥-click to type it."));+ ValueEntry.AttachAll(curve, F(Drive, "Drive", Pct));Learn(curve, Drive);var thd = Mono("", 7, TextTertiary);@@ -352,7 +356,13 @@ internal sealed class VintageDeviceBody : IDeviceBodywearView.DragH += v => Raw(wearShow == 1 ? FlutterRate : WowRate, (float)v);wearView.GestureBegin += () => { Begin(Wow); Begin(Flutter); Begin(WowRate); Begin(FlutterRate); };wearView.GestureEnd += () => { End(Wow); End(Flutter); End(WowRate); End(FlutterRate); };- ToolTip.SetTip(wearView, "The pitch drift over the last four seconds — wow in neutral ink, flutter in teal. Drag up or down for the depth of what is picked above, sideways for its rate.");+ ToolTip.SetTip(wearView, MenuKit.Keys("The pitch drift over the last four seconds — wow in neutral ink, flutter in teal. Drag up or down for the depth of what is picked above, sideways for its rate; ⌥-click to type them."));+ ValueEntry.AttachAll(wearView,+ new ValueField("Depth", () => P(wearShow == 1 ? Flutter : Wow), Pct, v => Raw(wearShow == 1 ? Flutter : Wow, (float)v),+ () => Begin(wearShow == 1 ? Flutter : Wow), () => End(wearShow == 1 ? Flutter : Wow)) { After = RefreshAll },+ new ValueField("Rate", () => P(wearShow == 1 ? FlutterRate : WowRate), v => wearShow == 1 ? FlutRateF(v) : WowRateF(v),+ v => Raw(wearShow == 1 ? FlutterRate : WowRate, (float)v),+ () => Begin(wearShow == 1 ? FlutterRate : WowRate), () => End(wearShow == 1 ? FlutterRate : WowRate)) { After = RefreshAll });Learn(wearView, Wow);var show = Chips(new[] { "Wow", "Flutter", "Both" }, i => wearShow == i, i => wearShow = i, -1);@@ -397,7 +407,8 @@ internal sealed class VintageDeviceBody : IDeviceBodyharm.DragV += v => Raw(Drive, (float)v);harm.GestureBegin += () => Begin(Drive);harm.GestureEnd += () => End(Drive);- ToolTip.SetTip(harm, "The harmonics the saturation adds at the input's level (the fundamental at the top), against the hiss floor in teal. Drag up or down for the drive.");+ ToolTip.SetTip(harm, MenuKit.Keys("The harmonics the saturation adds at the input's level (the fundamental at the top), against the hiss floor in teal. Drag up or down for the drive, ⌥-click to type it."));+ ValueEntry.AttachAll(harm, F(Drive, "Drive", Pct));Learn(harm, Drive);var peak = Mono("", 7, TextSecondary);diff --git a/src/managed/Nota.App/DeviceCards/Bodies/VocoderDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/VocoderDeviceBody.csindex ae6c10ce..78d0a169 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/VocoderDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/VocoderDeviceBody.cs@@ -295,7 +295,9 @@ internal sealed class VocoderDeviceBody : IDeviceBody};graph.ResetRequested += edge => { Reset(edge == 0 ? Low : High); RefreshAll(); };Learn(graph, Low);- ToolTip.SetTip(graph, "The modulator's level in each band (bars) and the carrier's (teal). Drag an edge to move Low or High; double-click an edge resets it.");+ ToolTip.SetTip(graph, MenuKit.Keys("The modulator's level in each band (bars) and the carrier's (teal). Drag an edge to move Low or High; ⌥-click an edge to type it, double-click resets it."));+ ValueEntry.AttachHandles(graph, [ValueEntry.DeviceParam(engine, track, di, Low, "Low", v => HzF(LowHz(v)), RefreshAll)],+ [ValueEntry.DeviceParam(engine, track, di, High, "High", v => HzF(HighHz(v)), RefreshAll)]);var knobs = new UniformGrid { Rows = 1, Columns = 7, Margin = new Thickness(0, 4, 0, 0) };knobs.Children.Add(K(Bands, "Bands", v => BandsOf(v).ToString(NotaNum.Culture), "Bands — how many bands, 8 … 32: fewer is more robotic, more is clearer", steps: 25));diff --git a/src/managed/Nota.App/DeviceCards/Instruments/AuroraInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/AuroraInstrumentCard.csindex e2876581..4d916132 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/AuroraInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/AuroraInstrumentCard.cs@@ -649,6 +649,7 @@ internal sealed class AuroraInstrumentCard : IInstrumentCardview.Target(title, P(ids[0]), P(ids[1]), P(ids[2]), P(ids[3]));string[] stage = { "A", "D", "S", "R" };Func<float, string>[] fmt = { v => Secs(v, 0.001, 2.0), v => Secs(v, 0.002, 3.0), Pct, v => Secs(v, 0.002, 4.0) };+ view.Format = (k, n) => fmt[k]((float)n); // ⌥-click a breakpoint to type itvar cells = new Grid { ColumnDefinitions = new ColumnDefinitions("*,*,*,*"), ColumnSpacing = 3 };for (int k = 0; k < 4; k++){@@ -657,6 +658,7 @@ internal sealed class AuroraInstrumentCard : IInstrumentCardvar v = Mono(fk(G(id)), TextPrimary, NotaType.RowLabel);v.HorizontalAlignment = HorizontalAlignment.Center;readouts.Add(() => v.Text = fk(G(id)));+ if (view.Field(k) is { } vf) ValueEntry.Attach(v, vf); // double-click the read-out to typevar cap = Cap(stage[k]); cap.HorizontalAlignment = HorizontalAlignment.Center;var cell = new Border{@@ -760,7 +762,7 @@ internal sealed class AuroraInstrumentCard : IInstrumentCardreadouts.Add(matrix.Refresh);var modHint = new TextBlock{- Text = "drag a cell — up adds, down subtracts · double-click clears", FontSize = NotaType.Axis,+ Text = MenuKit.Keys("drag a cell — up adds, down subtracts · ⌥-click types · double-click clears"), FontSize = NotaType.Axis,Foreground = TextDisabled, VerticalAlignment = VerticalAlignment.Center,};var modGrid = new Grid { RowDefinitions = new RowDefinitions("*,Auto"), RowSpacing = 1 };diff --git a/src/managed/Nota.App/DeviceCards/Instruments/BassInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/BassInstrumentCard.csindex f946d3c0..4bf893c6 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/BassInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/BassInstrumentCard.cs@@ -430,6 +430,7 @@ internal sealed class BassInstrumentCard : IInstrumentCard{v => Secs(v, 0.001, 2.0), v => Secs(v, 0.002, 4.0), Pct, v => Secs(v, 0.002, 5.0),};+ view.Format = (k, n) => fmt[k]((float)n); // ⌥-click a breakpoint to type itvar cells = new Grid { ColumnDefinitions = new ColumnDefinitions("*,*,*,*"), ColumnSpacing = 3 };for (int k = 0; k < 4; k++){@@ -438,6 +439,7 @@ internal sealed class BassInstrumentCard : IInstrumentCardvar v = Mono(fk(G(id)), TextPrimary, NotaType.KnobValue);v.HorizontalAlignment = HorizontalAlignment.Center;readouts.Add(() => v.Text = fk(G(id)));+ if (view.Field(k) is { } vf) ValueEntry.Attach(v, vf); // double-click the read-out to typevar cap = Cap(stage[k]); cap.HorizontalAlignment = HorizontalAlignment.Center;var cell = new Border{diff --git a/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.csindex 69f15779..de44f61d 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.cs@@ -450,6 +450,9 @@ internal sealed class ConsortInstrumentCard : IInstrumentCardcurve.Changed = (c, r) => { Raw("cutoff", (float)c); Raw("reso", (float)r); Refresh(); };curve.DragStarted += () => { Begin("cutoff"); Begin("reso"); };curve.DragEnded += () => { End("cutoff"); End("reso"); };+ if (I("cutoff") is var ci and >= 0 && I("reso") is var ri and >= 0) // ⌥-click types them (specs/035)+ ValueEntry.AttachAll(curve, ValueEntry.InstrumentParam(engine, track, ci, "cutoff", "Cutoff", v => Cut((float)v), Refresh),+ ValueEntry.InstrumentParam(engine, track, ri, "reso", "Reso", v => Tenths((float)v), Refresh));cur.Add(() => curve.Set(G("cutoff"), G("reso"), (G("spacing") - 0.5) * 6, Sel("filtmode", 3), On("basscomp")));var graph = new Border { Background = Inset, BorderBrush = BorderIn, BorderThickness = new Thickness(1), CornerRadius = NotaRadius.Control, Margin = new Thickness(0, 3, 0, 2), Child = curve };var head = new DockPanel { Height = 12, LastChildFill = false, Children = { Docked(Caps("DUAL LADDER"), Avalonia.Controls.Dock.Left), Docked(MonoText("24\u2009dB/oct", 7, Txt2), Avalonia.Controls.Dock.Right) } };@@ -1001,7 +1004,9 @@ internal sealed class ConsortInstrumentCard : IInstrumentCardvar tone = ConsortJacks.ToneBrush(ConsortJacks.Src(c.Src).Tone);var dep = MonoText($"{c.Depth * 100:+0;−0;0}", 8, tone);var depBox = new Border { Background = Brushes.Transparent, Cursor = new Cursor(StandardCursorType.SizeNorthSouth), Child = dep };- ToolTip.SetTip(depBox, "Depth — drag up / down (double-click: +50)");+ ToolTip.SetTip(depBox, MenuKit.Keys("Depth — drag up / down (⌥-click to type, double-click: +50)"));+ if (I(AmtId(slot)) is var ai and >= 0) // ⌥-click types the depth (specs/035)+ ValueEntry.Attach(depBox, ValueEntry.InstrumentParam(engine, track, ai, AmtId(slot), CableName(c), v => NotaNum.F($"{(v - 0.5) * 200:+0;−0;0}"), Refresh) with { Default = 0.75 }, dep);bool drag = false; double y0 = 0; float v0 = 0;depBox.PointerPressed += (_, e) =>{@@ -1058,7 +1063,7 @@ internal sealed class ConsortInstrumentCard : IInstrumentCard{var broken = CableList().Where(c => ConsortJacks.Normalled.Contains(c.Dst)).Select(c => ConsortJacks.Dst(c.Dst).Name).Distinct().ToList();string nb = broken.Count == 0 ? "all normals intact" : "normals broken at " + string.Join(" and ", broken);- return (vs.PatchView == 0 ? "Matrix view · drag a cell for depth, Alt-click to remove · " : $"Jack strip · {ConsortJacks.Points} points · ") + nb;+ return (vs.PatchView == 0 ? MenuKit.Keys("Matrix view · drag a cell for depth, ⌥-click to type it, double-click to remove · ") : $"Jack strip · {ConsortJacks.Points} points · ") + nb;}default:{diff --git a/src/managed/Nota.App/DeviceCards/Instruments/FluxInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/FluxInstrumentCard.csindex 62e23bd7..35c1a99a 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/FluxInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/FluxInstrumentCard.cs@@ -171,6 +171,11 @@ internal sealed class FluxInstrumentCard : IInstrumentCardpad.ValueChanged += (x, y) => { SetP("vecx", (float)x); SetP("vecy", (float)y); Refresh(); };pad.GestureBegin += () => { Begin("vecx"); Begin("vecy"); };pad.GestureEnd += () => { End("vecx"); End("vecy"); };+ // ⌥-click types the vector, X then Y (specs/035); double-click keeps its own reset.+ if (I("vecx") is var vx and >= 0 && I("vecy") is var vy and >= 0)+ ValueEntry.AttachAll(pad,+ ValueEntry.InstrumentParam(engine, track, vx, "vecx", "Vector X", NotaNum.Pct, Refresh) with { Default = null },+ ValueEntry.InstrumentParam(engine, track, vy, "vecy", "Vector Y", NotaNum.Pct, Refresh) with { Default = null });pad.Reset = () =>{Begin("vecx"); Begin("vecy");@@ -179,7 +184,7 @@ internal sealed class FluxInstrumentCard : IInstrumentCardEnd("vecx"); End("vecy");Refresh();};- ToolTip.SetTip(pad, "Drag to blend the four timbres · double-click to reset");+ ToolTip.SetTip(pad, MenuKit.Keys("Drag to blend the four timbres · ⌥-click to type · double-click to reset"));if (I("vecx") is var vxi and >= 0) MidiLearn.Bind(pad, MidiTarget.PluginParam(track, -1, vxi), "Vector X");bool VectorPulled() => live && TargetIdx() == 3;diff --git a/src/managed/Nota.App/DeviceCards/Instruments/GrainInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/GrainInstrumentCard.csindex fa457af3..b5b1c0d5 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/GrainInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/GrainInstrumentCard.cs@@ -165,7 +165,10 @@ internal sealed class GrainInstrumentCard : IInstrumentCardBegin("position"); SetP("position", engine.InstrumentParamDefault(track, pi)); End("position");Refresh();};- ToolTip.SetTip(wave, "Drag to move the read position · double-click to reset");+ ToolTip.SetTip(wave, MenuKit.Keys("Drag to move the read position · ⌥-click to type it · double-click to reset"));+ // ⌥-click types the read position (specs/035); double-click keeps its own reset.+ if (I("position") is var gpi and >= 0)+ ValueEntry.AttachAll(wave, ValueEntry.InstrumentParam(engine, track, gpi, "position", "Position", v => Pct((float)v), Refresh) with { Default = null });if (I("position") is var wpi and >= 0) MidiLearn.Bind(wave, MidiTarget.PluginParam(track, -1, wpi), "Position");// ---- shared builders --------------------------------------------------diff --git a/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.csindex 8fcf1227..95b14a3e 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.cs@@ -677,7 +677,8 @@ internal sealed class MosaicInstrumentCard : IInstrumentCardGet = () => G("rellen"), SetValue = v => { SetP("rellen", v); Refresh(); }, Begin = () => Begin("rellen"), End = () => End("rellen"),Default = Def("rellen"), UpIsMore = false, Node = 0.5,};- ToolTip.SetTip(lenCurve, "How much quieter a release sample gets the longer the key was held — drag up / down");+ ToolTip.SetTip(lenCurve, MenuKit.Keys("How much quieter a release sample gets the longer the key was held — drag up / down, ⌥-click to type"));+ ValueEntry.Attach(lenCurve, lenCurve.EntryField("Release length", v => NotaNum.Db(MosaicModel.RelLenDb((float)v), signed: true)));var lenWord = Mono("", TextSecondary, 7.5);readouts.Add(() => { lenWord.Text = $"{NotaNum.Db(MosaicModel.RelLenDb(G("rellen")), signed: true)} after 2 s hold"; lenCurve.InvalidateVisual(); });var velCurve = new MosaicCurveView@@ -687,7 +688,8 @@ internal sealed class MosaicInstrumentCard : IInstrumentCardGet = () => G("velcurve"), SetValue = v => { SetP("velcurve", v); Refresh(); }, Begin = () => Begin("velcurve"), End = () => End("velcurve"),Default = Def("velcurve"), UpIsMore = false,};- ToolTip.SetTip(velCurve, "Velocity → level: drag up for soft (quiet notes louder), down for hard");+ ToolTip.SetTip(velCurve, MenuKit.Keys("Velocity → level: drag up for soft (quiet notes louder), down for hard; ⌥-click to type"));+ ValueEntry.Attach(velCurve, velCurve.EntryField("Vel curve", v => { int c = MosaicModel.VelCurve((float)v); return c == 0 ? "0 linear" : c < 0 ? $"−{-c} soft" : $"+{c} hard"; }));var velWord = Mono("", TextSecondary, 7.5);string VelCurveWord() { int c = MosaicModel.VelCurve(G("velcurve")); return c == 0 ? "linear" : c < 0 ? $"soft +{-c}" : $"hard +{c}"; }readouts.Add(() => { velWord.Text = VelCurveWord(); velCurve.InvalidateVisual(); });@@ -725,7 +727,7 @@ internal sealed class MosaicInstrumentCard : IInstrumentCard// ======================= Env tab =========================================================var env = new SamplerEnvView();- ToolTip.SetTip(env, "Drag the nodes: attack, decay and sustain (up / down), release · Shift for fine steps · double-click resets");+ ToolTip.SetTip(env, MenuKit.Keys("Drag the nodes: attack, decay and sustain (up / down), release · Shift for fine steps · ⌥-click to type · double-click resets"));env.DragBegin += Begin;env.DragEnd += End;env.Changed += (id, v) => { SetP(id, v); Refresh(); };@@ -743,11 +745,19 @@ internal sealed class MosaicInstrumentCard : IInstrumentCard// ======================= Filter tab ======================================================var filt = new SamplerFilterView();- ToolTip.SetTip(filt, "Drag: left / right for the cutoff, up / down for the resonance · Shift for fine steps · double-click resets");+ ToolTip.SetTip(filt, MenuKit.Keys("Drag: left / right for the cutoff, up / down for the resonance · Shift for fine steps · ⌥-click to type · double-click resets"));filt.DragBegin += () => { Begin("cutoff"); Begin("resonance"); };filt.DragEnd += () => { End("cutoff"); End("resonance"); };filt.Changed += (id, v) => { SetP(id, v); Refresh(); };filt.Reset += () => { Write("cutoff", Def("cutoff")); Write("resonance", Def("resonance")); Refresh(); };+ // ⌥-click a node / the filter window to type it (specs/035).+ ValueField PF(string id, string name, Func<float, string> fmt) => new(name, () => G(id), v => fmt((float)v), v => SetP(id, v),+ () => Begin(id), () => End(id), I(id) >= 0 ? Def(id) : null) { After = Refresh };+ ValueEntry.AttachHandles(env,+ [PF("attack", "Attack", v => NotaNum.Time(MosaicModel.AttackSec(v)))],+ [PF("decay", "Decay", v => NotaNum.Time(MosaicModel.DecaySec(v))), PF("sustain", "Sustain", DbLin)],+ [PF("release", "Release", v => NotaNum.Time(MosaicModel.ReleaseSec(v)))]);+ ValueEntry.AttachAll(filt, PF("cutoff", "Cutoff", v => NotaNum.Hz(MosaicModel.CutoffHz(v))), PF("resonance", "Resonance", v => NotaNum.Pct(v)));string FiltTl(){int t = Sel("filtertype", 4);diff --git a/src/managed/Nota.App/DeviceCards/Instruments/OperatorInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/OperatorInstrumentCard.csindex e5b66460..88ab7547 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/OperatorInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/OperatorInstrumentCard.cs@@ -536,6 +536,14 @@ internal sealed class OperatorInstrumentCard : IInstrumentCard// The four ADSR knobs belong to whichever operator is selected, so they are rebuilt// per operator once and swapped — a knob is bound to one param index for its life.var stageCells = new Control[4, 4];+ Func<float, string> StageFmt(int s) => s switch+ {+ 0 => v => Secs(v, 0.001, 4.0),+ 1 => v => Secs(v, 0.002, 6.0),+ 2 => v => Level(v),+ _ => v => Secs(v, 0.002, 8.0),+ };+ env.Format = (s, n) => StageFmt(s)((float)n); // ⌥-click a breakpoint to type itstring[] stageIds = { "atk", "dec", "sus", "rel" };string[] stageNames = { "Attack", "Decay", "Sustain", "Release" };for (int o = 0; o < 4; o++)@@ -543,14 +551,7 @@ internal sealed class OperatorInstrumentCard : IInstrumentCardfor (int s = 0; s < 4; s++){string id = OpId[o] + stageIds[s];- Func<float, string> fmt = s switch- {- 0 => v => Secs(v, 0.001, 4.0),- 1 => v => Secs(v, 0.002, 6.0),- 2 => v => Level(v),- _ => v => Secs(v, 0.002, 8.0),- };- stageCells[o, s] = Knob(id, stageNames[s], fmt, cellW: 40);+ stageCells[o, s] = Knob(id, stageNames[s], StageFmt(s), cellW: 40);stageCells[o, s].IsVisible = false;envKnobHosts[s].Children.Add(stageCells[o, s]);}diff --git a/src/managed/Nota.App/DeviceCards/Instruments/PhysicalInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/PhysicalInstrumentCard.csindex b461d1e8..66fe0f08 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/PhysicalInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/PhysicalInstrumentCard.cs@@ -86,6 +86,11 @@ internal sealed class PhysicalInstrumentCard : IInstrumentCardvar noiseEnv = new VoltEnv(engine, track) { VerticalAlignment = VerticalAlignment.Stretch, MinWidth = 90, MinHeight = 50 };noiseEnv.Target("NOISE ENV", P("noisea"), P("noised"), P("noises"), P("noiser"));+ noiseEnv.Format = (k, n) => k switch // ⌥-click a breakpoint to type it+ {+ 0 => Secs(PhysicalModel.NoiseAttack((float)n)), 1 => Secs(PhysicalModel.NoiseDecay((float)n)),+ 2 => Pct((float)n), _ => Secs(PhysicalModel.NoiseRelease((float)n)),+ };var partials = new PhysPartialsView { VerticalAlignment = VerticalAlignment.Stretch };ToolTip.SetTip(partials, "Partials as the engine tunes them — drag ↔ to spread the series (Ratio), ↕ to tilt the highs (Bright)");@@ -226,13 +231,22 @@ internal sealed class PhysicalInstrumentCard : IInstrumentCardGrid.SetColumn(typeChips, 1); head.Children.Add(typeChips);Grid.SetColumn(envCap, 2); head.Children.Add(envCap);- // The ADSR editor with its stage times along the bottom edge.- var envTimes = Mono("", NotaPalette.TextAxis, NotaType.Axis);- envTimes.HorizontalAlignment = HorizontalAlignment.Right; envTimes.VerticalAlignment = VerticalAlignment.Bottom;- envTimes.Margin = new Thickness(0, 0, 6, 1); envTimes.IsHitTestVisible = false;- readouts.Add(() => envTimes.Text =- $"{Secs(PhysicalModel.NoiseAttack(G("noisea")))} · {Secs(PhysicalModel.NoiseDecay(G("noised")))} · "- + $"{Pct(G("noises"))} · {Secs(PhysicalModel.NoiseRelease(G("noiser")))}");+ // The ADSR editor with its stage times along the bottom edge — each one typeable+ // (double-click it, specs/035), since no A/D/S/R knobs sit beside the graph.+ var envTimes = new StackPanel+ {+ Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Right,+ VerticalAlignment = VerticalAlignment.Bottom, Margin = new Thickness(0, 0, 6, 1),+ };+ for (int k = 0; k < 4; k++)+ {+ int stage = k;+ if (k > 0) envTimes.Children.Add(Mono(" · ", NotaPalette.TextAxis, NotaType.Axis));+ var tv = Mono("", NotaPalette.TextAxis, NotaType.Axis);+ readouts.Add(() => tv.Text = noiseEnv.Field(stage) is { } f ? f.TextAt(f.Get()) : "");+ if (noiseEnv.Field(stage) is { } vf) ValueEntry.Attach(tv, vf);+ envTimes.Children.Add(tv);+ }var envHost = new Panel { Children = { noiseEnv, envTimes } };var knobs = KnobGrid(2,diff --git a/src/managed/Nota.App/DeviceCards/Instruments/RhythmInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/RhythmInstrumentCard.csindex ea0d110d..75021059 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/RhythmInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/RhythmInstrumentCard.cs@@ -411,7 +411,19 @@ internal sealed class RhythmInstrumentCard : IInstrumentCardstring secs = sampleSecs > 0 ? " · " + NotaNum.Unit((en - st) * sampleSecs, "0.00", "s") : "";sv.Set(sampleName, Hue(sel), st, en, G(P("reverse")) >= 0.5f, posSel, $"{RM.Pct(st)} → {RM.Pct(en)}{secs}");});- ToolTip.SetTip(sv, "Drag the Start and End lines to set them · double-click to load another file");+ ToolTip.SetTip(sv, MenuKit.Keys("Drag the Start and End lines to set them · ⌥-click one to type it · double-click to load another file"));+ {+ // ⌥-click a line to type it (specs/035); double-click still loads a file, so no reset here.+ string st = P("start"), ln = P("length");+ ValueEntry.AttachHandles(sv,+ [new ValueField("Start", () => G(st), v => RM.Pct(v), v =>+ {+ float en = (float)RM.RegionEnd(G(st), G(ln)), ns = (float)Math.Clamp(v, 0, en - 0.01);+ SetP(st, ns); SetP(ln, en - ns);+ }, () => { Begin(st); Begin(ln); }, () => { End(st); End(ln); }) { After = Refresh }],+ [new ValueField("End", () => RM.RegionEnd(G(st), G(ln)), v => RM.Pct(v), v => SetP(ln, (float)Math.Clamp(v - G(st), 0.01, 1.0)),+ () => Begin(ln), () => End(ln)) { After = Refresh }]);+ }AcceptDrops(sv, sel, _ => { });graph = sv;}@@ -428,7 +440,13 @@ internal sealed class RhythmInstrumentCard : IInstrumentCardstring cap = pit > 0 ? $"{RM.Ms(pit)} · {RM.Ms(dec)}" : RM.Ms(dec);hv.Set(RM.VoiceNames[sel], dec, pit, RM.DecaySeconds(sel, 1, 0) * 0.8, pu, flashSel, cap);});- ToolTip.SetTip(hv, "The hit: amp contour over the pitch drop · drag across for Decay, up / down for Tune (Shift = fine)");+ ToolTip.SetTip(hv, MenuKit.Keys("The hit: amp contour over the pitch drop · drag across for Decay, up / down for Tune (Shift = fine) · ⌥-click to type them"));+ {+ string dk = P("decay"), tn = P("tune");+ ValueEntry.AttachAll(hv,+ new ValueField("Decay", () => G(dk), v => RM.Pct(v), v => SetP(dk, (float)v), () => Begin(dk), () => End(dk)) { After = Refresh },+ new ValueField("Tune", () => G(tn), v => RM.Pct(v), v => SetP(tn, (float)v), () => Begin(tn), () => End(tn)) { After = Refresh });+ }AcceptDrops(hv, sel, _ => { });graph = hv;}diff --git a/src/managed/Nota.App/DeviceCards/Instruments/SamplerInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/SamplerInstrumentCard.csindex 347ea9dc..f4fec037 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/SamplerInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/SamplerInstrumentCard.cs@@ -222,11 +222,27 @@ internal sealed class SamplerInstrumentCard : IInstrumentCardvar wave = new SamplerWaveView();wave.SetEmpty("Drop a sample here");if (hasSample) wave.SetPeaks(SamplerModel.Peaks(raw, ch, 1200), durSec);- ToolTip.SetTip(wave, hasSample ? "Drag Start / End (and the loop markers when looping) · double-click a marker to reset it" : "Drag a sample from the Files tab or the browser");+ ToolTip.SetTip(wave, hasSample ? MenuKit.Keys("Drag Start / End (and the loop markers when looping) · ⌥-click a marker to type it · double-click to reset it") : "Drag a sample from the Files tab or the browser");wave.DragBegin += hnd => Begin(SamplerWaveView.HandleId(hnd));wave.DragEnd += hnd => End(SamplerWaveView.HandleId(hnd));wave.Moved += (hnd, f) => { SetP(SamplerWaveView.HandleId(hnd), f); Refresh(); };wave.ResetHandle += hnd => { var id = SamplerWaveView.HandleId(hnd); Write(id, Def(id)); Refresh(); };+ // ⌥-click a marker to type where it sits, in seconds into the file (specs/035).+ // Held to the same limits a drag keeps: Start before End, the loop inside them.+ ValueField WF(int h)+ {+ string id = SamplerWaveView.HandleId(h);+ double Limit(double f) => h switch+ {+ 0 => Math.Min(f, G("end") - 0.001),+ 1 => Math.Max(f, G("start") + 0.001),+ 2 => Math.Clamp(Math.Min(f, G("loopend") - 0.001), G("start"), G("end")),+ _ => Math.Clamp(Math.Max(f, G("loopstart") + 0.001), G("start"), G("end")),+ };+ return PF(id, new[] { "Start", "End", "Loop start", "Loop end" }[h], v => NotaNum.Unit(v * durSec, "0.000", "s"))+ with { Set = v => SetP(id, Limit(Math.Clamp(v, 0, 1))) };+ }+ ValueEntry.AttachHandles(wave, [WF(0)], [WF(1)], [WF(2)], [WF(3)]);readouts.Add(() => wave.Set(G("start"), G("end"), G("loopstart"), G("loopend"), LoopSel(), SamplerModel.CrossfadeSec(G("loopxfade")),hasSample ? $"{NotaNum.Str(sr / 1000, "0.#")} k · {NotaNum.Unit(durSec, "0.00", "s")} · root {SamplerModel.NoteName(rootv)}" : "",hasSample ? LoopWord() : ""));@@ -317,7 +333,7 @@ internal sealed class SamplerInstrumentCard : IInstrumentCard// ================= Env tab =================var env = new SamplerEnvView();- ToolTip.SetTip(env, "Drag the nodes: attack, decay and sustain (up / down), release · Shift for fine steps · double-click resets");+ ToolTip.SetTip(env, MenuKit.Keys("Drag the nodes: attack, decay and sustain (up / down), release · Shift for fine steps · ⌥-click to type · double-click resets"));env.DragBegin += Begin;env.DragEnd += End;env.Changed += (id, v) => { SetP(id, v); Refresh(); };@@ -348,11 +364,19 @@ internal sealed class SamplerInstrumentCard : IInstrumentCard// ================= Filter tab =================var filt = new SamplerFilterView();- ToolTip.SetTip(filt, "Drag: left / right for the cutoff, up / down for the resonance · Shift for fine steps · double-click resets");+ ToolTip.SetTip(filt, MenuKit.Keys("Drag: left / right for the cutoff, up / down for the resonance · Shift for fine steps · ⌥-click to type · double-click resets"));filt.DragBegin += () => { Begin("cutoff"); Begin("resonance"); };filt.DragEnd += () => { End("cutoff"); End("resonance"); };filt.Changed += (id, v) => { SetP(id, v); Refresh(); };filt.Reset += () => { Write("cutoff", Def("cutoff")); Write("resonance", Def("resonance")); Refresh(); };+ // ⌥-click a node / the filter window to type it (specs/035).+ ValueField PF(string id, string name, Func<float, string> fmt) => new(name, () => G(id), v => fmt((float)v), v => SetP(id, v),+ () => Begin(id), () => End(id), I(id) >= 0 ? Def(id) : null) { After = Refresh };+ ValueEntry.AttachHandles(env,+ [PF("attack", "Attack", v => NotaNum.Time(SamplerModel.AttackSec(v)))],+ [PF("decay", "Decay", v => NotaNum.Time(SamplerModel.DecaySec(v))), PF("sustain", "Sustain", DbLin)],+ [PF("release", "Release", v => NotaNum.Time(SamplerModel.ReleaseSec(v)))]);+ ValueEntry.AttachAll(filt, PF("cutoff", "Cutoff", v => NotaNum.Hz(SamplerModel.CutoffHz(v))), PF("resonance", "Resonance", v => NotaNum.Pct(v)));string FiltTl(){int t = Sel("filtertype", 4);diff --git a/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.csindex 1b297595..7ab82ee6 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/VoltInstrumentCard.cs@@ -491,6 +491,7 @@ internal sealed class VoltInstrumentCard : IInstrumentCard{v => Secs(v, 0.001, 2.0), v => Secs(v, 0.002, 4.0), Pct, v => Secs(v, 0.002, 5.0),};+ view.Format = (k, n) => fmt[k]((float)n); // ⌥-click a breakpoint to type itvar cells = new Grid { ColumnDefinitions = new ColumnDefinitions("*,*,*,*"), ColumnSpacing = 3 };for (int k = 0; k < 4; k++){@@ -499,6 +500,7 @@ internal sealed class VoltInstrumentCard : IInstrumentCardvar v = Mono(fk(G(id)), TextPrimary, NotaType.RowLabel);v.HorizontalAlignment = HorizontalAlignment.Center;readouts.Add(() => v.Text = fk(G(id)));+ if (view.Field(k) is { } vf) ValueEntry.Attach(v, vf); // double-click the read-out to typevar cap = Cap(stage[k]); cap.HorizontalAlignment = HorizontalAlignment.Center;var cell = new Border{@@ -617,7 +619,7 @@ internal sealed class VoltInstrumentCard : IInstrumentCard}var modHint = new TextBlock{- Text = "drag a cell — up adds, down subtracts · double-click clears", FontSize = NotaType.Axis,+ Text = MenuKit.Keys("drag a cell — up adds, down subtracts · ⌥-click types · double-click clears"), FontSize = NotaType.Axis,Foreground = TextDisabled, VerticalAlignment = VerticalAlignment.Center,};var modGrid = new Grid { RowDefinitions = new RowDefinitions("*,Auto"), RowSpacing = 3 };diff --git a/src/managed/Nota.App/DeviceCards/Midi/ArpMidiBody.cs b/src/managed/Nota.App/DeviceCards/Midi/ArpMidiBody.csindex fa5a9891..e0294242 100644--- a/src/managed/Nota.App/DeviceCards/Midi/ArpMidiBody.cs+++ b/src/managed/Nota.App/DeviceCards/Midi/ArpMidiBody.cs@@ -442,6 +442,11 @@ internal sealed class ArpMidiBody : IMidiDeviceBodyChild = new DockPanel { Children = { WithDock(Btn("−", -1), Dock.Left), WithDock(Btn("+", +1), Dock.Right), val } } };box.PointerPressed += (_, ev) => { if ((ev.ClickCount == 2 || (ev.KeyModifiers & KeyModifiers.Alt) != 0)) { S(p, Def(p)); Refresh(); } };Learn(box, p, label);+ // ⌥-click types the value, a double-click resets it (specs/035); the field sees both first.+ double N(int v) => max > min ? (v - min) / (double)(max - min) : 0;+ int V(double n) => (int)Math.Round(min + Math.Clamp(n, 0, 1) * (max - min));+ ValueEntry.Attach(box, new ValueField(NotaText.Label(label), () => N(GI(p)), n => fmt(V(n)), n => S(p, V(n)),+ () => Begin(p), () => End(p), N((int)Math.Round(Def(p)))) { After = Refresh }, val);readouts.Add(() =>{int v = GI(p);diff --git a/src/managed/Nota.App/DeviceCards/Midi/ChordMidiBody.cs b/src/managed/Nota.App/DeviceCards/Midi/ChordMidiBody.csindex 83fb10fe..6809f133 100644--- a/src/managed/Nota.App/DeviceCards/Midi/ChordMidiBody.cs+++ b/src/managed/Nota.App/DeviceCards/Midi/ChordMidiBody.cs@@ -487,7 +487,9 @@ internal sealed class ChordMidiBody : IMidiDeviceBodyvoid Stop() { if (!drag) return; drag = false; End(p); Edited(); }hit.PointerReleased += (_, ev) => { if (drag) ev.Pointer.Capture(null); Stop(); };hit.PointerCaptureLost += (_, _) => Stop();- ToolTip.SetTip(hit, $"Shift {s + 1} velocity offset — drag sideways, double-click resets");+ ToolTip.SetTip(hit, MenuKit.Keys($"Shift {s + 1} velocity offset — drag sideways, ⌥-click to type, double-click resets"));+ ValueEntry.Attach(hit, new ValueField($"Shift {s + 1} velocity", () => (GI(p) + 64) / 127.0, n => Sgn((int)Math.Round(-64 + n * 127)),+ n => { S(p, (int)Math.Round(-64 + Math.Clamp(n, 0, 1) * 127)); ui.CustomPinned = true; Refresh(); }, () => Begin(p), () => End(p), 64 / 127.0) { After = Edited }, tb);Learn(hit, p, $"Shift {s + 1} velocity");readouts.Add(() => { int v = GI(p); tb.Text = Sgn(v); tb.Foreground = v != 0 ? Txt : Cap; });return hit;diff --git a/src/managed/Nota.App/DeviceCards/Midi/ScaleMidiBody.cs b/src/managed/Nota.App/DeviceCards/Midi/ScaleMidiBody.csindex f4b64c00..e47f2b2a 100644--- a/src/managed/Nota.App/DeviceCards/Midi/ScaleMidiBody.cs+++ b/src/managed/Nota.App/DeviceCards/Midi/ScaleMidiBody.cs@@ -440,7 +440,9 @@ internal sealed class ScaleMidiBody : IMidiDeviceBodyHeight = 14, Background = Well, BorderBrush = Bd, BorderThickness = new Thickness(1), CornerRadius = NotaRadius.Badge,Child = new DockPanel { Children = { WithDock(dec, Dock.Left), WithDock(inc, Dock.Right), valHit } },};- ToolTip.SetTip(box, $"{label} — ± an octave, drag or scroll the note for semitones, double-click resets. Notes outside the range pass through.");+ ToolTip.SetTip(box, MenuKit.Keys($"{label} — ± an octave, drag or scroll the note for semitones, ⌥-click the note to type it, double-click resets. Notes outside the range pass through."));+ ValueEntry.Attach(valHit, new ValueField(label, () => Get() / 127.0, n => DeviceCardKit.NoteName((int)Math.Round(n * 127)),+ n => Put((int)Math.Round(Math.Clamp(n, 0, 1) * 127)), () => Begin(p), () => End(p), p == PRangeLo ? 0 : 1), val);Learn(box, p, label);return box;}diff --git a/src/managed/Nota.App/DeviceCards/Midi/VelocityMidiBody.cs b/src/managed/Nota.App/DeviceCards/Midi/VelocityMidiBody.csindex 5b0f7a13..ed092d65 100644--- a/src/managed/Nota.App/DeviceCards/Midi/VelocityMidiBody.cs+++ b/src/managed/Nota.App/DeviceCards/Midi/VelocityMidiBody.cs@@ -299,7 +299,15 @@ internal sealed class VelocityMidiBody : IMidiDeviceBodyrange.GestureBegin += h => Begin(h == 0 ? POutLo : POutHi);range.GestureEnd += h => End(h == 0 ? POutLo : POutHi);range.Changed += (h, n) => { if (h == 0) SetLo(1 + n * 126); else SetHi(1 + n * 126); Refresh(); };- ToolTip.SetTip(range, "Out range — drag a handle, double-click resets to 1–127");+ ToolTip.SetTip(range, MenuKit.Keys("Out range — drag a handle, ⌥-click to type it, double-click resets to 1–127"));+ {+ string Vel(double n) => ((int)Math.Round(1 + Math.Clamp(n, 0, 1) * 126)).ToString(NotaNum.Culture);+ ValueEntry.AttachHandles(range,+ [new ValueField("Out low", () => range.Lo, Vel, n => SetLo(1 + n * 126), () => Begin(POutLo), () => End(POutLo))+ { Reset = range.Reset, After = Refresh }],+ [new ValueField("Out high", () => range.Hi, Vel, n => SetHi(1 + n * 126), () => Begin(POutHi), () => End(POutHi))+ { After = Refresh }]);+ }Learn(range, POutHi, "Out High");readouts.Add(() =>{diff --git a/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.cs b/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.csindex f01bb214..edb4afa7 100644--- a/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.cs+++ b/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.cs@@ -352,6 +352,10 @@ internal sealed class MosaicCurveView : Controlpublic MosaicCurveView() { ClipToBounds = true; Cursor = new Cursor(StandardCursorType.SizeNorthSouth); }+ /// <summary>The value as a typeable field (⌥-click, specs/035); <paramref name="text"/> is its read-out.</summary>+ public ValueField EntryField(string name, Func<double, string> text) => new(name, () => Get(), text,+ v => SetValue?.Invoke((float)v), () => Begin?.Invoke(), () => End?.Invoke(), Default) { After = InvalidateVisual };+protected override void OnPointerPressed(PointerPressedEventArgs e){base.OnPointerPressed(e);diff --git a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.csindex dd9ec996..71ce435d 100644--- a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs+++ b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.Drum.cs@@ -463,7 +463,9 @@ internal sealed partial class RackCardViewvar tb = DrumMono(PanText(a.ChainPan(c)), TextSecondary, 7);tb.HorizontalAlignment = HorizontalAlignment.Center;var host = new Border { Background = Brushes.Transparent, Cursor = new Cursor(StandardCursorType.SizeNorthSouth), Child = tb };- ToolTip.SetTip(host, "Pad pan · drag up or down, double-click to centre");+ ToolTip.SetTip(host, MenuKit.Keys("Pad pan · drag up or down, ⌥-click to type, double-click to centre"));+ ValueEntry.Attach(host, new ValueField("Pan", () => (a.ChainPan(c) + 1) / 2, n => PanText((float)(n * 2 - 1)),+ n => a.SetChainPan(c, (float)Math.Clamp(n * 2 - 1, -1, 1)), Default: 0.5) { After = () => tb.Text = PanText(a.ChainPan(c)) }, tb); // specs/035bool drag = false; double lastY = 0;host.PointerPressed += (_, e) =>{diff --git a/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.cs b/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.csindex 63819afb..32808902 100644--- a/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.cs+++ b/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.cs@@ -16,7 +16,8 @@// and resonance (y); the cutoff the loudest voice hears after key// tracking and the envelope shows as a teal line.//-// All in the NotaGraph window (well, hairline, radius 4, corner labels in mono 7).+// ⌥-click a marker, a node or the filter window to type its values (the card attaches the+// fields, specs/035). All in the NotaGraph window (well, hairline, radius 4, corner labels in mono 7).using System;using System.Collections.Generic;@@ -46,7 +47,7 @@ internal static class SamplerInk}// ---- the sample --------------------------------------------------------------------------internal sealed class SamplerWaveView : Control+internal sealed class SamplerWaveView : Control, IValueHandles{private float[] _peaks = Array.Empty<float>();private double _start, _end = 1, _ls, _le = 1, _xf, _dur, _play = -1;@@ -74,6 +75,11 @@ internal sealed class SamplerWaveView : Controlprivate double[] Handles() => _loop > 0 ? new[] { _start, _end, _ls, _le } : new[] { _start, _end };+ // Typed entry: the markers, in HandleId order (start · end · loop start · loop end).+ public int HandleAt(Point p) => Bounds.Width <= 0 || _peaks.Length == 0 ? -1 : Hit(p.X / Bounds.Width, Bounds.Width);+ public Rect HandleRect(int handle)+ => handle < Handles().Length ? ValueEntry.Near(new Point(Handles()[handle] * Bounds.Width, 0), Bounds.Size) : default;+private int Hit(double xFrac, double w){var hs = Handles();@@ -270,7 +276,7 @@ internal sealed class SamplerKeysView : Control}// ---- the amp envelope --------------------------------------------------------------------internal sealed class SamplerEnvView : Control+internal sealed class SamplerEnvView : Control, IValueHandles{private double _a, _d = 0.3, _s = 1, _r = 0.06;private SamplerModel.Snapshot? _live;@@ -309,6 +315,22 @@ internal sealed class SamplerEnvView : Controlprivate static readonly string[] Ids = { "attack", "decay", "release" };+ // Typed entry: 0 = the attack node, 1 = decay / sustain, 2 = release (as a drag picks them).+ private int NodeAt(Point p)+ {+ var n = Nodes();+ var pts = new[] { n.A, n.D, n.R };+ int best = -1; double bd = 10;+ for (int i = 0; i < 3; i++) { double dd = Math.Abs(p.X - pts[i].X) + Math.Abs(p.Y - pts[i].Y) * 0.5; if (dd < bd) { bd = dd; best = i; } }+ return best;+ }+ public int HandleAt(Point p) => NodeAt(p);+ public Rect HandleRect(int handle)+ {+ var n = Nodes();+ return ValueEntry.Near(handle switch { 0 => n.A, 1 => n.D, _ => n.R }, Bounds.Size);+ }+protected override void OnPointerPressed(PointerPressedEventArgs e){if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.csindex 141ff74d..9fcf146b 100644--- a/src/managed/Nota.App/MainWindow.axaml.cs+++ b/src/managed/Nota.App/MainWindow.axaml.cs@@ -195,6 +195,7 @@ public partial class MainWindow : Window_exporter = App.Services.GetRequiredService<IAudioExporter>();Timeline.Engine = vm.Engine;+ ValueEntry.UndoGroup = (vm.Engine.BeginUndoGroup, vm.Engine.EndUndoGroup); // a handle's reset is one stepTimeline.GetMasterVolume = () => (float)vm.Transport.MasterVolume; // Master row faderTimeline.SetMasterVolume = v => vm.Transport.MasterVolume = v;Timeline.FreezeRole = FreezeRoleOf; // live-freeze (v1.1) header badgesdiff --git a/src/managed/Nota.App/PreferencesWindow.cs b/src/managed/Nota.App/PreferencesWindow.csindex a6db11f1..0a343ddc 100644--- a/src/managed/Nota.App/PreferencesWindow.cs+++ b/src/managed/Nota.App/PreferencesWindow.cs@@ -1506,7 +1506,7 @@ public sealed partial class PreferencesWindow : NotaWindow("Double-click a browser instrument", "Swap it onto the selected instrument track · clips and effects stay · no track selected starts one"),("⌥ + double-click a browser instrument", "Always start a new track with it"),("Right-click the metronome", "Count-in before Play / Record: off · 1 · 2 · 4 bars"),- ("Drag an audio clip's ADSR handle", "Shape attack · decay + sustain · release (top corners and the dot on hover) · double-click resets the stage"),+ ("Drag an audio clip's ADSR handle", "Shape attack · decay + sustain · release (top corners and the dot on hover) · ⌥-click types the stage · double-click resets it"),("⇧-click track header", "Add the track to the selection · again to remove it"),("Right-click track headers", "A multi-selection gets its own menu: colour, height, freeze, group, copy, duplicate, delete"),("Drag a track's bottom edge", "Resize the track (header or lane) · snaps to compact / standard / large · a multi-selection resizes together"),@@ -1534,7 +1534,9 @@ public sealed partial class PreferencesWindow : NotaWindow("Drag slider", "Left / right (or up / down) changes the value · hold ⌘ or ⇧ for fine steps"),("⌥-click a knob, fader or slider", "Type a value (units like k, ms, dB, L / R work) · double-click its value does the same"),("Return · Esc · Tab / ⇧Tab (typing a value)", "Set it · cancel · set it and type the next / previous value on the card"),+ ("⌥-click a graph handle, envelope node or mod-matrix cell", "Type its values — a node with several (frequency · gain · Q, decay · sustain) takes Tab between them"),("Double-click a knob, fader or slider", "Reset the value to its default"),+ ("Double-click a mod-matrix cell", "Clear the route (Volt, Aurora) · pull the cable (Consort)"),("Right-click a knob, fader or slider", "Type value… · Reset to default"),("Drag jack → jack", "Patch a cable in Nota Consort · ⌥-click a jack to pull its cables"),("Click · ⇧ · ⌥ a Rhythm step", "Step on / off · accent · quiet step — drag across to paint, up / down (or scroll) for its velocity"),diff --git a/src/managed/Nota.App/StereoMapView.cs b/src/managed/Nota.App/StereoMapView.csindex 2fd24286..777e18c5 100644--- a/src/managed/Nota.App/StereoMapView.cs+++ b/src/managed/Nota.App/StereoMapView.cs@@ -7,7 +7,8 @@// master correlation. One custom-drawn control, refreshed on every animation frame while it is// visible: one native call per frame brings all measurements. Dragging a handle is one undo// step over pan and volume (specs/009), with the automation rules of the strip controls;-// a click selects the track everywhere. Layout, tokens and texts: specs/008 contracts.+// a click selects the track everywhere; ⌥-click a handle types its pan, then (Tab) its volume+// (specs/035). Layout, tokens and texts: specs/008 contracts.using System;using System.Collections.Generic;@@ -30,7 +31,7 @@ internal static class FaderScalepublic static double Gain(double frac) => Math.Clamp(frac, 0, 1) * Max;}-public sealed class StereoMapView : Control+public sealed class StereoMapView : Control, IValueEntryHost{// Panel geometry (contract): header and bottom rows, the well's inset and the plot padding.private const double HeaderH = 36, BottomH = 32, Inset = 8, Radius = 6;@@ -88,8 +89,45 @@ public sealed class StereoMapView : Control_engine = engine;ClipToBounds = true;Focusable = false;+ ValueEntry.AttachHost(this);}+ // ---- typed entry (specs/035): a track's pan, then its volume; the master only selects ----+ private (int id, ValueField[] fields)? _entry; // the handle last asked about++ private ValueField[] FieldsOf(int id)+ {+ if (_entry is { } en && en.id == id) return en.fields;+ Item? Of() { int i = _items.FindIndex(x => x.Id == id); return i >= 0 ? _items[i] : null; }+ ValueField One(string name, MixTarget target, AutomationTarget auto, Func<double> get, Func<double, string> text, Action<double> set)+ {+ MixGesture? g = null;+ return new ValueField(name, get, text, set,+ () => { g = new MixGesture(_engine, target); g.Begin(); _engine.BeginAutomationWrite(id, auto, -1, -1, ""); },+ () => { _engine.EndAutomationWrite(id, auto, -1, -1, ""); g?.End(); g = null; }) { After = InvalidateVisual };+ }+ var pan = One("Pan", MixTarget.Pan(id), AutomationTarget.Pan, () => ((Of()?.Pan ?? 0f) + 1) / 2, n => NotaNum.Pan(n * 2 - 1),+ n => _engine.SetTrackPan(id, (float)Math.Clamp(n * 2 - 1, -1, 1)))+ with { Reset = () => _engine.SetTrackPan(id, 0f) }; // double-click centres the pan, as before+ var vol = One("Volume", MixTarget.Volume(id), AutomationTarget.Volume, () => FaderScale.Frac(Of()?.Volume ?? 1f),+ n => NotaNum.GainDb(FaderScale.Gain(n), signed: true), n => _engine.SetTrackVolume(id, (float)FaderScale.Gain(n)))+ with { Default = FaderScale.Frac(1.0), ResetOnDoubleClick = false }; // 0 dB from the menu; a double-click centres the pan+ _entry = (id, [pan, vol]);+ return _entry.Value.fields;+ }++ IReadOnlyList<ValueField>? IValueEntryHost.FieldsAt(Point p)+ => HitTest(p) is var i and >= 0 && !_items[i].Master ? FieldsOf(_items[i].Id) : null;++ Rect IValueEntryHost.AnchorOf(ValueField field)+ {+ if (_entry is not { } en) return default;+ int i = _items.FindIndex(x => x.Id == en.id);+ return i < 0 ? default : ValueEntry.Near(HandleAt(Plot(), _items[i]), Bounds.Size);+ }++ IReadOnlyList<ValueField> IValueEntryHost.AllFields => _entry?.fields ?? [];+// ---- frame loop ---------------------------------------------------------------------protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)@@ -297,7 +335,7 @@ public sealed class StereoMapView : Controlx = bar.Right + 6;x += DrawText(ctx, "+1", NotaFonts.Mono, 8, NotaPalette.TextTertiary, new Point(x, cy), vCenter: true) + 10;DrawText(ctx, Signed(corr, 2), NotaFonts.Mono, 10, corr < PhaseAlarm ? NotaPalette.Danger : NotaPalette.TextSecondary, new Point(x, cy), vCenter: true);- DrawText(ctx, "Drag: pan + volume · Shift locks axis · double-click centres pan · ⌥ double-click 0 dB",+ DrawText(ctx, MenuKit.Keys("Drag: pan + volume · Shift locks axis · double-click centres pan · ⌥-click types"),NotaFonts.Sans, 10, NotaPalette.TextTertiary, new Point(b.Width - 10, cy), vCenter: true, rightAlign: true);}@@ -403,10 +441,9 @@ public sealed class StereoMapView : Controle.Handled = true;if (it.Master) { SelectTrack?.Invoke(it.Id); return; } // fixed: select onlyint id = it.Id;- if (e.ClickCount == 2) // reset: pan to C, ⌥ volume to 0 dB — one step each+ if (e.ClickCount == 2) // reset: pan to C, one step (⌥-click types — the value entry takes it first){- if ((e.KeyModifiers & KeyModifiers.Alt) != 0) MixEdit.Step(_engine, () => _engine.SetTrackVolume(id, 1f), MixTarget.Volume(id));- else MixEdit.Step(_engine, () => _engine.SetTrackPan(id, 0f), MixTarget.Pan(id));+ MixEdit.Step(_engine, () => _engine.SetTrackPan(id, 0f), MixTarget.Pan(id));return;}_dragId = id;diff --git a/tests/Nota.SmokeTest/ValueEntryTests.cs b/tests/Nota.SmokeTest/ValueEntryTests.csindex 1b1b6c6c..ef8909cd 100644--- a/tests/Nota.SmokeTest/ValueEntryTests.cs+++ b/tests/Nota.SmokeTest/ValueEntryTests.cs@@ -62,9 +62,24 @@ internal static class ValueEntryTests"value entry: ∞ and inf, signed");yield return (ValueText.Read("abc", out _, out _) is null && ValueText.Read("", out _, out _) is null,"value entry: text with no number reads as nothing");+ yield return (Near(ValueText.Read("Out −6.0 dB", out _, out _), -6) && Near(ValueText.Read("Swing 30 %", out _, out _), 30),+ "value entry: a label before the number is skipped (\"Out −6.0 dB\", \"Swing 30 %\")");+ yield return (Near(ValueText.Read("C4", out _, out _), 60) && Near(ValueText.Read("F#2", out _, out _), 42)+ && Near(ValueText.Read("C-1", out _, out _), 0) && Near(ValueText.Read("bb3", out _, out _), 58),+ "value entry: note names read as MIDI numbers (C4 = 60, F#2, C-1, Bb3)");+ yield return (ValueText.Read("C99999999999", out _, out _) is null && ValueText.Read("C10", out _, out _) is null,+ "value entry: a note outside MIDI's octaves reads as nothing (no overflow)");// ---- the search against a read-out ----string s;+ static string Note(double v)+ {+ int n = (int)Math.Round(v * 127);+ return new[] { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }[n % 12] + (n / 12 - 1);+ }+ static string Out(double v) => "Out " + (v * 36 - 18).ToString("+0.0;−0.0;0.0", System.Globalization.CultureInfo.InvariantCulture) + " dB";+ yield return ((s = Typed("D4", Note, 0.5)) == "D4", $"value entry: \"D4\" on a note read-out lands on D4 ({s})");+ yield return ((s = Typed("-6", Out, 0.5)) == "Out −6.0 dB", $"value entry: \"-6\" on a labelled read-out lands on Out −6.0 dB ({s})");yield return ((s = Typed("1.2k", Hz, 0.5)) == "1.20 kHz", $"value entry: \"1.2k\" on a frequency lands on 1.20 kHz ({s})");yield return ((s = Typed("1.5", Hz, 0.8)) == "1.50 kHz", $"value entry: a bare number takes the read-out's unit — 1.5 on a kHz read-out ({s})");yield return ((s = Typed("800", Hz, 0.8)) == "800 Hz", $"value entry: a bare number takes the unit that fits — 800 on a kHz read-out is 800 Hz ({s})");