Forum
    • Categories
    • Register
    • Login

    Matrix modulation connection is broken in exported plugin

    Scheduled Pinned Locked Moved Bug Reports
    54 Posts 7 Posters 3.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustkU
      ustk @David Healey
      last edited by

      @David-Healey yes, always had (custom branches but one folder/repo)
      Also I just re-aligned develop origin onto upstream to be sure (I had some merge commits because of past manual fork syncing) but no changes regarding the issue and the VST3 crash.

      Hise made me an F5 dude, any other app just suffers...

      1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @David Healey
        last edited by

        @David-Healey said in Matrix modulation connection is broken in exported plugin:

        @ustk Why is xcode referencing 8.0.3

        After analysing everything, AI confirmed Hise is built and running on Juce 6, and it says:

        The assertion you hit is most likely thrown by the JUCE-8 plugin's code (in the v8.0.3 message thread), not by HISE's JUCE 6.

        Since I am debugging using pluginval which is built on Juce8, that's 99% the origin of XCode reporting Juce8 message thread

        Hise made me an F5 dude, any other app just suffers...

        Christoph HartC 1 Reply Last reply Reply Quote 1
        • Christoph HartC
          Christoph Hart @ustk
          last edited by

          @ustk yup that's the plugin host telling his version number.

          I tried to load your snippet, but the hardcoded FX is empty (of course, I don't have compiled your network) - is it just the script_fx network in the Script FX that I need to compile?

          This looks remarkably equivalent to my snippet though (which worked).

          ustkU 3 Replies Last reply Reply Quote 0
          • ustkU
            ustk @Christoph Hart
            last edited by ustk

            @Christoph-Hart Yes it an embedded network, very simple, in the scriptFX

            What about your snippet that I can test on my side?
            And are you on windows or mac? I wonder if the difference can lie there... Especially since I have a straight crash with VST3 while AU, at least, can load

            Hise made me an F5 dude, any other app just suffers...

            1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @Christoph Hart
              last edited by

              @Christoph-Hart Any news on this? Could it just be an OS issue? Unfortunately I can't test on windows before next month...

              Hise made me an F5 dude, any other app just suffers...

              1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @Christoph Hart
                last edited by

                @Christoph-Hart Back on this as it is still not resolved...

                The simple snippet from above:

                HiseSnippet 1946.3oc2Y0rbibaDFinfVsZW63s104PpbfGksWqZFpgTRUNXt5OaVdoDsHsbpjCJPy.RhRy.LYFvUhNUtma4UxOB4IHUdDxafciAyOXjHszxUVdKSUEKBz.n+Pit+5FP8hEdzjDQLxZsASinHqmh6OkKGu2XBii5rOx5CwRZhrgciV1MscQ6NMhjjP8QVV09R0Xrd7xnzO++uXWR.g6QK6BgNUv7nulExjk8F09qYAAGR7oCXgFi1scGOAeOQfXBfmZXaTDw6BxH5QD0vVBi9JRxXj0mh8caQItt9dzFCota277s1bys8Z4Z6a2pAsYqgD6la4NzEYsxA9LoHtuj.6Bj0x6J7m1er3RtVAmxRXmGPUMbP8AMq69PQfuZKp5Es2XVfeubCUBBYg6UZ1poMau.2k4yJ5uz78QoBpWNCSCn0RUgWsJvywDd1FvaFPxx.RKqgzyv88hYQxRIJ77DbGtjFOj.mSlPQOVj0Of2S.CfK2HjbA8vXnQwDVuks8KqCe8I+ogS3dRlfWWvORHoGyW+SV6er1iW6etV8qKZ3vYJSolXQP.MdlhUtFw+bSbc9jvyowur9aHASnECD19Uso34aSMOx8z6ZiAJ3c3L4wQT97bDPYlJk8OCUvPkoV+OLy52Of4SiQLvH+H7WyEm6fRAbla++66ew+8KPeam8IRR9x.qHnkHZrjo1.V6SeCDDoOTeLdeZxERQT5XCiDbk9sV8VU5UkwYr1SKZ7Cm2NjHiYWMfDOhJ63qTwgwz+9Yc6hjzqf0dE7gmbv2ftj4KGWLu1+s1iorQiMBq6zFcSmPv8W3OIfHqFSnXNxD.GpUbDUda7DlbpIyx8VfxcEhOC2iI8FOaLtzLvHb38KAFynW9.7ACGR8jk.bY7g+4eg3RV5l1n0xbr.cpIQzMqWECKkSh7uvkArQwzHRLcfnW.Y55Ijvn.5I.DeY8yCDdWzm88zaFkGoQvtpQrt2XBmSCRVDxfUtyFEm2ZB1Y53rJ9fqjw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j5VV3PyW8BgBIWYh7NZViTaSRAcU4vULL2N0B53Ix6MU9sIztL+dBvHC19Wk7WnwB0XePt3fg20pZuq+.9KCDmWPy.gA4U1l5l8GyDWuPd8xAL+me7+b++7iW+ojV9t4McKud3xu285g20GE4423jI4WKhpmogIF+5CONi.E9UIvtcbsKKRDPTENVqrxnB4q1V4fzoz+p8+t82QdCcHDrlkepXkdMcDnRydFPCiD8mx8L8EmCo0KZ+ZgH5.NALB9lKRZAIGObXBUVYYfkcfPmbaO08dME1YDGpCW+hrl8qoSy2.ojppRoRyEa8Wwsb2.9L7yTeuydvWad78S62lGEy4s9UoliSpxQn3HW4R7d36KpQYgi26on7m8UPq8a5WA8AI2ndw0UD+fnvPhWr3LO8ilphpVMsGvHvSug9igB+f10q9OoPWyAjH5LOupK0MlXiEchatnSzcQmXyEchsVzIt0hNwsu8IppSH6V6p3TDpauCzz6VE4VfJ99If8wJvB
                

                mac:

                • AU doesn't work
                • VST3 doesn't even load

                windows:

                • I can't do anything, just click on the hardcoded module gives a straight crash...

                I re-downloaded a clean version of Hise to be sure.

                At this point I am very confused, if I'm the only one reporting this, the issue might be on my end, ok... But how could it be the case if I have a fresh new Hise?

                Even more strange, my main bigger project loads and the exported AU/VST3 are loading as well (just the matrix is not working)

                At least the hacky solution I had here was working:
                https://forum.hise.audio/topic/14670/matrix-modulation-connection-is-broken-in-exported-plugin/12

                Hise made me an F5 dude, any other app just suffers...

                griffinboyG 1 Reply Last reply Reply Quote 0
                • ustkU ustk referenced this topic
                • griffinboyG
                  griffinboy @ustk
                  last edited by

                  @ustk
                  I've had issues with the matrix modulator, and exporting and also some issues that appear in Hise, but I've not finished compiling my report yet. I believe there are a few issues, that I intended to make example projects for and send to Christoph. I know he's busy so I wanted to make it a useful report before I posted anything, but yeah I do know of some issues. I'm not sure if there ones you're experiencing are related to mine, but they might be

                  ustkU 1 Reply Last reply Reply Quote 1
                  • ustkU
                    ustk @griffinboy
                    last edited by

                    @griffinboy Thanks! at least I can see that I am not (entirely) crazy 😸

                    I have solved (or Claude solved I should say) a few issues already but this one is persistent.
                    I will try again tonight with Opus 4.8 since is good for long task. It might make a difference here reducing the risk of hallucination...

                    If ever you can manage to get some time trying this snippet, and add it to your list if not already in, it would add even more usefulness to your report by keeping thing as centralised as possible.

                    Hise made me an F5 dude, any other app just suffers...

                    ustkU 1 Reply Last reply Reply Quote 1
                    • ustkU
                      ustk @ustk
                      last edited by

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

                      Hise made me an F5 dude, any other app just suffers...

                      griffinboyG DanHD 3 Replies Last reply Reply Quote 4
                      • griffinboyG
                        griffinboy @ustk
                        last edited by

                        @ustk Thanks for your hard work!

                        1 Reply Last reply Reply Quote 0
                        • DanHD
                          DanH @ustk
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • DanHD
                            DanH @ustk
                            last edited by

                            @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

                            ustkU 1 Reply Last reply Reply Quote 3
                            • ustkU
                              ustk @DanH
                              last edited by ustk

                              @DanH Does any of your PR fix a broken modulation connection on preset recall?

                              When I save a preset with modulations in the matrix, when it loads, the lines are there in the matrix but the modulators are not effective anymore like if the connection was broken...

                              I can make new connections successfully, previous ones just don't work.

                              Hise made me an F5 dude, any other app just suffers...

                              DanHD 1 Reply Last reply Reply Quote 0
                              • DanHD
                                DanH @ustk
                                last edited by

                                @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.

                                ustkU 1 Reply Last reply Reply Quote 0
                                • ustkU
                                  ustk @DanH
                                  last edited by

                                  @DanH Hmmm... don't know what differs... I found a dirty fix:

                                  ModMatrix.fromBase64(ModMatrix.toBase64());
                                  

                                  to re-applies the matrix on itself in the postCallback so it remakes the connections. Dirty but working in DAW...


                                  I also found out that:

                                  Engine.addModuleStateToUserPreset("Global Modulator Container");
                                  

                                  Was adding a redundancy in the presets so the MatrixData block was appearing twice:

                                    </MPEData>
                                    <MatrixData>
                                      <Connection TargetId="EQ Lo Boost" Mode="1" SourceIndex="0" Intensity="0.8445843446601942"
                                                  AuxIndex="-1.0" AuxIntensity="0.0" Inverted="0"/>
                                      <Connection TargetId="EQ Lo Cut" Mode="1" SourceIndex="0" Intensity="1.0"
                                                  AuxIndex="-1.0" AuxIntensity="0.0" Inverted="0"/>
                                    </MatrixData>
                                    <MatrixData>
                                      <Connection TargetId="EQ Lo Boost" Mode="1" SourceIndex="0" Intensity="0.8445843446601942"
                                                  AuxIndex="-1.0" AuxIntensity="0.0" Inverted="0"/>
                                      <Connection TargetId="EQ Lo Cut" Mode="1" SourceIndex="0" Intensity="1.0"
                                                  AuxIndex="-1.0" AuxIntensity="0.0" Inverted="0"/>
                                    </MatrixData>
                                  </Preset>
                                  

                                  but this doesn't seem to be the cause for the broken connection...

                                  Hise made me an F5 dude, any other app just suffers...

                                  DanHD 1 Reply Last reply Reply Quote 0
                                  • DanHD
                                    DanH @ustk
                                    last edited by

                                    @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.

                                    ustkU 1 Reply Last reply Reply Quote 2
                                    • ustkU
                                      ustk @DanH
                                      last edited by ustk

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

                                      He can drop that
                                      addModuleStateToUserPreset call unless he needs the container's own chain
                                      state in presets.

                                      Yep I need it, so I can't remove it, then 2 MatrixData blocks it is and will be...

                                      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.

                                      Nope, no smoking gun here.

                                      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),

                                      something worth investigating, especially prepareToPlay that has been modified recently to fix another matrix bug...

                                      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.

                                      Always had only one here

                                      1. Drop addModuleStateToUserPreset("Global Modulator Container").

                                      Nope, need it for what it does. And anyway I tried without and it doesn't seem related to the issue.

                                      1. Check whether the broken targets' source modulators are bypassed/disabled
                                        at the moment the preset finishes loading (the active-list trap above).

                                      Nothing's bypassed

                                      1. 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.

                                      Only MatrixModulators in mod chains here, not direct parameter modulation

                                      Hise made me an F5 dude, any other app just suffers...

                                      1 Reply Last reply Reply Quote 2
                                      • First post
                                        Last post

                                      18

                                      Online

                                      2.4k

                                      Users

                                      13.8k

                                      Topics

                                      120.1k

                                      Posts