diff --git a/AGENTS.md b/AGENTS.md index e82b518..8b32b94 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,3 +9,8 @@ - Use RAII and bounded containers. Avoid fast-math, speculative approximation or SIMD unless profiling and numerical tests support it. - Run meaningful DSP/host tests, inspect GUI renders at minimum/default size, and document unverified hardware behavior. Never claim proprietary Pro-C parity without matched-input audio comparisons. - Group meaningful changes before CI. Do not dispatch repetitive builds or commit generated binaries/build directories. + +## M3 integration release gate +- Always reconcile the GUI development branch and M2 realtime-performance branch before producing a Windows test binary. An artifact from one branch alone is not a combined release. +- Host bypass must pass the first block bit-exactly and must not latch the parameter bypass state. User bypass remains a smoothed, separately attached parameter. +- Build M3 in one PR with both Windows JUCE editor smoke and Linux sanitizer, inspect four actual Windows screenshots and benchmark/stress files before declaring ready-to-test. Do not call CI throughput a hardware xrun proof. diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b34cf0..b1d0637 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,8 @@ if(ARSON_BUILD_PLUGIN) assets/gunmetal_slider_track.png assets/gunmetal_slider_thumb_red.png assets/toggle/arson_toggle_on.png - assets/toggle/arson_toggle_off.png) + assets/toggle/arson_toggle_off.png + assets/arsoncomp_header_logo.png) target_sources(ArSonComp PRIVATE plugin/Processor.cpp plugin/Editor.cpp) if(MSVC) target_compile_options(ArSonComp PRIVATE /utf-8) diff --git a/assets/arsoncomp_header_logo.png b/assets/arsoncomp_header_logo.png new file mode 100644 index 0000000..c7fdacb Binary files /dev/null and b/assets/arsoncomp_header_logo.png differ diff --git a/docs/M3-HARDWARE-TEST.md b/docs/M3-HARDWARE-TEST.md new file mode 100644 index 0000000..21e640d --- /dev/null +++ b/docs/M3-HARDWARE-TEST.md @@ -0,0 +1,23 @@ +# M3 — Integrated Windows VST3/Standalone hardware test gate + +This milestone integrates the finished brushed-metal compact header/toggles with the M2 sparse-ramp real-time compressor optimizations, and makes **host bypass bit-transparent immediately**. The normal *user* bypass toggle remains a smoothed APVTS control; zero algorithmic samples are added. + +## Scope and quality status + +The plugin ships three independent control models (Clean, Feedback, Smooth), dual detector modes, internal/external sidechain, monitoring, wet/dry, stereo link, and program-dependent release. These are proprietary ArSon algorithms, not FabFilter emulations. [FabFilter Pro-C 3](https://www.fabfilter.com/help/pro-c/using/overview) provides an industry-level comparison target; sonic parity is **not** verified. For live use, keep any future lookahead/oversampling separate and opt-in because they can add latency. + +## Install & validate — Windows 64-bit + +1. Download the latest **ArSonComp-Windows-x64-ReadyToTest** ZIP from the matching M3 pull-request GitHub Actions run. Extract it. Check `BUILD-INFO.txt` commit SHA and `SHA256SUMS.txt`; do not use an old ZIP from M2. +2. For Standalone, open `Standalone/ArSonComp.exe`. For a DAW/VST3 host, copy the **entire** `Plugin/ArSonComp.vst3` directory into the host's VST3 scan folder (normally `C:\Program Files\Common Files\VST3\`); do not copy only the .vst3 inner DLL. +3. Inspect `Screenshots/` (full, minimum, MINI, sidechain) and the real GUI: embossed brand readable, premium compact header, preset dropdown capped at 176px, switches correct and never overlapped, no tooltip bubble. +4. Start at 48 kHz / 128 sample buffer, then 64, then 32 if stable. Record host, interface/driver version, CPU load, DPC spikes, **actual** host XRUN/dropout counter, and reported plugin latency. Repeat with 1, 8, 16 active plugin instances. +5. Listen on vocals, drums, bass and program bus at matched output loudness; adjust threshold for similar reduction when comparing with a commercial compressor. Assess attacks, recovery, pumping, breath/sibilance, aliasing and dry/wet coherence. Never equate same settings to same tone. +6. Verify host bypass on the **first** processing block with non-unity input/makeup; it should be exactly dry. Toggle the built-in Active/Bypass control separately to assess its intentional short fade; check restart, mono/stereo and external sidechain routing and Listen SC. Test preset save/load and host project restore. +7. Run a 60-minute session; open/close GUI repeatedly, automate threshold/knee, toggle modes and log private-byte trend plus latency/XRUN evidence. Stable memory use and no XRUN on your machine must be observed, not assumed from CI. + +## Build evidence + +GitHub PR checks gate Linux address/undefined sanitizers and engine contract tests, Windows VST3/Standalone build plus JUCE plugin/editor smoke and screenshot capture, 48kHz engine benchmark, and 32/64/128 × 1/8/24 engine-only realtime stress statistics (mean, P99, P99.9, max). Those stress numbers include hosted CI scheduler noise, **not** a physical audio dropout test. + +No worker, mutex, allocation, filesystem access, GUI rendering or telemetry consumer on the audio callback; synchronous DSP state stays audio-thread-owned. diff --git a/plugin/Editor.cpp b/plugin/Editor.cpp index b6b5d5d..fbd6f9a 100644 --- a/plugin/Editor.cpp +++ b/plugin/Editor.cpp @@ -3,6 +3,7 @@ #include "GraphPaint.h" #include "SurfacePaint.h" #include "GraphHistory.h" +#include "HeaderLayout.h" #include "BinaryData.h" #include #include @@ -70,6 +71,7 @@ CompLook::CompLook() { setColour(juce::ComboBox::backgroundColourId,juce::Colour{0xff181d22}); setColour(juce::ComboBox::textColourId,text); setColour(juce::ComboBox::outlineColourId,juce::Colour{0xff374047}); + setColour(juce::ComboBox::arrowColourId,juce::Colour{0xffb0b8bb}); setColour(juce::PopupMenu::backgroundColourId,juce::Colour{0xff161b20}); setColour(juce::PopupMenu::textColourId,text); setColour(juce::PopupMenu::highlightedBackgroundColourId,juce::Colour{0xff602b32}); @@ -79,6 +81,54 @@ CompLook::CompLook() { setColour(juce::ToggleButton::tickColourId,accent); setColour(juce::Label::textColourId,muted); } +// Satin-finished combo surfaces: recessed but legible on a brushed chassis. +void CompLook::drawComboBox(juce::Graphics& g,int width,int height,bool down, + int buttonX,int buttonY,int buttonW,int buttonH, + juce::ComboBox& box) { + juce::ignoreUnused(buttonX,buttonY,buttonW,buttonH); + auto r=box.getLocalBounds().toFloat().reduced(0.5f); + const bool hovered=box.isMouseOverOrDragging(); + g.setGradientFill(juce::ColourGradient( + juce::Colour{0xff262e32},0.0f,0.0f, + juce::Colour{0xff151a1e},0.0f,static_cast(height),false)); + g.fillRoundedRectangle(r,4.5f); + g.setColour(down?juce::Colour{0xffa95b60}: + hovered?juce::Colour{0xff78858a}:juce::Colour{0xff3c474c}); + g.drawRoundedRectangle(r,4.5f,1.0f); + g.setColour(juce::Colours::white.withAlpha(0.06f)); + g.drawHorizontalLine(2,5.0f,static_cast(width-5)); + // One discreet chevron; long preset titles receive the remaining width. + juce::Path caret; + const float cx=static_cast(width)-15.0f; + const float cy=static_cast(height)*0.50f; + caret.startNewSubPath(cx-3.5f,cy-1.5f); + caret.lineTo(cx,cy+2.0f); + caret.lineTo(cx+3.5f,cy-1.5f); + g.setColour(hovered?juce::Colour{0xffe0e5e5}:juce::Colour{0xffa2afb1}); + g.strokePath(caret,juce::PathStrokeType(1.5f)); +} +void CompLook::positionComboBoxText(juce::ComboBox& box,juce::Label& label) { + label.setBounds(11,1,juce::jmax(0,box.getWidth()-36),box.getHeight()-2); + label.setFont(juce::FontOptions(11.5f)); + label.setJustificationType(juce::Justification::centredLeft); +} +void CompLook::drawButtonBackground(juce::Graphics& g,juce::Button& button, + const juce::Colour& background, + bool hovered,bool down) { + const auto id=button.getComponentID(); + if(id!="view.compact" && id!="view.compare" && id!="view.file") { + juce::LookAndFeel_V4::drawButtonBackground(g,button,background,hovered,down); + return; + } + auto r=button.getLocalBounds().toFloat().reduced(0.5f); + g.setGradientFill(juce::ColourGradient( + down?juce::Colour{0xff30373b}:juce::Colour{0xff293035},0.0f,0.0f, + juce::Colour{0xff151b1e},0.0f,r.getHeight(),false)); + g.fillRoundedRectangle(r,4.5f); + g.setColour(down?juce::Colour{0xffa95b60}: + hovered?juce::Colour{0xff7b8588}:juce::Colour{0xff485156}); + g.drawRoundedRectangle(r,4.5f,1.0f); +} juce::Label* CompLook::createSliderTextBox(juce::Slider& s) { auto* label=juce::LookAndFeel_V4::createSliderTextBox(s); label->setFont(juce::FontOptions(12.0f)); @@ -245,6 +295,12 @@ void CompLook::drawToggleButton(juce::Graphics& g,juce::ToggleButton& button, Editor::Editor(Processor& p):AudioProcessorEditor(p),processor(p),alternate(p.snapshot()) { setLookAndFeel(&look); setOpaque(true); + // One-time UI-thread decode of the high-contrast brushed embossed wordmark. + // Embedded via BinaryData: no runtime file I/O or audio impact. + headerLogo=juce::ImageFileFormat::loadFrom( + BinaryData::arsoncomp_header_logo_png, + static_cast(BinaryData::arsoncomp_header_logo_pngSize)); + jassert(headerLogo.isValid()); const std::array bars{{arson::Range,arson::Hold,arson::Mix, arson::Link,arson::Highpass,arson::Lowpass}}; for(std::size_t i=0;i{}: juce::Rectangle{8,70,w-16,h-268}; @@ -726,16 +783,33 @@ void Editor::paint(juce::Graphics& g) { g.drawHorizontalLine(1,0.0f,static_cast(getWidth())); g.setColour(juce::Colours::black.withAlpha(0.58f)); g.drawHorizontalLine(67,0.0f,static_cast(getWidth())); - g.setFont(juce::FontOptions(17.5f)); - g.setColour(text); - g.drawText("ArSon",16,11,73,28,juce::Justification::centredLeft); - g.setColour(accent); - g.drawText("Comp",84,11,61,28,juce::Justification::centredLeft); - g.fillRoundedRectangle(17.0f,49.0f,37.0f,2.0f,1.0f); - g.setColour(text.withAlpha(0.73f)); - g.setFont(juce::FontOptions(9.0f)); - g.drawText("MODEL",198,5,84,13,juce::Justification::left); - g.drawText("PRESET",333,5,88,13,juce::Justification::left); + // Single-line embossed brand and a quiet, consistent overline hierarchy. + const auto header=arson::ui::HeaderLayout::calculate(getWidth()); + if(headerLogo.isValid()) { + g.setImageResamplingQuality(juce::Graphics::highResamplingQuality); + g.drawImageWithin(headerLogo,header.logo.getX(),header.logo.getY(), + header.logo.getWidth(),header.logo.getHeight(), + juce::RectanglePlacement::centred); + } else { + g.setColour(text); + g.setFont(juce::FontOptions(17.0f)); + g.drawText("ArSonComp",header.logo,juce::Justification::centredLeft); + } + // Subtle division between branding and functional toolbar; no visual noise. + g.setColour(juce::Colours::white.withAlpha(0.10f)); + g.drawVerticalLine(header.logo.getRight()+5,18.0f,52.0f); + g.setColour(muted.withAlpha(0.85f)); + g.setFont(juce::FontOptions(8.7f)); + const auto caption=[&g](const char* title,const juce::Rectangle& r) { + g.drawText(title,r.getX()+1,9,r.getWidth()-2,12, + juce::Justification::centredLeft,false); + }; + caption("VIEW",header.mini); + caption("MODEL",header.model); + caption("PRESET",header.preset); + caption("COMPARE",header.compare); + caption("FILES",header.file); + caption("ENGINE",header.bypass); const int mainY=compactMode?68:display.getBottom()+5; const int bottomY=compactMode?166:getHeight()-92; diff --git a/plugin/Editor.h b/plugin/Editor.h index b3339ed..fbb92fb 100644 --- a/plugin/Editor.h +++ b/plugin/Editor.h @@ -5,6 +5,10 @@ class CompLook final : public juce::LookAndFeel_V4 { public: CompLook(); + void drawComboBox(juce::Graphics&,int,int,bool,int,int,int,int,juce::ComboBox&) override; + void positionComboBoxText(juce::ComboBox&,juce::Label&) override; + void drawButtonBackground(juce::Graphics&,juce::Button&, + const juce::Colour&,bool,bool) override; juce::Label* createSliderTextBox(juce::Slider&) override; void drawRotarySlider(juce::Graphics&,int,int,int,int,float,float,float,juce::Slider&) override; void drawLinearSlider(juce::Graphics&,int,int,int,int,float,float,float, @@ -73,6 +77,7 @@ class Editor final : public juce::AudioProcessorEditor, private juce::Timer { int currentChannels=2; juce::Rectangle display; juce::Image grid,metalSurface; // cached full chassis and black glass LCD + juce::Image headerLogo; // cropped transparent metal/LED brand mark, decoded once juce::Path transferCurve,transferShade; juce::Path inputHistory,outputHistory,reductionHistory,reductionArea; // Six cached horizontal gradient brushes: input, output, GR, transfer, diff --git a/plugin/HeaderLayout.h b/plugin/HeaderLayout.h new file mode 100644 index 0000000..0d9288e --- /dev/null +++ b/plugin/HeaderLayout.h @@ -0,0 +1,32 @@ +#pragma once +#include + +namespace arson::ui { + +// Single geometry source for JUCE resized(), brand painting and smoke tests. +// Compact presets never displace the model, A/B, file menu or main bypass. +struct HeaderLayout { + juce::Rectangle logo,mini,model,preset,compare,file,bypass; + + static HeaderLayout calculate(int width) noexcept { + constexpr int inset=14,gap=10; + constexpr int logoW=137,miniW=46,modelW=112,compareW=48,fileW=50,bypassW=114; + constexpr int fixed=logoW+miniW+modelW+compareW+fileW+bypassW; + const int presetW=juce::jlimit(144,176,width-2*inset-6*gap-fixed); + constexpr int top=24,height=28; + HeaderLayout h; + int x=inset; + h.logo={x,17,logoW,32};x+=logoW+gap; + h.mini={x,top,miniW,height};x+=miniW+gap; + h.model={x,top,modelW,height};x+=modelW+gap; + h.preset={x,top,presetW,height}; + + // The right-side actions remain right-aligned when the editor grows. + // Any additional width becomes intentional whitespace, not a huge preset. + h.bypass={width-inset-bypassW,top,bypassW,height}; + h.file={h.bypass.getX()-gap-fileW,top,fileW,height}; + h.compare={h.file.getX()-gap-compareW,top,compareW,height}; + return h; + } +}; +} // namespace arson::ui diff --git a/plugin/Processor.cpp b/plugin/Processor.cpp index 06301f3..475b602 100644 --- a/plugin/Processor.cpp +++ b/plugin/Processor.cpp @@ -49,7 +49,13 @@ void Processor::run(juce::AudioBuffer& buffer,bool hostBypass) { side.getArrayOfReadPointers(),side.getNumChannels(),&meters); } void Processor::processBlock(juce::AudioBuffer& b,juce::MidiBuffer&) { run(b,false); } -void Processor::processBlockBypassed(juce::AudioBuffer& b,juce::MidiBuffer&) { run(b,true); } +void Processor::processBlockBypassed(juce::AudioBuffer& b,juce::MidiBuffer&) { + // Host-level bypass is an immediate bit-transparent passthrough, including + // the FIRST block: no 5ms ramp, gain, detector math or queue writes. + // Main input/output are in-place in JUCE; do not touch extra SC channels. + // APVTS "bypass" remains independently smoothed during ordinary processing. + juce::ignoreUnused(b); +} juce::AudioProcessorParameter* Processor::getBypassParameter() const { return state.getParameter("bypass"); } juce::AudioProcessorEditor* Processor::createEditor() { return new Editor(*this); } void Processor::getStateInformation(juce::MemoryBlock& dest) { diff --git a/tests/PluginSmoke.cpp b/tests/PluginSmoke.cpp index cd93f58..757f723 100644 --- a/tests/PluginSmoke.cpp +++ b/tests/PluginSmoke.cpp @@ -1,5 +1,6 @@ #include "../plugin/Processor.h" #include "../plugin/Editor.h" +#include "../plugin/HeaderLayout.h" #include "../plugin/PresetIO.h" #include "../plugin/GraphPaint.h" #include "../plugin/SurfacePaint.h" @@ -139,13 +140,22 @@ int main(int argc,char** argv) { if(std::abs(signal.getSample(0,blockSize-1)-0.05f)>0.002f || std::abs(signal.getSample(1,blockSize-1)-0.025f)>0.002f)return failHost(40); - // Host bypass path must ignore Input/Makeup and output the exact - // input waveform after the finite click-avoidance transition. + // Host bypass MUST be transparent from its very first sample, even + // with large active input/makeup gains and a running detector. if(!set("input",12.0f)||!set("makeup",12.0f))return failHost(41); - for(int b=0;b<12;++b)process(true); - if(std::abs(signal.getSample(0,blockSize-1)-0.05f)>1.0e-5f || - std::abs(signal.getSample(1,blockSize-1)-0.025f)>1.0e-5f) - return failHost(42); + process(true); + for(int i=0;i(BinaryData::arsoncomp_header_logo_pngSize)); + if(!logo.isValid()||logo.getWidth()!=360||logo.getHeight()!=72|| + logo.getPixelAt(0,0).getFloatAlpha()>0.02f)return 59; + int brightMetal=0,redPixels=0; + for(int y=0;y170 && p.getRed()>145 && + std::abs(int(p.getRed())-int(p.getGreen()))<30 && + std::abs(int(p.getGreen())-int(p.getBlue()))<35) + ++brightMetal; + if(p.getAlpha()>120 && p.getRed()>p.getGreen()+45) + ++redPixels; + } + if(brightMetal<600||redPixels>10)return 60; + // Real 131px GUI header footprint: verify highlights survive downscale. + juce::Image header(juce::Image::RGB,148,66,true); + { + juce::Graphics g(header); + g.fillAll(juce::Colour{0xff282c2f}); + g.setImageResamplingQuality(juce::Graphics::highResamplingQuality); + g.drawImageWithin(logo,13,17,131,31,juce::RectanglePlacement::centred); + } + int visibleHighlight=0; + for(int y=19;y<46;++y) + for(int x=14;x<144;++x) + if(header.getPixelAt(x,y).getBrightness()>0.54f) + ++visibleHighlight; + if(visibleHighlight<80)return 61; + } // Cached chassis must be genuinely brushed grey, while the LCD // must remain deep black. Probe actual JUCE image rasterization after // the Graphics lifetime ends (Windows may defer image writes). @@ -342,6 +387,21 @@ int main(int argc,char** argv) { file.deleteFile(); juce::AudioBuffer buffer(2,128);juce::MidiBuffer midi; for(int j=0;j<1000;++j) {buffer.clear();buffer.setSample(0,0,0.5f);processor.processBlock(buffer,midi);} + // Full toolbar geometry across minimum/default/wide editor widths: + // consistent 10px gaps, uniform baseline and bounded preset dropdown. + for(const int width : {740,780,900,1200}) { + const auto h=arson::ui::HeaderLayout::calculate(width); + const std::array,7> fields{ + h.logo,h.mini,h.model,h.preset,h.compare,h.file,h.bypass}; + if(h.preset.getWidth()<144||h.preset.getWidth()>176|| + h.bypass.getRight()!=width-14||h.logo.getX()!=14)return 62; + for(std::size_t i=1;iwidth-14 || + fields[i].getWidth()<=0)return 63; + if(fields[i].getY()!=24||fields[i].getHeight()!=28)return 64; + } + } for(int iteration=0;iteration<8;++iteration) { std::unique_ptr editor(processor.createEditor()); if(!editor->findChildWithID("preset.save") || !editor->findChildWithID("preset.load")) @@ -404,6 +464,16 @@ int main(int argc,char** argv) { if(!hp||!lp||!detector||!autoMode||!external||!listen|| !style||!presets||!save||!load||!file||!compare||!bypass|| !dynTab||!scTab||!range||!mix)return 21; + // Actual JUCE component positions must match the shared header grid; + // this catches collisions and regressions in MINI/FULL resizing. + const auto header=arson::ui::HeaderLayout::calculate(editor->getWidth()); + const auto* mini=editor->findChildWithID("view.compact"); + if(!mini || mini->getBounds()!=header.mini || + style->getBounds()!=header.model || + presets->getBounds()!=header.preset || + compare->getBounds()!=header.compare || + file->getBounds()!=header.file || + bypass->getBounds()!=header.bypass)return 65; // File controls are deliberately not mounted in the visible header. // Both independent tab views must have unclipped, non-overlapping // active controls at 740 and 780px.