Skip to main content

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: .dmg installer 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)
  • Windows: .exe installer with desktop integration
  • Linux: .deb and .rpm packages 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

  1. Setup: The application launches a Flask thread and PyQt GUI
  2. Configuration: Users select channels and number of positions
  3. Measurement: Press "Start Measurement" to begin automated capture
  4. Quality Check: Each measurement is automatically scored for quality
  5. Processing: Apply cross-correlation alignment and/or vector averaging
  6. 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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support


Last updated: 2025-07-30

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qrew-1.0.0rc3-py3-none-any.whl (9.8 MB view details)

Uploaded Python 3

File details

Details for the file qrew-1.0.0rc3-py3-none-any.whl.

File metadata

  • Download URL: qrew-1.0.0rc3-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

Hashes for qrew-1.0.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 7241da9afee283b6cb9ae408ae29db7b8313e50c4dc25bc4e08374bfb913315a
MD5 06f16438a83759a29e098e4b0ac27570
BLAKE2b-256 25c3df4debaeac615cae72394c49166144f7132f3b5a5d04f1da2fb8be22a928

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page