Skip to content

v3.6.0: vibration measurement and REW measurement sequencer - #1

Merged
ppklose merged 30 commits into
mainfrom
feature/vibration
Nov 13, 2026
Merged

ppklose merged 30 commits into
mainfrom
feature/vibration

Conversation

@ppklose

@ppklose ppklose commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Version 3.6.0 with two features: vibration measurement with an IEPE accelerometer, and the REW Measurement Sequencer.

Vibration measurement

Adds vibration measurement with one IEPE accelerometer (triaxial or uniaxial) alongside the microphone.

  • Channel model: a role per input (Mic, Accel X/Y/Z, Accel uniaxial, Off). Only Mic inputs feed the SPL path. Without accelerometer roles the SPL results are bit-identical to v3.5.2 (regression tests).
  • Inputs and Sensors window: roles, live levels, per-axis calibration (handheld calibrator or datasheet), accelerometer settings, assessment values.
  • DSP (Source/Vibration/, double precision, no JUCE):
    • high-pass, integration, decimation;
    • ISO 8041 weightings, KB weighting, band limit;
    • detectors: RMS, peak, a_w,rms, MTVV, VDV, crest factor, PPV with dominant frequency, KB_Fmax / KB_FTr, vector sum, A(8);
    • multirate 1/3-octave spectrum (1 Hz – 1250 Hz).
  • Profiles: structure-borne, machinery (ISO 20816), whole-body health and comfort (ISO 2631-1), hand-arm (ISO 5349-1), building perception (DIN 4150-2), building structural (DIN 4150-3).
  • Assessment against editable reference values (EU 2002/44/EC and LärmVibrationsArbSchV, ISO 10816-3 / 20816-3 zones, DIN 4150-2, DIN 4150-3), shown as a status dot in the new Vibration panel.
  • Output: timeline traces, CSV columns, JSON settings, multichannel WAV with roles and calibration, and an HTML vibration report.
  • FFT source selector replaces the Dual FFT toggle. The standalone app accepts devices with up to 32 inputs.

Docs: docs/VIBRATION_GUIDE.md, docs/VIBRATION_SPEC.md.

REW Measurement Sequencer

Tools → REW Measurement Sequencer… runs a list of Room EQ Wizard sweeps through REW's REST API (127.0.0.1:4735). It needs REW Pro and doesn't exist on iOS.

  • Transport and helpers (Source/Rew/): HTTP via WebInputStream, so REW's 400 "busy" reply is visible. The tests use a simulated REW (Tests/FakeRewTransport.h).

  • Sequence model: per-step settings that are each optional, so an unset setting keeps REW's value:

    • output, second output (ASIO) and invert;
    • input range, level, sweep, repetitions, timing reference;
    • protection, group, wait-for-user prompt, delay.

    Sequences are saved as *.rewseq.json. Each sequence is checked against REW's choice lists before a run.

  • Engine: runs on its own thread.

    • Before writing anything: checks REW, its audio and the sequence, and only writes once those pass.
    • Per step: sends only the settings the step sets, starts the sweep, and detects the result from new measurement IDs and REW's error and warning lists. Each sweep gets a time limit.
    • Errors: stop, skip, or retry once. Pause and abort are available.
    • At the end: Save all, then REW's settings and blocking mode are restored, also after an abort or error.
    • Ownership: the processor owns the run, so it continues when the window or editor closes.
  • SPLMeter's own values per sweep:

    • LAeq, LCeq, LZeq;
    • LAFmax and LCSmax, from FAST and SLOW detectors that are already settled when a sweep starts;
    • LCpeak;
    • vibration RMS and peak per axis.

    They are saved per run as CSV and JSON, with a timeline marker per sweep.

Docs: docs/REW_SEQUENCER_GUIDE.md, docs/REW_SEQUENCER_SPEC.md.

Test plan

  • Unit and processor tests: 143 + 43 test cases pass locally, SPL path bit-identical
  • CMake Standalone / VST3 / AU and Xcode (build.sh) build on macOS
  • REW transport checked against a running REW 5.40 b147 (read-only live test [.rewlive])
  • Vibration steps 1–10 tested in the app by the author
  • REW sequencer with real sweeps in the app (dry run, run, wait-for-user, abort, results files)
  • Vibration steps 11–12 (assessment, report) with a real measurement
  • REW live dry run (SPLMeterTests "[.rewlive-dryrun]") and ASIO second output on Windows
  • CI green on all platforms (build-chain.yml runs after the merge to main)

