Commit Graph

420 Commits

Author SHA1 Message Date
daniel a04ef54eec fix(tests): rework testNoteOffReleasesNewestSameNote to actually prove newest-first release; add single-frame-loop test; add two comments in sampler_core.cpp 2026-07-27 04:07:08 -04:00
daniel 74d2e976e7 S3: pure sampler core — voices, ADSR, keymap, loop-aware repitch
REAPER-free and VST3-free voice engine with bounded stealing, ADSR
envelope, key/velocity keymap resolution, and repitch from root note
with loop-point sustain. Test target links neither SDK.
2026-07-27 04:07:08 -04:00
daniel 09f49441d9 Merge ps-w1-t2-sample-intrinsics: S2 Sample seam fields (rootNote + loop points) 2026-07-27 04:04:07 -04:00
daniel b5a573aebb feat(bank_model): add Phase S seam fields (rootNote + loop points) to Sample
Additive optional MIDI root note and sustain-loop points with JSON round-trip and deserialize-boundary validation; capture leaves them empty (not derivable). Mirrors the provenance addition; BankIndex behavior unchanged.
2026-07-27 04:04:07 -04:00
daniel 3c2a7c45b2 feat(vst): stand up VST3 instrument spike (S1) — skeleton, IPlugView↔LICE editor, REAPER bridge read
Vendor Steinberg VST3 SDK (v3.7.9_build_61); add reasampler_vst.vst3 as a second, additive build artifact with pure editor-geometry + bridge-marshal helpers under CTest.
2026-07-27 04:02:28 -04:00
daniel d2cc33e9de fix(card_drag): extend drop rects one trailing row so beyond-extent drops land
computeSlotRectsForDrop adds cols slots past maxSlot; classifyCardDrag and
drawCardDropTarget use it instead of the render rects. doReorderDrop already
accepts any non-negative slot. New tests cover beyond-extent resolves,
empty-bank trailing row, gap pixels still miss, empty-cell within-extent works.
2026-07-27 03:31:29 -04:00
daniel 1585f0bbe6 fix: same-slot reorder is a no-op; WM_DESTROY clears card drag state; fix card_meta.h ms-rounding comment 2026-07-27 02:47:29 -04:00
daniel 439bb44e0d L7 Wave 2: wire capture-ordering into bank_panel
Render the grid in sparse SlotMap order with empty-slot cells; remap every
cell↔sample consumer (selection, nav, audition, drag) to occupied-ordinal
space. Drop dispatches reorder/replace/move/copy via card_drag; per-slot
highlight + stock cursor cues. One drop = one Ctrl-Z.
2026-07-27 02:02:57 -04:00
daniel fdb9e38ad6 L7: capture-order slot model, card metadata overlay, tertiary-border selection
Add gap-preserving per-bank SlotMap (reorder + Alt-replace mutators, JSON
round-trip, insertion-order migration) to bank_book; stamp captureTimeSig on
Sample; pure card_meta formatters + card_drag gesture/slot module; card
metadata overlay + purple selection border in the panel. Shell drop/cursor
wiring deferred. Fixes: removeSample syncs SlotMap; card_drag gap-probe coordinate.
2026-07-27 01:49:07 -04:00
daniel c37419beb9 fix: toggle panel once after Alt+D docker hide — derive visibility from IsWindowVisible, not stale g_panel.open flag 2026-07-27 00:51:33 -04:00
daniel acda259ab6 L6 toolbar polish: single-row faces, Cancel RT -> overflow, Re-capture between groups
Button faces now show only the short label (keybinding moved to hover tooltip as
"name — binding"). Cancel RT joins the overflow menu alongside Capture RT. Re-capture
sits between the capture and placement clusters. Toolbar heights 40->28.
2026-07-27 00:38:32 -04:00
daniel 3876d2d822 tooltip: clamp box width to client on narrow panels; add narrow-client test 2026-07-27 00:05:14 -04:00
daniel 7cd0771e45 L5: dock-panel button refinements — overflow menu, tooltips, opposite-mode tag buttons
Top-bar rare-capture variants move to a right-anchored More popup; short faces gain
hover-delay full-name tooltips (prefix stripped); bottom bar becomes four opposite-mode
Item/Track tag buttons + Show Both (Toggle/Activates dropped); wider cluster gaps. New
pure overflow_menu/mode_enable/tooltip modules, CTest-covered. Same actions, same contract.
2026-07-26 23:56:49 -04:00
daniel f8fffabf15 fix(bank_panel): restore Re-capture + Cancel RT buttons to top toolbar 2026-07-26 23:04:48 -04:00
daniel 8f4a84ac79 L4: re-home dock-panel buttons into three zones
Top toolbar = capture+placement, bottom toolbar = Design-View verbs, footer = narrow Arrange|Design toggle + count + Tail button + set-apart Prune. New pure footer_bar module; Tail is now a real kit button.
2026-07-26 22:42:56 -04:00
daniel 7dd9de14df Merge fix-drag-unselected: arm drag from unselected bank_panel cell in one gesture 2026-07-26 22:16:30 -04:00
daniel 6abebba69e L-w3: complete three-accent pastel repalette + REAPER-grey neutrals
Finish roleColor/roleColorState for the three-accent enum, re-map every
Accent consumer (primary leads live; Pool/Banks titles categorical
secondary/tertiary), make spectralColor a lime->teal->purple three-stop
sweep, and re-lock the WCAG-floor tests on the grey ladder.
2026-07-26 22:12:10 -04:00
daniel c9f6cbc34d fix(bank_panel): arm drag from unselected cell in one gesture
Plain press on an unselected grid cell now commits the single-cell
selection immediately and arms the drag, so moving past the threshold
begins a drag without a prior selecting click. Already-selected and
ctrl/shift paths are unchanged.
2026-07-26 22:05:43 -04:00
daniel 47223dfb3e fix(bank_panel): add CAPTURE_BATCH_RAZOR button, unify toLice conversion, use palette role for action-bar divider 2026-07-26 21:02:37 -04:00
daniel 54f37be0bb L2: task-grouped action bar + kit-drawn dock panel
New pure action_bar module (clusters, keybinding sub-labels, overflow, hit-test) supersedes the flat M11 strip; bank_panel chrome/buttons/tabs/grid now draw through the L1 kit by role with hover. Expose draw_kit::toLice in header to fix drawThumbnail forward-refs. CTest 27/27.
2026-07-26 21:02:37 -04:00
daniel beca6487c7 L1: shared LICE drawing kit — theme/palette + component geometry + draw kit; retire GDI text in bank_panel 2026-07-26 20:19:10 -04:00
daniel 4f51758ad6 fix(drag_out): return E_OUTOFMEMORY on GlobalLock failure in HDropDataObject::GetData 2026-07-26 20:06:55 -04:00
daniel 34df2563e4 feat(m11): native OS drag-out of bank samples (copy-only)
Pure drag_out (gesture boundary + path-list assembly) + Windows OLE
CF_HDROP / SWELL file-list shell; bank_panel hands off when a dragged
selection leaves the client area. COPY-ONLY mask; internal drag intact.
2026-07-26 20:02:46 -04:00
daniel 36bdef742a M11: action-trigger buttons + keybinding labels in bank_panel
New pure action_buttons module (strip layout/hit-test + label format,
CTest-covered). Panel strip fires capture/insert/provenance actions via
NamedCommandLookup + Main_OnCommand; labels from kbd_getTextFromCmd.
2026-07-26 19:33:04 -04:00
daniel d23a3f9bb8 feat(capture): M11 batch capture - one bank sample per selected item / razor area
Pure batch_capture module (plan + mixed-result aggregation, unit-tested);
CAPTURE_BATCH_ITEMS/RAZOR actions with transient per-unit selection restored
on all paths, per-unit invariants + provenance, single persist.
Conform-on-insert already shipped.
2026-07-26 19:24:33 -04:00
daniel ef2d3fa846 fix(prune): honest reclaim/skip counts; cross-ref layout coupling
Already-absent files no longer inflate reclaimedCount (outAlreadyAbsent
distinguishes vanished-at-delete from real failures). Stale skip count
de-dups confirmed before subtraction so duplicates aren't tallied as
stale. prune_button.h rightInset and drawTailFooter vrc.right now
cross-reference each other by name.
2026-07-26 19:15:54 -04:00
daniel 7b53ba16f6 feat(prune): R3 guarded deletion — confirm-to-delete + panel button
Extend BANK_PRUNE_FOLDER from report-only to dry-run→confirm-with-manifest→
delete exactly the pure-core orphan set (fresh recompute, stale entries skipped).
Windows routes to Recycle Bin (SHFileOperation+FOF_ALLOWUNDO), else unlink.
New pure prune_button module + footer button dispatching the action id. No
ext-state write, no undo point (deletion is not REAPER-undoable).
2026-07-26 19:15:54 -04:00
daniel 1f0efe6db6 fix(persist): use non-throwing directory_iterator increment in pruneDryRun
Replace range-based for over fs::directory_iterator with manual
it.increment(ec) form. Mid-iteration failures now break to a
best-effort partial list instead of throwing filesystem_error
across REAPER's C ABI. Split shared fec into reg_ec/sz_ec.
2026-07-26 19:12:07 -04:00
daniel c1473c42e1 feat(prune): R2 dry-run prune shell + persist wiring, report-only
Add ReaSamplerSession::pruneDryRun enumerating the resolved current bank
folder, feeding the R1 core, and returning a PruneReport (count/bytes/list).
New pure bankRelativeForName + buildPruneReport keep spelling and tally
testable. Register forever-stable BANK_PRUNE_FOLDER action, report-only. No deletion.
2026-07-26 19:12:07 -04:00
daniel 3cfa9239d2 feat(prune): R1 prune-reconcile pure core — (owned ∩ present) − referenced
Add REAPER-free/filesystem-free prune orphan-set core + additive
BankBook::referencedPaths() union query, with full unit coverage.
2026-07-26 19:09:39 -04:00
daniel 7d0fcc49ac fix(m10): item-scope take-FX fingerprint; Windows path case-fold; comments
Item scope now reads the active take's FX chain via TakeFX_* (new
fxChainIdentityForItems helper), not the owning track's chain.
normalizeSlashes lowercases on _WIN32 for detectParent. Stale
comments corrected; case-fold tests added.
2026-07-26 18:08:44 -04:00
daniel 20018c1df2 M10: provenance populate + re-capture from source (bank-only)
Pure provenance core (recipe fingerprint, FX-chain identity, parent
detection) + shell reads; capture stamps provenance on resample-from-sample;
re-capture regenerates a provenanced sample from its source, never touching
the timeline. Adds BankIndex/BankBook in-place update. CTest-covered.
2026-07-26 18:08:44 -04:00
daniel ff4eb26eab ux: drop last-reference confirm from sample remove; silent remove via undo (R-B) 2026-07-26 17:27:05 -04:00
daniel 78fc5bad94 fix(dedup): hash WAV fmt+data only, skipping render-varying metadata chunks
hashWavContent walks RIFF chunks and feeds only fmt body + data payload
through FNV-1a ('W' domain-separation prefix), skipping bext/iXML/LIST that
REAPER embeds with per-render origination timestamps. Fallback to whole-file
hashBytes for non-WAV. Wired into both capture commit paths.

