HISE Logo Forum
    • Categories
    • Register
    • Login

    HISE crash when try to control the CarrierIndex

    Scheduled Pinned Locked Moved Bug Reports
    4 Posts 2 Posters 585 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.
    • staiffS
      staiff
      last edited by

      hello !
      seems that i try to control the FM function (and the Carrier/modulator).

      BUT:

      when trying to control the CarrierIndex (combobox, direct ID, controlcallback, etc. ...): HISE crash !!!

      no problem with EnableFM and ModulatorIndex. only the carrier.

      Why ?

      Excuse me i'm French.

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

        That was easy:

        Link Preview Image
        - fix crash when setting carrier index 0 · christophhart/HISE@0fa9ecc

        The open source framework for sample based instruments - - fix crash when setting carrier index 0 · christophhart/HISE@0fa9ecc

        favicon

        GitHub (github.com)

        1 Reply Last reply Reply Quote 0
        • staiffS
          staiff
          last edited by

          yep.
          not sure the best way but i did this (and worked):

          const var Group = Synth.getChildSynth("Group");
          inline function onButton3Control(component, value)
          {
             if(value)
             {
             Group.setAttribute(Group.EnableFM, value);
             Group.setAttribute(Group.CarrierIndex, 1);
          }
             else
             {Group.setAttribute(Group.EnableFM, value);
             Group.setAttribute(Group.CarrierIndex, -1);
          }
          };
          Content.getComponent("Button3").setControlCallback(onButton3Control); 
          

          Excuse me i'm French.

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

            No need to hack around on the scripting level, I provided a fix for this. Just ignore the value if it's zero, it won't cause any harm anymore.

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

            53

            Online

            1.7k

            Users

            11.7k

            Topics

            101.8k

            Posts