HISE Logo Forum
    • Categories
    • Register
    • Login

    Help "drawAnalyserBackground", "drawAnalyserPath" "drawAnalyserGrid",

    Scheduled Pinned Locked Moved Solved General Questions
    27 Posts 4 Posters 1.1k 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 @DabDab
      last edited by

      @DabDab Have you assigned your locLaf function to your analyser?

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

      DabDabD 1 Reply Last reply Reply Quote 0
      • DabDabD
        DabDab @d.healey
        last edited by DabDab

        @d-healey Yup... All laf functions are not being shown. I was looking for MatrixPeakmeter via trace(obj). Trace function doesn't show anything.

        Bollywood Music Producer and Trance Producer.

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

          @DabDab

          I was looking for MatrixPeakmeter via trace(obj). Trace function doesn't show anything.

          What do you mean?

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

          DabDabD 1 Reply Last reply Reply Quote 0
          • DabDabD
            DabDab @d.healey
            last edited by

            @d-healey

            const var PeakMtr = Content.getComponent("PeakMtr");
            
            
            const var Laf = Content.createLocalLookAndFeel();
            
            Laf.registerFunction("drawMatrixPeakMeter", function(g, obj)
            {
            	 Console.print(trace(obj));
            	 
            	 g.setColour(Colours.pink);
            	 g.drawRect(obj.area, 2.0);
            	 g.setColour(Colours.greenyellow);
            	 
            	 g.fillPath(obj.peaks, obj.area);
            });
            
            PeakMtr.setLocalLookAndFeel(Laf);
            

            I can't not figure out how to customize Peaks and max peaks.

            Bollywood Music Producer and Trance Producer.

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

              @DabDab obj.peaks is not a path

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

              DabDabD 1 Reply Last reply Reply Quote 0
              • DabDabD
                DabDab @d.healey
                last edited by

                @d-healey So How can I make custom LAF Matrix peak meter with gradient.

                Bollywood Music Producer and Trance Producer.

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

                  @DabDab Without doing it for you there's not much more to say. This is the function I'm using, perhaps it will give you some guidance.

                      laf.registerFunction("drawMatrixPeakMeter", function(g, obj)
                      {
                      	var a = obj.area;
                      	var value = 0;
                  		var numActive = 0;
                  		
                          for (x in obj.peaks)
                          {
                  			if (x > 0)
                  			{
                  				numActive++;
                  				value += x;
                  			}	        
                          }
                  
                          value = value / numActive;
                  
                      	g.setColour(obj.itemColour);
                      	g.fillRoundedRectangle(a, 8);
                  
                      	g.setColour(Colours.withAlpha(obj.itemColour2, 0.2 + value));
                  
                  		if (a[2] > a[3])
                  		{
                  			a[2] *= value;
                  		}
                      	else
                      	{
                  	    	a[1] = a[1] + a[3] - a[3] * value;
                  	    	a[3] *= value;
                      	}
                      	
                      	g.fillRoundedRectangle(a, 8);
                      });
                  

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

                  DabDabD 1 Reply Last reply Reply Quote 1
                  • DabDabD
                    DabDab @d.healey
                    last edited by

                    @d-healey Oho... really complicated scripts. It was beyond my knowledge database.. 😛

                    Thank you so much.

                    Bollywood Music Producer and Trance Producer.

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

                      @DabDab It's not complicated, it just looks it at first. This handles vertical and horizontal meters in my project.

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

                      DabDabD 1 Reply Last reply Reply Quote 0
                      • DabDabD
                        DabDab @d.healey
                        last edited by

                        @d-healey Yes.. I am going through the code.

                        Bollywood Music Producer and Trance Producer.

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

                          @DabDab said in Help "drawAnalyserBackground", "drawAnalyserPath" "drawAnalyserGrid",:

                          @d-healey Yes.. I am going through the code.

                          My code is also to draw a single bar with the average of all channels. That's what this part does.

                          for (x in obj.peaks)
                          {
                              if (x > 0)
                              {
                                  numActive++;
                          	value += x;
                              }	        
                          }
                          

                          You don't need that if you want to display each channel individually or if you have a mono signal.

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

                          DabDabD 1 Reply Last reply Reply Quote 0
                          • DabDabD
                            DabDab @d.healey
                            last edited by

                            @d-healey Ok.. got it. (y)

                            Bollywood Music Producer and Trance Producer.

                            1 Reply Last reply Reply Quote 0
                            • DabDabD DabDab marked this topic as a question on
                            • DabDabD DabDab has marked this topic as solved on
                            • clevername27C
                              clevername27 @DabDab
                              last edited by clevername27

                              @DabDab I have done so - a highly detailed LAF documentation and tutorial. look in the repository…wherever they put it. It's where all the contributions go…I just don't remember off the top of my head.

                              DabDabD 1 Reply Last reply Reply Quote 0
                              • DabDabD
                                DabDab @clevername27
                                last edited by

                                @clevername27 Can you please put the url here ?

                                Bollywood Music Producer and Trance Producer.

                                1 Reply Last reply Reply Quote 0
                                • clevername27C
                                  clevername27 @d.healey
                                  last edited by

                                  @d-healey Just to add the David's comments, depending on what you need, it can be simply to add LAF parameters by modifying HISE's C++ code. For example, I posted a while back about adding the component name to LAFs for specific widgets.

                                  1 Reply Last reply Reply Quote 0
                                  • clevername27C
                                    clevername27 @DabDab
                                    last edited by clevername27

                                    @DabDab I have written and posted Peak Meter LAF documentation, and a tutorial, this week on the forum.

                                    DabDabD 1 Reply Last reply Reply Quote 1
                                    • DabDabD
                                      DabDab @clevername27
                                      last edited by

                                      @clevername27 Ok.. Sure.. (y)

                                      Bollywood Music Producer and Trance Producer.

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        aaronventure @DabDab
                                        last edited by

                                        @DabDab can these be used to do the work on the goniometer?

                                        I'd like the dots to remain on screen and fade out over a few dozen milliseconds, so that it looks like they're leaving a trail.

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

                                          @aaronventure No I don't think we have any control from the scripting API (except usual properties) over the appearance of this component.

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

                                          A 1 Reply Last reply Reply Quote 1
                                          • A
                                            aaronventure @d.healey
                                            last edited by

                                            @d-healey Oh man, I already have like 3 requests open. :face_with_tears_of_joy:

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

                                            50

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.1k

                                            Posts