HISE Logo Forum
    • Categories
    • Register
    • Login

    Polyshape FX mode. How to ?

    Scheduled Pinned Locked Moved Bug Reports
    8 Posts 3 Posters 863 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

      try to control the polyshape mode (combobox, slider, etc....)

      but seems that sometimes i have "function" instead of a mode.

      how to fix it ?

      Thanks.

      Excuse me i'm French.

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

        for now i did that:

        Linear
        Atan
        ...
        Sin
        AsinH
        ...
        ...
        ...
        TanCos
        Chebichev1
        Chebichev2
        Chebichev3
        

        but is it possible to just have the modes without adding the "..." ?
        ...

        Excuse me i'm French.

        1 Reply Last reply Reply Quote 0
        • bendursoB
          bendurso
          last edited by

          Bump. I discovered the same error. How can these items be hidden in the combobox?

          bendursoB 1 Reply Last reply Reply Quote 0
          • bendursoB
            bendurso @bendurso
            last edited by

            @bendurso Perhaps it is possible to hide unused items ?

            Or alternatively set the index of each item (1, 2, 4, 5, 9, 10, 11, 12)?

            Anyone?

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @bendurso
              last edited by

              @bendurso Have an array with the indexes you want to use, then reference that from the combobox callback, using the combobox's value as the array index.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              bendursoB 1 Reply Last reply Reply Quote 1
              • bendursoB
                bendurso @d.healey
                last edited by

                @d-healey Thanks, how do I link the index with the items in the combobox callback?

                const var cmbPolyShape2 = Content.getComponent("cmbPolyShape2");
                const var Polyshape2 = Synth.getEffect("Polyshape 2");
                
                const var ComboIndex = [0, 1, 3, 4, 8, 9, 10, 11];
                const var ComboItems = ["Linear", "Atan", "Sin", "AsinH", "TanCos", "Chebichev1", "Chebichev2", "Chebichev3"];
                
                cmbPolyShape2.set("items", ComboItems.join("\n"));
                
                inline function oncmbPolyShape2Control(component, value)
                {
                        Polyshape2.setAttribute("Mode", value);
                    }
                };
                
                Content.getComponent("cmbPolyShape2").setControlCallback(oncmbPolyShape2Control);
                
                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @bendurso
                  last edited by d.healey

                  @bendurso

                  inline function oncmbPolyShape2Control(component, value)
                  {
                      if (value > 0)
                          Polyshape2.setAttribute("Mode", ComboItems[ComboIndex[value]]);
                  }
                  

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  bendursoB 1 Reply Last reply Reply Quote 0
                  • bendursoB
                    bendurso @d.healey
                    last edited by

                    @d-healey Hmm, it didn't work. However, I just realized that I only needed to trigger the ComboIndex, and it worked (as you mentioned initially). Thank you :)

                    inline function oncmbPolyShape2Control(component, value)
                    {
                            Polyshape2.setAttribute(Polyshape2.Mode, ComboIndex[value - 1]);
                    }
                    
                    1 Reply Last reply Reply Quote 2
                    • First post
                      Last post

                    12

                    Online

                    1.7k

                    Users

                    11.8k

                    Topics

                    102.3k

                    Posts