Skip to content

Analyzer Partially Working – Only Phase Correlation & Some Views Functional #369

Open

Description

@l1uk

I compiled the latest version of Calf Studio Gear on Arch Linux and encountered an issue with the Analyzer plugin. Specifically:

The phase correlation meter always works correctly.
The stereo Analyzer only functions "Bars" view mode. "Lines" does not work.
Steps to Reproduce:
Compile and install the latest Calf Studio Gear version on Arch Linux.
Load the Analyzer plugin using PipeWire with Carla.
Observe that only some visualization modes function.
Try running with pure JACK instead of PipeWire → issue persists.
Try inside different DAWs (Reaper, Ardour) → same behavior.

System Information:
OS: Arch Linux
Audio System: PipeWire (also tested with pure JACK)
Hosts tested: Carla, Reaper, Ardour
Calf Version: 0.90.2-67-g0663a6ee compiled from scratch and 0.90.4-1 from extra arch repo
Additional Notes:
There are no obvious errors in the terminal output when running the plugin.
If there are specific debug flags or logs I can check, I'd be happy to investigate further.
Let me know if more details are needed! Thanks for your work on Calf.

Image

Activity

  1. belanimal commented on Jul 4, 2025

    @belanimal

    I have the exact same issue. For a while it did work. Somehow an update seems to have borked it but hell if i know what package / lib did it. I'd also would like to have details on how to fix/debug this. Would a build from source fix it ? Might be my next move.

  2. eamondo2 commented on Jul 22, 2026

    @eamondo2

    So I was able to actually resolve this with some trial and error, turns out the problem is in the compile options and their ordering.

    Specifically here:

    add_compile_options(-ffast-math -finline-limit=80 -finline-functions -finline-functions-called-once)
    

    That needs to be changed to:

    add_compile_options(-ffast-math -fno-finite-math-only -finline-limit=80 -finline-functions -finline-functions-called-once)
    

    The order matters, -fno-finite-math-only must come after -ffast-math (last flag wins), which re-enables inf/NaN semantics while keeping the rest of fast-math for the DSP.

    The reason, as best I've been able to establish, is that a recent cairo bump (cairo >= 1.18) causes it to silently drop entire paths when calling cairo_line_to if any coordinate is non-finite.
    That matters because the analyzer uses INFINITY as a flag for "skip this pixel" when drawing. So with -ffinite-math-only enabled, the compiler assumes infinities can't exist and folds the line-graph widget's guard data[i] < INFINITY to constant-true. Technically -ffast-math was always incompatible, it just never showed up here before.

    Bars/boxes/spectralizer views survive because they pass coordinates through (int)y casts before cairo, so no non-finite value ever reaches the path.

    I've got the patched version working on my box currently, using a nix substituteInPlace expr. to trial it.

    calf = prev.calf.overrideAttrs (old: {
        postPatch = (old.postPatch or "") + ''
          substituteInPlace src/CMakeLists.txt \
            --replace-fail "-ffast-math" "-ffast-math -fno-finite-math-only"
        '';
      });
  3. belanimal commented on Jul 27, 2026

    @belanimal

    Sorry to come again but i see it's moved forward with a new build number. I am just joe average , how do i install this updated version.
    To me the analyser functions are important. Please let me know.

    Ric

  4. eamondo2 commented on Jul 27, 2026

    @eamondo2

    So I'm not shipping the updated version, my nix derivation just overrides the compile flag at build time for my local installation.
    In theory, if you follow the standard build guide for the repo, and make the one-line change as outlined in #407 it should work?
    I can't guarantee success, my fix has only been tested on my system, and under the NixOS specific patch regime. But the substituteInPlace expr. should be functionally equivalent to making that PR's one line change manually and building from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions