HISE Logo Forum
    • Categories
    • Register
    • Login

    Is it possible to get the Display Buffer into a Floating Tile?

    Scheduled Pinned Locked Moved Solved General Questions
    19 Posts 7 Posters 813 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 @Dan Korneff
      last edited by

      @Dan-Korneff I imagine the only issue would be that a longer buffer would require more time to create a path, but if it can be noticeable I don't know :man_shrugging:

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 1
      • JulesVJ
        JulesV @Dan Korneff
        last edited by

        @Dan-Korneff @ustk It seems interesting. Can you guys share a basic fast snippet for this please?

        JulesVJ 1 Reply Last reply Reply Quote 0
        • JulesVJ
          JulesV @JulesV
          last edited by

          Bump please

          orangeO 1 Reply Last reply Reply Quote 0
          • orangeO
            orange @JulesV
            last edited by orange

            @JulesV Here is a custom node example. After adding a display buffer to the custom node and compiling it, you need to open this node in HardcodedMasterFX and apply the following method. To get the look I wanted here, I had to keep the buffer length quite high, it's set to 65536 :)

            The drawing process takes place in a timer object.

            Pnlll2.gif

            const var dp = Synth.getDisplayBufferSource("HardcodedMasterFX");
            const var gr = dp.getDisplayBuffer(0);
            
            gr.setRingBufferProperties({
            "BufferLength": 65536,
            "NumChannels": 1
            });
            
            const var Panel1 = Content.getComponent ("Panel1");
            const var a = Panel1.getLocalBounds(0);
            const var Cmpt = Engine.createTimerObject();
            
            Cmpt.setTimerCallback(function()
            {	
            	Panel1.setPaintRoutine(function(g)
            	{
            		g.setColour (this.get("bgColour"));
            		g.fillRect(a);
            		g.setColour(this.get("itemColour"));
            		var p = gr.createPath(a, [0,1,0,-1], 1.0);
            		g.fillPath(p, a);
            	});
            });
            
            Cmpt.startTimer(40);
            
            
            LindonL 1 Reply Last reply Reply Quote 2
            • LindonL
              Lindon @orange
              last edited by

              @orange is there some reason you are declaring the paint routine in the timer and not outside it, then issuing a repaint in the timer?

              HISE Development for hire.
              www.channelrobot.com

              orangeO 1 Reply Last reply Reply Quote 0
              • orangeO
                orange @Lindon
                last edited by orange

                @Lindon Not a specific reason, I just used the time object to refresh the paint.
                If you have a better usage recommendation instead, I'm open to it.

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @orange
                  last edited by Lindon

                  @orange well clearly I havent tried it, but give this a go and see if it works?

                  const var dp = Synth.getDisplayBufferSource("HardcodedMasterFX");
                  const var gr = dp.getDisplayBuffer(0);
                  
                  gr.setRingBufferProperties({
                  "BufferLength": 65536,
                  "NumChannels": 1
                  });
                  
                  reg p;
                  const var Panel1 = Content.getComponent ("Panel1");
                  Panel1.setPaintRoutine(function(g)
                  {
                  	g.setColour (this.get("bgColour"));
                  	g.fillRect(a);
                  	g.setColour(this.get("itemColour"));
                  	p = gr.createPath(a, [0,1,0,-1], 1.0);
                  	g.fillPath(p, a);
                  });
                  
                  
                  
                  const var a = Panel1.getLocalBounds(0);
                  const var Cmpt = Engine.createTimerObject();
                  Cmpt.setTimerCallback(function()
                  {	
                  	Panel1.repaint()
                  });
                  
                  Cmpt.startTimer(40);
                  

                  HISE Development for hire.
                  www.channelrobot.com

                  orangeO 2 Replies Last reply Reply Quote 3
                  • orangeO
                    orange @Lindon
                    last edited by

                    @Lindon That’s better, thanks :)

                    LindonL 1 Reply Last reply Reply Quote 0
                    • orangeO
                      orange @Lindon
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @orange
                        last edited by

                        @orange glad that it worked...

                        HISE Development for hire.
                        www.channelrobot.com

                        JulesVJ 1 Reply Last reply Reply Quote 0
                        • JulesVJ
                          JulesV @Lindon
                          last edited by

                          @Lindon @orange Thank you for your help!

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

                          25

                          Online

                          1.8k

                          Users

                          12.0k

                          Topics

                          104.2k

                          Posts