🤖 Generated with Claude Code

Philipp Paul Klose and others added 30 commits November 12, 2026 16:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SPLMeterProcessorTests: runs the real processor on 5 deterministic
  scenarios (mono/stereo/quad, bandpass, SLOW, mute, calOffset) and
  compares meter values, log entries and FFT ring buffers with golden
  files in Tests/golden (exact mode: SPLMETER_GOLDEN_EXACT=1)
- State compatibility test: v3.5.2 plugin state fixture must load
  (all 78 params, UIState, MIDI CC, channel names) and round-trip
- tests.yml: unit + regression tests on every push/PR (Linux)
- run-tests.sh: local build outside iCloud, --exact / --update modes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 8th-order float bandpass leaves platform-dependent rounding residues
for a 5 Hz tone deep in its stopband (Linux x86 vs macOS arm64: max diff
0.067, peak SPL 0.015 dB). Exact mode stays bit-identical locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SensorConfig.h: SensorRole {Mic, AccelX/Y/Z, AccelUniaxial, Off} and
  validation (one accelerometer sensor: up to one channel per axis, or
  exactly one uniaxial)
- Processor: roles persisted in UIState/Inputs (non-Mic entries only),
  mirrored into atomics for the audio thread; only Mic inputs feed the
  SPL mix, active-channel count and 20 Hz bandpass; non-Mic inputs are
  restored after the correction convolution. File mode unchanged (§7.5).
- Default (all Mic) is bit-identical to v3.5.2 (regression --exact)
- Tests: validation, accel/Off excluded from mix (bit-identical to
  mic-only run), no-mic silence, bandpass/correction bypass for accel,
  role persistence, v3.5.2 state loads as all-Mic

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Processor: FFT ring buffer per input (up to 8), heap-allocated in
  prepareToPlay, grow-only and published via atomic pointers so the GUI
  never reads reallocated memory; replaces the 2 fixed dual arrays
  (processor object 4 MB smaller). copyFftWindow(channel) now serves
  any input; missing inputs read as silence.
- New parameter fftSource: Mix / Dual (1+2) / Input 1..8. setFftSource()
  keeps the legacy fftDual flag in step (sessions stay readable by
  3.5.2); sessions without fftSource are migrated from fftDual.
- LogComponent analyses the selected source; single inputs get a
  legend with the channel name.
- Settings: FFT source combo replaces the Dual FFT button.
- JSON settings export/import: fftSource, with fftDual fallback.
- Tests: per-input buffers (6 inputs, mono device, device change),
  source parameter, fftDual sync, state round-trip, 3.5.2 migration.
  Regression --exact still bit-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Header-only, no JUCE dependency:
- Biquad.h: double-precision biquads, bilinear transform with prewarping
- Weighting.h: ISO 8041 Wb/Wc/Wd/We/Wf/Wh/Wj/Wk/Wm, KB (DIN 4150-2),
  band-limit; digital filters + exact analog magnitude
- Decimator.h: half-band FIR cascade (75 taps, -92 dB) to fs >= 8 kHz
- Calibration.h: calibrator and datasheet methods (dB re 1 um/s^2)
- AccelChannel.h: cal -> HP -> integrate (full rate, no DC pole)
  -> decimate -> weighting

Tests (VibrationDspTests.cpp, 8 cases / 1093 assertions):
- parameters vs ~300 public reference values (<= 0.02 dB; Wb 0.06)
- digital vs analog within nominal ranges (+-0.1 dB)
- decimator ripple/stopband/aliasing, calibration formulas,
  velocity/displacement accuracy (0.5 %), Wk end to end
Spec: datasheet formula needs sqrt(2); integration before decimation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- VibrationEngine (JUCE-free): 1-3 axes (X/Y/Z or uniaxial), AccelChannel
  per axis, detectors per axis: running RMS (tau), interval peak,
  peak max-hold, peak-to-peak; vector sum with k-factors (RMS from
  k-weighted mean squares, peaks from sample-wise magnitude)
- VibrationSnapshot published every 125 ms through a seqlock
- Real-time-safe engine hand-over: built on the message thread, swapped
  in by the audio thread at block start, old engine freed on the next
  rebuild (audio thread never allocates or frees)
- Settings in UIState/Accel (HP, quantity, weighting per axis, band,
  tau, k), calibration per input in UIState/Inputs (cal<ch>)
- Pause / DAW sync hold the detectors; resetSessionPeak() also resets
  vibration statistics
- No accelerometer: empty engine, SPL path bit-identical (--exact)
- Tests: triax RMS/peak/p2p/Sigma, k-factors, calibrator calDb, velocity,
  Wd/Wk, runtime role changes, invalid config, missing inputs,
  pause/reset, persistence, CPU budget (0.38 % of one core for a
  weighted triax at 48 kHz)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Settings → "Inputs & Sensors…" opens a window with a role per input,
  live level meters, calibrated level, cal value, calibration date/method,
  and the accelerometer group (quantity, high-pass, RMS tau, weightings,
  band limits, k-factors, sensor serial, usable range)
- Channel buttons in Settings show the role tag (X/Y/Z/ACC/OFF)
- Calibration dialog: handheld calibrator (measured on the live input,
  frequency ±5 % and stability ±0.2 dB checks) or datasheet sensitivity
- vib::CalibratorMeasurement: band-pass, interpolated zero-crossing
  frequency, gain-corrected RMS; lock-free hand-over to the audio thread
- Processor: per-input RMS/peak meters, sensor info and cal date persist
- Tests: calibrator measurement (DSP), processor hand-over, meters,
  persistence; SPL regression still bit-identical

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- VibrationPanel: X/Y/Z/Σ rows (or one uniaxial row) with log-scaled RMS
  bar, interval peak tick, max-since-reset marker, RMS / max / p-p readout
- Header shows quantity, weightings, RMS tau, file-mode and missing-input
  notes; unit selector (linear, g, dB re ISO 1683) persists in UIState/Accel
- Invalid roles show a red message; panel hidden without accelerometer roles
- Basic mode grows the window by the panel; advanced mode takes the height
  from the timeline (extendedHeight unchanged)
- SPL meter shows "No microphone input" when no input has the Mic role
- vib::units conversion/format helpers with unit tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LogEntry carries a VibrationLog block (RMS + interval peak per X/Y/Z/Σ)
  for live accelerometer readings
- Timeline: Vib X/Y/Z/Σ toggles (persisted), traces on the right axis with
  automatic range in the display unit; psychoacoustic metric keeps its scale
- CSV: vibration columns appended after Marker, empty without readings, so
  existing column positions are unchanged
- JSON settings: "inputs" (roles + calibration) and "accel" blocks; files
  without them leave the input setup unchanged
- Tests: log entries, CSV columns, JSON round trip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re playback

- With an accelerometer, the WAV recorder records every non-Off input (up
  to 8, 24-bit) and stores track input/name/role/calibration as JSON in the
  iXML (ASWG userData) chunk; without one it stays the 3.5.2 stereo file
- Recorder rebuilt via lock-free hand-over (RtHandover) on layout changes
- File playback reads the metadata: Mic tracks feed the SPL mix, accelerometer
  tracks feed a separate vibration engine with the recorded calibration;
  panel and timeline show the readings during playback
- Transport passes up to 8 channels
- Tests: recording layout, WAV round trip with metadata, playback analysis
  incl. Mic-only mix, layout switching

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… inputs

- Standalone accepted only 1-8 inputs; a device opening more made JUCE fall
  back to the first channel config {1, 1}, so only input 1 reached the app.
  Standalone now accepts up to 32 inputs (plugins keep 1-8)
- The table lists every unmuted input, plus muted inputs with a sensor role
- Rename "Inputs & Sensors" to "Inputs and Sensors"
- Test: bus layout limits per wrapper type, roles on input 13 of 16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Profiles.h: the eight spec §6 profiles (structure-borne, machinery
  ISO 20816 + low speed, whole-body health/comfort, hand-arm, building
  perception/structural) with quantity, weighting, band, high-pass, k,
  RMS tau, main value and display unit
- Base profile persists; edits show "Custom (based on ...)"
- Main value (max axis RMS, max k*axis RMS, sum RMS, max peak since reset)
  computed into every snapshot and log entry; shown in the panel header,
  written to CSV vib_main, profile key in vib_profile
- Inputs and Sensors: profile and main value selectors
- Tests: profile definitions, custom detection, main values, processor
  apply/persist/CSV

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Per axis: a_w,rms (linear), MTVV (tau 1 s), VDV, crest factor, KB_Fmax,
  KB_FTr (30 s cycles), dominant frequency at the PPV
- Sum per ISO 2631-1: a_w and MTVV from k-weighted axes, VDV_total =
  (sum (k*VDV)^4)^(1/4)
- Main values over the measurement: health max k*a_w, comfort/hand-arm
  sum a_w, building perception KB_Fmax; A(8) with daily exposure time
- Panel results line: A(8), VDV, MTVV, crest factor / KB_FTr / PPV axis + f_dom
- Engine settles (0.8 s / HP, 0.5-10 s) before the detectors start, so the
  start-up transient no longer inflates PPV, MTVV, KB_Fmax and f_dom
- Tests: closed-form a_w, VDV (a*(1.5T)^(1/4)), MTVV burst, crest, f_dom of
  decaying sines, KB_FTr cycles, sum combination, processor reset and
  transient-free PPV (verified to fail without settling)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d dirs

- X brown, Y mint, Z slate (old orange/cyan/violet collided with SPL traces)
- weighting combos show short labels, full name as tooltip
- .gitignore: build-*/ and stray Vendor:asiosdk:common/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Source/Vibration/Assessment.h: verdicts per profile (EU/Germany whole-body
  A(8)/VDV, hand-arm, ISO 2631-1 comfort band, ISO 20816-3 zones, DIN 4150-2
  decision flow, DIN 4150-3 PPV with frequency interpolation and locations)
- KB_FTr = KB_FTm * sqrt(T_e / T_r); detector value renamed to kbFTm
- editable limits in UIState/AccelLimits, JSON accel.limits
- Assessment card in Inputs and Sensors, status dot in the Vibration panel
- verified the open standard values (spec 9.3, 13, 14)
- tests: VibrationAssessmentTests + limits persistence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Source/VibrationReport.h: self-contained HTML (inline CSS + SVG): header,
  setup, results, assessment with the values used, time history, 1/3-octave
  spectrum, DIN 4150-3 PPV chart, events, mic summary, disclaimer
- Ex-/Import: Save Vibration Report... with metadata dialog (UIState/Report)
- Source/Vibration/ThirdOctave.h: multirate 1/3-octave bank (1 Hz - 1250 Hz)
  in the engine, published in the snapshot
- tests: report string checks, band accuracy and selectivity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs/VIBRATION_GUIDE.md: setup, calibration, profiles, assessment,
  measuring, export and report
- README: vibration feature section, export menu, standards, v3.6.0 changelog
- version 3.6.0 in CMakeLists.txt, SPLMeter.jucer, JucePluginDefines.h and
  the Xcode Info plists (were 2.5.0 / 2.6.1; AU component version 0x30600)
- version label reads JucePlugin_VersionString

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ersistence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on, errors, abort, restore)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atus, Tools menu entry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… second output

- processor owns the run (survives closing the window/editor), aborts and restores REW on destruction
- Run / Dry run / Pause / Abort, progress over all sweeps, status line, run log
- wait-for-user banner with Continue / Skip step, window comes to the front
- per-step second output: ASIO secondary output + enable, invert second output (Java: invert only, with L+R)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, timeline markers

- step integrator in the processor: LAeq/LCeq/LZeq, LAFmax/LCSmax (own, always settled
  FAST-A/SLOW-C detectors), LCpeak, vibration RMS/peak per axis and sum; user values untouched
- results CSV + JSON per run (default Documents/SPLMeter/REW runs), Show results button
- per-step levels in the run log; one timeline marker per sweep, queued by the processor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppklose ppklose changed the title v3.6.0: vibration measurement with IEPE accelerometers v3.6.0: vibration measurement and REW measurement sequencer Nov 13, 2026
@ppklose
ppklose merged commit 0c937b4 into main Nov 13, 2026
2 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