Skip to content

About

Universal precise audio measurement software

Resources

Stars

14 stars

Watchers

5 watching

Forks

Repository files navigation

Phonalyser

Precision audio measurement workbench - a desktop analyzer for THD/IMD, SNR/ENOB, frequency response, and oscilloscope-style inspection, built around coherent FFT averaging and bit-exact playback/capture.

Project site: https://dgo42.github.io/Phonalyser/

Phonalyser

Highlights

  • FFT analyzer - THD, THD+N, IMD, SNR, ENOB, per-harmonic readout, coherent averaging, selectable windows, and live calibration (.frc).
  • Ultra-low-distortion measurements - sub-ppm THD with a capable ADC/DAC (e.g. E1DA Cosmos), coherent averaging to pull the noise floor down.
  • Oscilloscope - triggered time-domain view with Vpp/Vrms/period/frequency stats, digital-phosphor persistence, glitch trigger, an amplitude histogram, and a residual view (captured signal minus a best-fit tone - single or dual - exposing the distortion, noise and glitches hidden under the fundamental).
  • Frequency response - Farina log-sweep deconvolution with .frc calibration, RIAA/IEC and ideal-filter overlays (low/high/band-pass, notch × Butterworth, Chebyshev, inverse Chebyshev, elliptic, Bessel) with measured-vs-ideal compare, and a band-flatness readout (−X dB corners or ± deviation over a range).
  • Signal generator - sine, dual-tone (IMD), rectangle / triangle, noise, sweeps - all DDS-generated.
  • DAC pre-distortion calibration - a closed-loop wizard that iteratively cancels the converter's own harmonics (and dual-tone IMD), pushing the playback chain's distortion far below what the DAC produces alone.
  • Notch-filter tuning - a live module for trimming a passive twin-T notch: a continuously looping sweep tracks the null in real time so you can walk it onto the target frequency, then de-embed the notch's response from the FFT.
  • Multi-backend audio - WASAPI & WDM-KS (Windows), CoreAudio (macOS), JavaSound (Linux), plus a direct QA40x (QuantAsylum QA402/QA403) USB backend - on the desktop and, over WebUSB, in the browser; high sample rates and 16/24/32-bit.
  • Network bench - a headless phonalyser-server turns the machine wired to the measurement hardware into a bench; the desktop app and the browser port measure through it as if the hardware were local. Servers are discovered via multicast, devices are locked per client with the holder named, cards and calibration live on the bench, and the generator is commanded on the server rather than streamed.
  • Per-card calibration - full-scale calibration follows the physical card across backends via name aliases, with a range table per attenuator / DIP position; the crosshair calibrations write straight into the card's active range.

Ultra-low-distortion FFT

Download & run

Run it in your browser - no install. A WebAudio port of Phonalyser runs the full analyzer (FFT, oscilloscope, signal generator) directly in a modern browser (Chrome/Edge) at https://dgo42.github.io/Phonalyser/web/ - nothing to download.

To install the desktop app instead, each release offers two ways to run Phonalyser:

Native installers (recommended) - they bundle their own Java runtime, so nothing else is needed:

OS Installer
Windows Phonalyser-<version>.exe
Linux Phonalyser-<version>.deb
macOS (Apple Silicon) Phonalyser-<version>-arm64.dmg
macOS (Intel) Phonalyser-<version>-x64.dmg

Platform JARs - run on your own Java 17+ runtime (no bundled JRE). Download the JAR for your OS plus the matching launcher script, keep them in the same folder, and run the script:

OS JAR Launcher Run guide
Windows phonalyser-<version>-windows.jar Phonalyser-windows.bat README-windows.txt
Linux phonalyser-<version>-linux.jar Phonalyser-linux.sh README-linux.txt
macOS phonalyser-<version>-macos.jar (Intel: ...-macos-x64.jar) Phonalyser-macos.sh README-macos.txt

The JARs are platform‑specific because each bundles the SWT native for that OS/arch. macOS additionally needs -XstartOnFirstThread (the launcher adds it). To run without the script: java -jar phonalyser-<version>-<os>.jar - on macOS, java -XstartOnFirstThread -jar ....

32-bit Windows - a legacy 32-bit JAR (phonalyser-<version>-windows-x86.jar) is built for 32-bit machines (lab PCs, instrument controllers). Run it with an explicit heap cap - a 32-bit JVM defaults to a 256 MB heap and cannot reserve much beyond ~1.4 GB of address space on 32-bit Windows: java -Xmx1200m -jar phonalyser-<version>-windows-x86.jar (the .bat launcher adds the flag automatically when it picks the x86 JAR).

Headless server - each release also attaches the network bench as one zip per platform:

