Commit Graph

99 Commits

Author SHA1 Message Date
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
daniel cca7380777 fix(bank_panel): null-guard uniformity, stale comment/focus nudge on delete, dragArmed on capture-loss, menuAppend comment 2026-07-25 17:10:46 -04:00
daniel a67a2f9479 feat(bank_panel): B4 vertical-split UI — LICE tab strip, id-keyed bank ops, move/copy drag
Pool grid on top, LICE-drawn named-banks tab strip below with overflow-scroll
(new pure tab_strip seam, unit-tested). Full-height toggles, unmistakable
active-bank readout distinct from the shown tab, tab context menu
(activate/rename/delete/evacuate/create) with rich confirm-on-non-empty-delete,
and move/copy via menu + drag with drop-highlighting. Fold-in: deserialize
auto-disambiguates duplicate folded bank names instead of rejecting the book.
2026-07-25 14:37:57 -04:00
daniel 261efe5452 feat(actions): item-level Design/Arrange move + untag actions; W3-A polish
Add three MIDI-bindable item actions mirroring the track tag family, routed
through the shared hookcommand: retag selected items' membership then re-drive
mint/apply so each lands on its mode's managed lane (manual-lane items exempt),
all in one undo block. Extract shared item_read seam, simplify applyMintPlan's
lane-count pass, and guard reconcile against unregistered-mode lanes.
2026-07-25 13:30:07 -04:00
daniel ccf65415c9 fix(banks): enforce unique bank display names in-model + B3 review minors 2026-07-25 01:29:47 -04:00
daniel 314cd7bf36 Make tool-managed lane splits visually transparent: collapse display + lazy-mint
Drive C_LANESCOLLAPSED=2 and hide lane buttons only on tracks the tool itself splits
(gated on the pre-write I_FREEMODE read, so user comp-lane display prefs are never
stomped). Lazy-mint managed lanes only for modes with own content, never an empty
reserved lane; confinement holds via C_LANEPLAYS on the lone lane.
2026-07-24 05:44:19 -04:00
daniel cbfc13c4e0 feat(banks): bindable multi-bank action family — create/rename/delete/evacuate/activate/move/copy + full-height toggles (B3) 2026-07-24 05:35:16 -04:00
daniel 78a31ff215 fix(view): lane-separate a content-bearing folder's own media when it's derived-visible in >1 mode
planLaneMinting now takes the model + folder tree and splits a track visible in
2+ modes that carries own media (own-item span OR folder derived-visibility),
fixing an item dropped on a cross-mode folder leaking into every mode. Show-both
tracks are never force-split.
2026-07-24 05:08:18 -04:00
daniel 85993ebc3e feat(persist): persist BankBook under banks key, retire legacy bank_index, route capture to active bank (B2) 2026-07-23 20:26:15 -04:00
daniel b3be9799e0 fix: apply dB compression to waveform thumbnail display
Linear amplitude-to-pixel mapping made -20 dBFS content reach only
10% of cell height and -40 dBFS round to zero. Replace with a dB
scale (floor kDisplayFloorDb = -60 dB, in bank_grid.h) so quiet
content is visible. Pure helper compressAmplitudeForDisplay() lives
in bank_grid; drawThumbnail() calls it. Five new unit tests cover
full-scale, zero, mid-levels, floor clamping, and sign preservation.
2026-07-23 20:21:55 -04:00
daniel b182146f9a feat(view): mint managed lanes to separate cross-mode content per stance (D2 W3-A)
Pure planLaneMinting decides which tracks hold >1 mode's content and which managed
lane each item lands on; view.cpp applies it (I_FREEMODE/I_NUMFIXEDLANES/P_LANENAME/
I_FIXEDLANE) under one undo block, driven off the auto-tag detection tick. Manual lanes
and their items are never touched. Load-time reconcile rebuilds ownership from durable
lane names before reapplying active-mode visibility.
2026-07-23 20:08:38 -04:00
daniel fed70c0a80 Merge: fix reload-in-Design mis-tagging Arrange tracks into Design 2026-07-23 19:31:29 -04:00
daniel 02b6350dc9 fix(bank_panel): drive new-content baseline re-arm from persist's load signal
The detector re-armed its GuidBaseline on a pointer compare (proj != lastProject),
a weaker signal than persist's GUID-primary identity. On a load onto a recycled
ReaProject* the baseline never reset, so the just-loaded project's pre-existing
tracks diffed against the previous project and were mass-tagged into the active
mode — opening a Design-saved project mis-tagged its Arrange tracks. Re-arm now
rides persist's authoritative load signal via bankPanelNotifyProjectLoaded().
2026-07-23 19:26:06 -04:00
daniel beaec8642a fix: tail toggle/scroll now commits to ext-state immediately
markTailDirty() called MarkProjectDirty() but never called
saveToActiveProject(), so the new tail value was never written
to SetProjExtState. On unsaved projects saveToActiveProject()
no-ops cleanly, resolving the companion Major at the same time.
2026-07-23 19:19:10 -04:00
daniel 37affc6a70 Add tail manual fine-adjust (scroll) + per-project tail persistence
Relocate TailSetting into ReaSamplerSession; persist serializes it to
a new forever-stable "tail_setting" ext-state key (load-per-project,
save-on-save). Footer scroll-wheel adjusts Manual length in 250ms
steps; label now shows "Tail: Manual X.Xs". Pure step/label/JSON
round-trip covered by tests.
2026-07-23 19:12:12 -04:00
daniel d8725210e7 feat(banks): pure bank_book registry — pool + named banks, move/copy, JSON round-trip (B1) 2026-07-23 18:32:57 -04:00
daniel ae0e76bff7 Merge T2: realtime capture tail trimming 2026-07-23 18:27:27 -04:00
daniel f2bfe466ec T2: realtime capture tail trimming
Auto/Manual/Off tail handling for realtime track-tap capture. Auto scans
recorded PCM backward for last frame above -72 dB and truncates the wav
header-aware (8 s cap); Manual pads a fixed tail; Off is byte-identical.
wav_trim rejects WAVE_FORMAT_EXTENSIBLE with non-float SubFormat GUID.
2026-07-23 18:25:45 -04:00
daniel 85a03fbd13 Merge dev (tail-toggle panel refactor) into D2 Wave 2
# Conflicts:
#	src/bank_panel.cpp
2026-07-23 18:13:18 -04:00
daniel ebdb4eae66 fix(D2-W2): correct manual-lane exemption, drop read-only item C_LANEPLAYS write
isOnManualLane predicate now correctly treats unnamed fixed-lane lanes as manual;
item-side C_LANEPLAYS loop removed (SDK read-only); explicit #include <set> in
view_mode_model.cpp; undo-block omission in detectNewContent documented as intentional.
2026-07-23 17:51:55 -04:00
daniel e3d126c177 Merge Milestone T1: offline capture tail (auto/manual) + docked-panel toggle 2026-07-23 17:33:15 -04:00
daniel af34143107 feat(view): D2 Wave 2 — apply managed-lane ops + timer-diff auto-tag new content
Drives fixed-lane C_LANEPLAYS for managed lanes only (name-keyed, ordinal-renumber
safe) in the view shell; diffs live track/item GUIDs on the panel timer to auto-tag
new content to the active mode, first-poll-guarded. Pure guid_diff + lane_keys
modules unit-tested; folds in Wave-1 polish.
2026-07-23 17:32:22 -04:00