filter: sweep the corner continuously; raise the editor floor to 840x620

Cutoff-only re-solve (15.5 vs 56.9 ns/frame) makes the unquantized sweep
affordable, replacing the 2048-step mod quantizer. Live-compute parameters
remain blocked on a shell-architecture ruling.
This commit is contained in:
2026-07-30 18:12:10 -04:00
parent 39389c1183
commit 0cfd9b6236
14 changed files with 237 additions and 88 deletions
+10 -10
View File
@@ -44,17 +44,17 @@ tresult PLUGIN_API ReaSamplerEditor::canResize() {
}
tresult PLUGIN_API ReaSamplerEditor::checkSizeConstraint(ViewRect* rect) {
// Enforce a minimum usable floor: at least 560 wide and 460 tall. The host calls this
// before every resize; clamp the proposed rect in place and return kResultTrue so the host
// applies the (possibly adjusted) rect rather than the raw user drag. 560x460 keeps the
// Sample face's title + hero waveform + cluster + a few control rows visible (the control
// strip clips gracefully below the panel bottom); anything smaller would clip essential UI.
// The default 840x620 is above this floor.
constexpr int kMinW = 560;
constexpr int kMinH = 460;
// The floor is the default size (sample_bands): the face can be grown, never shrunk below
// what its band stack is laid out for. The host calls this before every resize; clamp the
// proposed rect in place and return kResultTrue so the host applies the adjusted rect
// rather than the raw user drag.
if (!rect) return kResultFalse;
if (rect->getWidth() < kMinW) rect->right = rect->left + kMinW;
if (rect->getHeight() < kMinH) rect->bottom = rect->top + kMinH;
if (rect->getWidth() < instrument::ui::kEditorMinWidth) {
rect->right = rect->left + instrument::ui::kEditorMinWidth;
}
if (rect->getHeight() < instrument::ui::kEditorMinHeight) {
rect->bottom = rect->top + instrument::ui::kEditorMinHeight;
}
return kResultTrue;
}
+3 -4
View File
@@ -38,10 +38,9 @@ using util::readFileBytes;
ReaSamplerEditor::ReaSamplerEditor(ReaSamplerProcessor* processor)
: CPluginView(nullptr), processor_(processor) {
// Default view size, tuned to the band heights: chrome + two-lane waveform + the deck
// (now two rows since the filter group). 840x620 clears the full face without scroll on
// 1080p.
ViewRect r(0, 0, 840, 620);
// The default IS the enforced floor (checkSizeConstraint) — the face opens at the size its
// band stack is laid out for and can only be grown from there.
ViewRect r(0, 0, instrument::ui::kEditorMinWidth, instrument::ui::kEditorMinHeight);
setRect(r);
}