Platform Server bundle
Windows x64 / x86 phonalyser-server-<version>-windows-x64.zip / ...-windows-x86.zip
Linux x64 / aarch64 phonalyser-server-<version>-linux-x64.zip / ...-linux-aarch64.zip
macOS Intel / Apple Silicon phonalyser-server-<version>-macos-x64.zip / ...-macos-aarch64.zip

A zip carries the server's fat JAR, the platform natives, a console launcher, the service-install scripts (Windows service, Linux systemd unit, macOS per-user launch agent) and its own README; it runs on Java 17+. There is deliberately no authentication - the server is a bench instrument for a trusted network. The full story is in the server chapter of the help.

Code signing

The installers and JARs are currently distributed unsigned, so the OS may warn on first run - this is expected:

  • Windows - SmartScreen "unknown publisher": click More info -> Run anyway.
  • macOS - Gatekeeper may block it: right‑click -> Open, or clear the quarantine flag: xattr -dr com.apple.quarantine <file>.

Signed builds are planned via the Microsoft Store (MSIX), which signs the package for free at publish time - no per‑developer certificate required. Signing direct (non‑Store) downloads would need a paid code‑signing certificate, which only becomes worthwhile once there's a steady download volume (a certificate's SmartScreen reputation builds with downloads regardless).

QA40x on Linux (USB access)

Linux grants raw USB access per device, so opening a QuantAsylum QA402/QA403 fails with libusb_open failed: LIBUSB_ERROR_ACCESS (-3) until a udev rule allows it. The .deb installer sets this up automatically; when running the platform JAR (or any other install), configure it once by hand:

  1. Create /etc/udev/rules.d/70-qa40x.rules (as root) with:

    SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="4e37", TAG+="uaccess", MODE="0660", GROUP="plugdev"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="4e39", TAG+="uaccess", MODE="0660", GROUP="plugdev"
    

    (16c0:4e37 = QA402, 16c0:4e39 = QA403. The hex must stay lowercase - udev matches are literal. The same file ships in the source tree at src/main/jpackage/linux/70-qa40x.rules.)

  2. Reload the rules and replug the analyzer:

    sudo udevadm control --reload-rules
    sudo udevadm trigger
    

TAG+="uaccess" covers desktop sessions on any systemd distro; the plugdev group is the Debian/Ubuntu fallback (add yourself with sudo usermod -aG plugdev $USER and re‑login). On distros without a plugdev group, replace MODE="0660", GROUP="plugdev" with MODE="0666".

Preferences & log place

Phonalyser never writes inside its install directory (a packaged .app, Program Files, or a system package is read-only). Preferences and logs live in the per-user location for each OS:

OS Preferences Logs
Windows %APPDATA%\Phonalyser\ %APPDATA%\Phonalyser\logs\
macOS ~/Library/Application Support/Phonalyser/ ~/Library/Application Support/Phonalyser/logs/
Linux ~/.config/Phonalyser /var/log/phonalyser when writable, otherwise ~/.config/Phonalyser/logs

Override the base directory with -Dapp.data.dir=<path>.

Translating the UI & help

On first run the packaged app seeds editable copies of the UI strings and the help pages into the per-user data dir; edit them there and relaunch. The bundled copies stay as a fallback, so a missing or incomplete file never loses the built-in text. After an app upgrade, delete the dir to re-seed the new version.

OS UI strings (i18n) Help pages
Windows %APPDATA%\Phonalyser\i18n\ %APPDATA%\Phonalyser\help\
macOS ~/Library/Application Support/Phonalyser/i18n/ ~/Library/Application Support/Phonalyser/help/
Linux ~/.config/Phonalyser/i18n ~/.config/Phonalyser/help

UI strings are messages_<lang>.properties (e.g. messages_de.properties); help pages live under help/<lang>/.

Measurement bench

Wiring the bench so the cabling doesn't inject its own noise - a Faraday cage, CAT.8 twisted pair with XLR connectors, single-point grounding, and the resulting induced-noise budget - is described in doc/Faradey-Cage-bench.md.

Roadmap

Planned measurements, backends and architectural work for the versions after the current one - sorted simple to complex, from stepped sweeps over the existing FFT engine to ASIO and NI DAQ backends and a scripting SPI - is listed in doc/ROADMAP.md. Nothing there is implemented yet.

Build & run

Requires JDK 17 and Maven.

mvn -DskipTests package from the repository root builds everything. Project Nayuki's FLAC library is not on Maven Central, but it is vendored as the modules/flac-library-java module and built by the reactor, so a fresh clone needs no preparatory step.

See BUILD.md for the full build and run instructions - including cross-building other platforms and the 32-bit Windows JAR - and PACKAGING.md for per-platform packaging (jpackage).

License

GNU Affero General Public License v3.0 - see LICENSE.

About

Universal precise audio measurement software

Resources

Stars

14 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages