Automated loudspeaker measurement system using REW API
Project description
Qrew
Automated Loudspeaker Measurement System using REW API
This project is a single Python‑based GUI application that automates capturing and processing loudspeaker measurements through Room EQ Wizard (REW) API.
Recent Changes
- Added automatic measurement abort when VLC playback errors occur, ensuring that measurements are properly cancelled in REW.
Installation
Prerequisites
- Python 3.8 or higher
- Room EQ Wizard (REW) with API enabled, Pro license is required
- VLC Media Player (for audio playback)
Install via pip
From PyPI (when published):
pip install qrew
Platform-Specific Installers
Pre-built installers are available for:
- macOS:
.dmginstaller with native app bundle- Intel (x86_64):
Qrew-*-macos-x86_64.dmg - Apple Silicon (arm64):
Qrew-*-macos-arm64.dmg - Universal:
Qrew-*-macos-universal.dmg(when available)
- Intel (x86_64):
- Windows:
.exeinstaller with desktop integration - Linux:
.deband.rpmpackages with desktop files
Download the latest installer from the Releases page.
Quick Start
1. Enable REW API
- Open REW
- Go to Preferences → API
- Enable "Start Server"
- Default port should be 4735
2. Launch Qrew
# If installed via pip
qrew
3. Load Stimulus File
- Click "Load Stimulus File"
- Select your measurement sweep WAV file
- The directory containing this file will be searched for channel-specific sweep files, make sure you have the sweeps you need for a given channel. Channels are selected on the main UI
4. Configure Measurement
- Select speaker channels to measure
- Set number of microphone positions
- Click "Start Measurement"
Usage Workflow
- Setup: The application launches a Flask thread and PyQt GUI
- Configuration: Users select channels and number of positions
- Measurement: Press "Start Measurement" to begin automated capture
- Quality Check: Each measurement is automatically scored for quality
- Processing: Apply cross-correlation alignment and/or vector averaging
- Export: Save raw measurements or processed results
Tips for New Contributors
- Familiarity with PyQt5's event loop, signals/slots, and QThreads will help when modifying the GUI or worker logic
- Qrew uses Flask to bridge REW's HTTP callbacks to Qt signals; understanding this interaction is key when debugging measurement flow
- REW API request structures can be found on REW API documentation page
- Measurement quality scoring is defined below; consult the scoring table below for threshold rationale, input on improving scoring system welcome
Loudspeaker Measurement Quality Scoring
This document summarises the heuristic thresholds applied in evaluate_measurement()
to decide whether an individual REW measurement (impulse response + THD export)
is good, caution, or retake.
| Metric | Pass Threshold | Rationale |
|---|---|---|
| Signal-to-Noise Ratio | ≥ 55 dB (20 pts max at 75 dB) | Adequate SNR ensures measurements aren't noise-limited |
| Signal-to-Distortion Ratio | ≥ 40 dB (15 pts max at 55 dB) | High SDR indicates clean signal path and low artifacts |
| Mean THD (20 Hz - 20 kHz) | ≤ 1% (15 pts max at 0%) | Primary distortion metric for loudspeaker linearity |
| Peak THD Spike | ≤ 3% (10 pts max at 0%) | Identifies resonances, breakup modes, or clipping |
| Low-frequency THD (< 200 Hz) | ≤ 8% (5 pts max at 0%) | Bass drivers typically have higher distortion |
| Harmonic Ratio (H3/H2) | ≤ 0.5 (5 pts max at 0) | IEC 60268-21: odd harmonics are more audible |
| Magnitude-squared Coherence | ≥ 0.95 (15 pts max at 0.99) | Indicates measurement repeatability and SNR |
| IR Peak-to-Noise | ≥ 45 dB (15 pts max at 55 dB) | Impulse response quality independent of frequency domain |
The final score (0‑100) is a weighted sum: The final score (0‑100) is a weighted sum:
Quality Ratings:
- PASS (≥ 70 points): Measurement meets professional standards
- CAUTION (50-69 points): Usable but may need verification
- RETAKE (< 50 points): Measurement quality insufficient for analysis
The scoring uses linear scaling within each component's range, with inverse scaling for distortion metrics (lower values score higher). Coherence analysis uses Welch's method for magnitude-squared coherence estimation. THD calculations include both harmonic distortion and noise floor contributions (THD+N).
License
GNU General Public License v3.0
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
- Issues: GitHub Issues
- Documentation: Wiki
- Discussions: GitHub Discussions
Last updated: 2025-07-30
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qrew-1.0.0rc2-py3-none-any.whl.
File metadata
- Download URL: qrew-1.0.0rc2-py3-none-any.whl
- Upload date:
- Size: 9.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95a42194c9827bb92217ece3669e46909e556c54a3e0fb1b6a2eb267bae10a73
|
|
| MD5 |
84a1a2d4e4902f75e0666ccf4f6d253b
|
|
| BLAKE2b-256 |
27fb7f8c70e74b2074ce7dfded10e0ef5451fe4f43603e55fd5170246a7eb52b
|