Legacy entries keep their stored whole-file hash; a re-capture will not
collapse onto a pre-fix entry -- a one-time clean capture resolves it.
2026-07-26 17:09:58 -04:00
daniel 88e10c18c7 Merge fix: populate contentHash at capture — last-reference confirm now accurate; dedup-by-hash live 2026-07-26 16:46:29 -04:00
daniel 5c0e3a8ccf feat(version): V4 beta-in-isolation channel via -DREASAMPLER_CHANNEL
Compile-time channel flag forks a fully isolated reaper_reasampler_beta
(namespace, command-id prefix, action names, dock ident, -beta render) from
one auditable app_version definition. Stable identity byte-unchanged.
2026-07-26 16:43:23 -04:00
daniel 5fabade90c fix(capture): populate contentHash on captured samples to fix always-prompting remove
contentHash was left empty on every capture; hashReferencedElsewhere returns
false for empty hashes, so every remove looked like a last reference. Add
FNV-1a hashBytes to capture_paths, wire into both commit paths. NOTE: this
activates index dedup-by-hash in production — a bit-identical re-capture now
collapses onto the existing entry instead of adding a duplicate (spec-intended).
2026-07-26 16:37:46 -04:00
daniel f6dddbf5a3 feat(version): single-source semver, ext-state stamp, show-version action
Version "0.9.01" sourced once from CMake via configure_file'd header; pure
app_version module (parse/compare/classify) with CTest. Stamp rides the persist
save seam under "reasampler"/"version"; absent stamp reads as pre-versioning.
On-demand "show version" action, no startup print.
2026-07-26 16:35:10 -04:00
daniel 5d1f0336a9 fix(bank_panel): make entire named-banks grid a valid drop target 2026-07-26 16:14:34 -04:00
daniel 7cd1a2588e fix: replace multi-byte UTF-8 in runtime UI strings with ASCII to fix Windows-1252 mojibake 2026-07-26 16:09:13 -04:00
daniel 8c0ce427e8 Merge dev into phase-b-multibank (m11 console cleanup + Phase S/V docs) before dev promotion
# Conflicts:
#	src/actions.cpp
#	src/main.cpp
2026-07-26 15:41:25 -04:00
daniel 704a7b5ffc chore(bank_panel): clean up persistBook dead code and stale comment; align transfer switch to explicit enum cases 2026-07-26 15:32:22 -04:00
daniel 3514bb0b6d route bank_panel bank-op persists through persistBankOp so panel gestures get undo points like the bindable actions 2026-07-26 15:25:15 -04:00
daniel 6c1efa0f25 B5: sample-remove verb — index-only drop, this-bank scope, confirm-on-last-reference 2026-07-26 15:07:41 -04:00
daniel 63f35fa58d feat(persist): owned-file manifest seam — capture records created files (B-cap)
Pure OwnedFileManifest (relative paths, dedup, JSON round-trip) persisted
under sibling owned_files ext-state key; both capture commit paths record;
joins the R-B undo-reload set. Phase R prune consumes it later.
2026-07-26 14:50:18 -04:00
daniel a07b28fd65 feat(persist): reload book+view on undo/redo via projectconfig hook (R-B)
BeginLoadProjectState(isUndo) requests a deferred reload the timer drains
next tick, once REAPER has restored ext-state. Hook owns undo/redo; identity
poll still owns open/tab-switch/save-as. Fixes copy-collapse over-count
(verb-aware guard) and dangling undo point on unsaved-project bank ops.
2026-07-26 06:59:26 -04:00
daniel 6d372794f5 feat(actions): batch bank index verbs into single REAPER undo points (R-B)
Wrap each bank verb's persist in Undo_BeginBlock2/EndBlock2 with UNDO_STATE_MISCCFG so one bank op is one Ctrl-Z; ext-state participates in undo per SDK. Rejected/no-op ops open no block.
2026-07-26 05:49:38 -04:00
daniel 2ee2b37532 chore: remove routine console chatter, keep error reporting
Strip ShowConsoleMsg from all normal-success paths (loaded, captured, bank
create/rename/delete/evacuate/activate, realtime started, insert ok, transfer
summary). Remove dead REAPERAPI_WANT_ShowConsoleMsg in capture.cpp.
Error/failure/malformed-data paths and modal confirms untouched.
2026-07-26 05:48:41 -04:00
daniel c33cb50632 Merge dev into phase-b-multibank (integrate parallel M7/8 + Phase D work before dev promotion)
# Conflicts:
#	CLAUDE.md
#	CMakeLists.txt
#	src/actions.cpp
#	src/bank_panel.cpp
#	src/persist.h
2026-07-25 23:30:44 -04:00
daniel 47721a40c4 fix(view): redraw arrange when inserted item lands on already-split lane
An item inserted onto an already-split folder in Design mode sat on the
correct lane but stayed invisible until a manual toggle: mintManagedLanes
returned on the idempotent no-op path before its UpdateArrange call. Force
the redraw there so the item appears immediately.
2026-07-25 17:16:58 -04:00