Skip to content

Fix analyzer refresh - #7

Merged
leprpht merged 6 commits into
mainfrom
fix-analyzer-refresh
Oct 3, 2026
Merged

leprpht merged 6 commits into
mainfrom
fix-analyzer-refresh

Conversation

@leprpht

@leprpht leprpht commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This pull request introduces significant improvements to the test coverage, reliability, and musical responsiveness of the ElectroBow project. The main changes include new and expanded tests for the audio processing pipeline, enhancements to the BowTrigger class to better handle repeated notes and physical plucks, and build system updates to support these changes. The changes ensure that the system handles real-world musical input more robustly and that the test suite covers a wider range of scenarios, including edge cases.

Test suite expansion and coverage:

  • Added comprehensive new tests to tests/PitchDetectorTests.cpp, covering analyzer refresh behavior, detection of repeated plucks during sustained notes, release event delivery, envelope handling, input dynamics with non-finite values, analyzer voice retention, correct voice admission and release in VoiceManager, and full processor integration. These tests help ensure correct behavior in complex musical scenarios and edge cases. [1] [2] [3] [4]
  • Added helper functions and includes in tests/PitchDetectorTests.cpp to support new test cases and integration testing. [1] [2]

Musical input and trigger handling improvements:

  • Enhanced the BowTrigger class to more reliably detect new physical plucks during sustained notes, using a differential onset baseline, cooldown logic, and retrigger thresholds. This allows for more expressive and accurate performance, especially with chords and repeated notes. [1] [2] [3]

Envelope and sustain logic:

  • Modified the BowEnvelope::sustain() method to avoid prematurely forcing the sustain state, ensuring that an attack phase completes naturally even if a refresh occurs. This prevents unintended truncation of the attack phase.

Build system and test integration:

  • Updated CMakeLists.txt to include Source/PluginProcessor.cpp in the test build, link additional JUCE and STK libraries, set new compile definitions for test builds, and add necessary include directories. This enables integration testing of the processor and STK voices in the test suite.
  • Added conditional compilation in Source/PluginProcessor.cpp to disable the editor in test builds, allowing for headless integration testing. [1] [2]

These changes collectively improve the reliability, testability, and musical expressiveness of the ElectroBow codebase.

@leprpht
leprpht merged commit 4747431 into main Oct 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant