HISE Logo Forum
    • Categories
    • Register
    • Login

    Custom table path, look and feel

    Scheduled Pinned Locked Moved Scripting
    4 Posts 2 Posters 225 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.
    • d.healeyD
      d.healey
      last edited by

      I have a table where I'm drawing the path, and it looks like this:

      ac7f75be-6f2b-43fc-804d-3b89dd43f158-image.png

      How can I make it look like this?

      d1e57d2c-118c-4711-8ad3-20a619165dc2-image.png

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

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

        This seems to work...

        var p = Content.createPath();
        p = obj.path;
        
        var index = p.toString().indexOf(parseInt(a[3]) + " z");		
        var s = p.toString().substring(0, index - 1);
        
        p.fromString(s);
        

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

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

          Nah it fails when I invert the table :(

          63f8262a-f8e5-4a44-a959-6a241db63e48-image.png

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

          ulrikU 1 Reply Last reply Reply Quote 1
          • ulrikU
            ulrik @d.healey
            last edited by

            @d-healey try this

            TBLLaf.registerFunction("drawTablePath", function(g, obj)
            {
            	var p = Content.createPath();
            	p.clear();
            	var str = obj.path.toString();
            	var arr = [];
            	
            	if (str.contains("q"))
            	{
            		str = str.substring(0, str.lastIndexOf("l"));
            		var arr = str.split(" ");
            	}
            	
            	else
            	{
            		arr = str.split(" ");
            		for (i = 0; i < 3; i++)
            			arr.pop();
            	}
            	
            	arr[10] = arr[13];
            	
            	str = arr.join(" ");
            	
            	p.fromString(str);
            	g.setColour(Colours.withAlpha(Colours.cadetblue, 1));
            	g.drawPath(p, p.getBounds(1), 1.5);
            });
            

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

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

            47

            Online

            1.7k

            Users

            11.7k

            Topics

            101.8k

            Posts