Forum
    • Categories
    • Register
    • Login
    1. Home
    2. DanH
    3. Posts
    • Profile
    • Following 1
    • Followers 4
    • Topics 443
    • Posts 3,945
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Matrix modulation connection is broken in exported plugin

      @ustk šŸ˜†

      Done digging — here's the full picture from the HISE source, structured so you
      can relay it to ustk.

      The duplicate MatrixData blocks — fully explained

      There are two independent writers of MatrixData into a preset:

      1. ScriptModulationMatrix (the object from Engine.createModulationMatrix())
        registers itself as a user-preset state manager with the id MatrixData
        (ScriptModulationMatrix.h:231, registration in the constructor at
        ScriptModulationMatrix.cpp:609). On preset save, every registered manager
        appends its own child — UserPresetStateManager::saveUserPresetState()
        (PresetHandler.cpp:2440) does a blind addChild() with no dedup check.
      2. GlobalModulatorContainer::exportAsValueTree()
        (GlobalModulatorContainer.h:613) appends a copy of the matrix tree into the
        module state. So Engine.addModuleStateToUserPreset("Global Modulator
        Container") produces the copy inside the block — that's the
        redundancy ustk already spotted, and he's right that it's harmless: on load,
        module states restore first and the root-level MatrixData restores last
        (UserPresetHandler.cpp:678), overwriting it. He can drop that
        addModuleStateToUserPreset call unless he needs the container's own chain
        state in presets.

      Two root-level blocks means two live ScriptModulationMatrix instances at save
      time. Unlike most Engine.createX calls there's no caching — each call to
      Engine.createModulationMatrix() constructs a fresh object and registers a
      fresh state manager, even for the same container ID. So ustk should search his
      scripts for a second call (a second script processor, an included file, or a
      call inside a function that runs more than once). Restore-side it's mostly
      benign (each manager restores from the first MatrixData child via
      getChildWithName), but it's the smoking gun that two matrix objects are alive
      — and two objects both performing remove-all/re-add restores on the same tree
      is exactly the kind of thing that could leave the runtime side confused.

      Why connections can be "visible but dead"

      The matrix UI draws from the matrixData ValueTree, but the audible part is
      separate: MatrixModulators and slider cable connections watch that tree and
      resolve runtime connections (source pointers into the container's
      voiceStartData/timeVariantData/envelopeData arrays, pushed to targets via
      RuntimeSource::updateTargets()). The tree restoring correctly guarantees the
      lines, not the signal. The signal path goes stale if:

      • the container's child modulators get rebuilt after the matrix restore
        (remember MatrixData restores last, but postPresetLoad, sample preloading →
        prepareToPlay, or anything his preset postCallback does runs after that), or
      • source modulators are bypassed when refreshList() last ran — the data arrays
        only include active modulators (GlobalModulatorContainer.cpp:639), and a
        missing source resolves to a null mod function (getModFunction hits
        jassertfalse; return {nullptr,nullptr}) — connection present, zero modulation.

      This fits his symptoms exactly: new connections work because every edit goes
      through connect() → callSuspended → full rebuild with fresh pointers, and his
      fromBase64(toBase64()) "dirty fix" works for the same reason — it re-fires the
      whole remove/add listener storm after everything else has settled, which is
      effectively a manual re-resolution pass. It's not even that dirty; it's
      re-running the exact same code path HISE itself uses (restoreFromValueTree and
      the base64 round-trip are the same function underneath).

      Practical suggestions for ustk

      1. Grep the project for createModulationMatrix — ensure exactly one call, in
        onInit, stored in one const var. If duplicates persist in fresh saves after
        that, an old instance is being kept alive.
      2. Drop addModuleStateToUserPreset("Global Modulator Container").
      3. Check whether the broken targets' source modulators are bypassed/disabled
        at the moment the preset finishes loading (the active-list trap above).
      4. Note whether broken targets are MatrixModulators in mod chains vs.
        script-slider parameter targets — they use different listener paths
        (MatrixModulator::onMatrixChange vs MatrixCableConnection), which would narrow
        it to one code path for a proper bug report to Christoph.

      Why yours works: Yours creates the matrix exactly once (Interface.js:4), never
      registers the container as module state, and your container sources stay
      active — so you never exercise any of the fragile paths. None of your three
      open PRs touch this, as you said.

      If you want, I can build a minimal repro (one container, one LFO, two matrix
      objects + a bypassed source) to confirm which mechanism kills the connections
      — that would turn this from insight into a fileable HISE issue.

      posted in Bug Reports
      DanHD
      DanH
    • RE: Matrix modulation connection is broken in exported plugin

      @ustk my presets seem to load ok with modulation connections still intact. I didn't know this could be an issue, my fix doesn't look at it specifically.

      posted in Bug Reports
      DanHD
      DanH
    • RE: Matrix modulation connection is broken in exported plugin

      @ustk said in Matrix modulation connection is broken in exported plugin:

      It cost me all my Claude tokens but it's finally fixed!
      https://github.com/christophhart/HISE/pull/965

      Extended to include Hardcoded Synth:

      https://github.com/christophhart/HISE/pull/980

      posted in Bug Reports
      DanHD
      DanH
    • RE: Dsp network wont compile: // <--Changed to more relevant title :)

      @Chazrox https://forum.hise.audio/topic/14184/juce-submodule-psa?_=1780482119841

      posted in Scripting
      DanHD
      DanH
    • RE: z-ordering issue when using drawModulationDragger/drawModulationDragBackground

      @Orvillain Have you tested with zoom factor? Had issues with this...

      posted in Bug Reports
      DanHD
      DanH
    • RE: z-ordering issue when using drawModulationDragger/drawModulationDragBackground

      @Orvillain There should probably be an option for either. There's also the labels to think about as well... It's not a one size fits all solution.

      posted in Bug Reports
      DanHD
      DanH
    • RE: z-ordering issue when using drawModulationDragger/drawModulationDragBackground

      @Orvillain because my draggers (depth knobs) are always visible. All of them. So if I switch panels then the draggers still sit on top of the new panel. Make sense?

      posted in Bug Reports
      DanHD
      DanH
    • RE: z-ordering issue when using drawModulationDragger/drawModulationDragBackground

      @Orvillain any panel that you want to appear at any point, let's say a floating mini preset menu, or a floating tooltip, or a page, the draggers will sit on top of. However mine are persistant, rather than appearing on hover, so that changed the dynamic a lot.

      posted in Bug Reports
      DanHD
      DanH
    • RE: z-ordering issue when using drawModulationDragger/drawModulationDragBackground

      @Orvillain I found the scenario!!

      posted in Bug Reports
      DanHD
      DanH
    • RE: Can't Add Positive Gain in HISE – Am I Missing Something?

      @the-red_1 yes, something broke in a recent commit. If you open the dsp network xml file you will be able to enter the max gain value in there.

      posted in AI discussion
      DanHD
      DanH
    • RE: Plotter Text

      @ustk I've had it in a product for a long while

      posted in General Questions
      DanHD
      DanH
    • Create Matrix Modulator module value Global Cable

      I want to get the value of a Matrix Modulator module into a global cable in order to process some ui stuff without using a timer. Any ideas if this is possible?

      posted in General Questions
      DanHD
      DanH
    • RE: Agentic coding workflows

      @David-Healey I prefer writing script I know how to write in general. Quicker than ai at the moment...

      posted in AI discussion
      DanHD
      DanH
    • RE: Matrix Modulator Smoothing Control

      @ustk The ui control is controlling value, so if it smooths the behaviour of the ui control then bueno šŸ‘

      But if it smooths the modulation then no bueno šŸ‘Ž

      posted in General Questions
      DanHD
      DanH
    • Matrix Modulator Smoothing Control

      Is this smoothing the value control or the modulation values themselves?

      Screenshot 2026-03-06 at 15.50.04.png

      posted in General Questions
      DanHD
      DanH
    • RE: Toggle Oversample container in Scriptnode

      @ustk Sexy, thanks!!!

      posted in General Questions
      DanHD
      DanH
    • Toggle Oversample container in Scriptnode

      I have some effects that can benefit from oversampling in certain situations but want to let the user decide whether the extra cpu overhead is worth it. How can I toggle this? I can't toggle the actual container itself off / on with a parameter...

      posted in General Questions
      DanHD
      DanH
    • RE: Panel paint routine - different corner radius on same panel?

      @David-Healey yep. Maybe I'll see if Claude can add to source code though...

      posted in General Questions
      DanHD
      DanH
    • RE: Panel paint routine - different corner radius on same panel?

      @David-Healey Thanks but I don't see what I'm looking for. Each corner a different radius. 10, 6, 4, 2 or something...

      Probably didn't explain the question very well!

      posted in General Questions
      DanHD
      DanH