HISE Logo Forum
    • Categories
    • Register
    • Login

    LFO Shape Designer

    Scheduled Pinned Locked Moved General Questions
    28 Posts 2 Posters 1.4k 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.
    • DanHD
      DanH @DanH
      last edited by

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

        @d-healey ok so I have figured out some of the permutations of drawing tables with the array and joining two or more arrays.

        HiseSnippet 1413.3oc2X0sZibCEViSlzX2cKMz8hRgBCAJ3PCFam+ZYorNwwYwz3DScZ1BgvVkYjiEYFoYmQNolxB6aP6iUuoPeD5iPeCZORy3Yz3X630rY2PmKLQ572m9zQ5bTZGvsIgg7.jQ9SF3SPFOxry.lnW8dXJC0bejwJlcZdTCqWr6oMrNY28NrAZuA93vPhCxvXgmKUyH+hH02+7r8vtXlMIcJD5TN0lbH0iJRmscsum55d.1gbB0SS6Mq0zlypyc48AHsfYYjO19J7kjivR0xYhLVpgCUvC5HvBRHxXw83NC5zieCKR+SogzKbIxAUPc.GEM8AbWGIhkyhp2i55zd3RODgLLamRDKDQDOwrE0glLeJg7oJAVoVnyGF4xBuEx.uJ5vqrF7FCjLzfzhQPB1JrCn9hTIR77wlMYBRPWLP65PIRWTt+bIy5bPClnjG9JxAAvfDKJtY4xqasc4xq8zB.yGJrtFGXcBFvXEquyZngWRD04d9bFLn3pQhWMiIGdvwRCTIOR0awc56hAln3pRQYUVHcPmdXeRFaT9MYwcGFp9SvZsoR7QQ4xQyrt.R1MH.O.z+ryfEb4Rpe1p74qacVE3OUiN+b8XwH2nbqlgkpTcq0spDarzV4Tam5unoTJkY7VIgXFiW03.NhokKswNi37M1Y6Q0HchyKTfxboLhU29LaAkyr3LIaH2XC3tEsGtqtNfA29j0J7qExmuPdK3aTxtT.IjHJBTqU72szHb3lHmxDgPplmZ0TLYC.L90vVy3yqjZs5ZRmDC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B0pcinazMRp3.cX+efrRnYF
        

        I'm now wondering how to make the x/y/curve values inside the array to be dynamic. So if I do, for example:

        reg x1 = 0.255;
        const var newShapeArray2 = [[x1, 0, 0.5], [0.375, 1, 0.5], [0.376, 0, 0.5], [0.376, 0, 0.5]]
        
        inline function onshape2Control(component, value)
        {
        
        		local newShape = [];
        		x1 = 0.355;
        		newShape.concat(flatArray, newShapeArray2);
        		
        		tableShape1table.reset();
        		tableShape1table.setTablePointsFromArray(newShape);
        };
        
        Content.getComponent("shape2").setControlCallback(onshape2Control);
        

        ... the array doesn't update the value of x1 - because the value is set on oninit. So can you update / refresh the array before calling it? Or maybe I need to clear it then push it?

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

          @DanH said in LFO Shape Designer:

          So can you update / refresh the array before calling it?

          It's just like any other variable, you can change the value whenever you like

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

          DanHD 1 Reply Last reply Reply Quote 0
          • DanHD
            DanH @d.healey
            last edited by

            @d-healey Ok well in this case I can't figure out a neat way to do it... Any ideas?

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

              @DanH

              Before you concat the array, assign your new x value.

              Something like

              
              local newShape = [];
              x1 = 0.355;
              newShapeArray2[0][0] = x1;
              newShape.concat(flatArray, newShapeArray2);
              

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

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @d.healey
                last edited by

                @d-healey said in LFO Shape Designer:

                newShapeArray2[0][0] = x1;

                what does this line do? Why the [0][0]?

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

                  @DanH You have arrays inside an array. We are accessing the first element of the first array.

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

                  DanHD 1 Reply Last reply Reply Quote 0
                  • DanHD
                    DanH @d.healey
                    last edited by

                    @d-healey Got it, thanks :)

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

                    24

                    Online

                    1.7k

                    Users

                    11.8k

                    Topics

                    103.0k

                    Posts