HISE Logo Forum
    • Categories
    • Register
    • Login

    Plotter visual questions about script

    Scheduled Pinned Locked Moved Scripting
    9 Posts 2 Posters 162 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.
    • T
      tiesvdam
      last edited by

      I created a script for a custom plotter. I have two questions.

      I intentionally set the knob for the amount to a low maximum because I don’t want the LFO to have too much effect. However, this results in the plotter not being clearly visible. Is there a way to make the plotter react more strongly in terms of visual representation?

      And my other question is how to remove the text and centerline from my plotter using a script?

      //vintage plotter LAF;
      const plotter = Content.addFloatingTile("plotter", 0, 0);
      
      const var LFO1 = Synth.getModulator("RC20");
      
      const var Laf = Content.createLocalLookAndFeel();
      
      laf.registerFunction("drawAnalyserBackground", function(g, obj)
      {
      	 //Console.print(trace(obj));
      	 g.setGradientFill([Colours.cadetblue, 0, 0, Colours.orange, obj.area[2]*0.5, 100]);
      	 g.fillRoundedRectangle(obj.area, 4);
      });
      
      
      laf.registerFunction("drawAnalyserPath", function(g, obj)
      {
      	 //Console.print(trace(obj));
      	 g.setColour(Colours.white);
      	 g.setGradientFill([Colours.withAlpha(Colours.orangered, 0.5), 0, 0, Colours.withAlpha(Colours.red, 0.5), obj.area[2]*0.5, 100]);
      	 g.fillPath(obj.path, obj.area);
      	 
      	 g.setColour(Colours.white);
      	 g.drawPath(obj.path, obj.area, 1);
      });
      
      plotter.setLocalLookAndFeel(laf);```
      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @tiesvdam
        last edited by

        @tiesvdam said in Plotter visual questions about script:

        I created a script for a custom plotter. I have two questions.

        I intentionally set the knob for the amount to a low maximum because I don’t want the LFO to have too much effect. However, this results in the plotter not being clearly visible. Is there a way to make the plotter react more strongly in terms of visual representation?

        And my other question is how to remove the text and centerline from my plotter using a script?

        //vintage plotter LAF;
        const plotter = Content.addFloatingTile("plotter", 0, 0);
        
        const var LFO1 = Synth.getModulator("RC20");
        
        const var Laf = Content.createLocalLookAndFeel();
        
        laf.registerFunction("drawAnalyserBackground", function(g, obj)
        {
        	 //Console.print(trace(obj));
        	 g.setGradientFill([Colours.cadetblue, 0, 0, Colours.orange, obj.area[2]*0.5, 100]);
        	 g.fillRoundedRectangle(obj.area, 4);
        });
        
        
        laf.registerFunction("drawAnalyserPath", function(g, obj)
        {
        	 //Console.print(trace(obj));
        	 g.setColour(Colours.white);
        	 g.setGradientFill([Colours.withAlpha(Colours.orangered, 0.5), 0, 0, Colours.withAlpha(Colours.red, 0.5), obj.area[2]*0.5, 100]);
        	 g.fillPath(obj.path, obj.area);
        	 
        	 g.setColour(Colours.white);
        	 g.drawPath(obj.path, obj.area, 1);
        });
        
        plotter.setLocalLookAndFeel(laf);```
        

        try scaling obj.area

        HISE Development for hire.
        www.channelrobot.com

        T 1 Reply Last reply Reply Quote 0
        • T
          tiesvdam @Lindon
          last edited by

          @Lindon Thank you for the quick response. I just meant the vibration is not clearly visible. See example:

          Scherm­afbeelding 2025-01-23 om 16.33.51.png

          I know this is because the LFO is set to a low value. However, I hope there’s a way to make this larger with scripting, for example, showing -1st instead of -12.

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

            @tiesvdam as I say scale your output

            HISE Development for hire.
            www.channelrobot.com

            T 2 Replies Last reply Reply Quote 0
            • T
              tiesvdam @Lindon
              last edited by

              @Lindon Oh sorry i looked at the wrong area! Thanks!

              1 Reply Last reply Reply Quote 0
              • T
                tiesvdam @Lindon
                last edited by

                @Lindon Again thanks for you tips but:

                This makes it thicker, but the line doesn’t respond more intensely to the LFO, so it doesn’t go further down. What you mean isn’t exactly what I meant. Do you know a solution for this?

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

                  @tiesvdam look at the contents of obj.area - its an array[x,y,w,h] try using [x,y,w,h*2] to get a taller area to draw your path into....

                  so like this:

                           var a = obj.area;
                           g.setColour(Colours.white);
                  	 g.drawPath(obj.path, [a[0],a[1],a[2],a[3]*2], 1);
                  

                  HISE Development for hire.
                  www.channelrobot.com

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    tiesvdam @Lindon
                    last edited by

                    @Lindon

                    I always struggle with this, thank you for your patience, I managed to get it done! Do you also know how I can remove the center line and the 12.00 & -12.00 text?

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      tiesvdam @tiesvdam
                      last edited by

                      @tiesvdam fixed it already thanks!

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

                      17

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.7k

                      Posts