HISE Logo Forum
    • Categories
    • Register
    • Login

    LAF for MatrixPeakMeter

    Scheduled Pinned Locked Moved General Questions
    19 Posts 4 Posters 420 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 @JulesV
      last edited by d.healey

      @JulesV said in LAF for MatrixPeakMeter:

      So the obj.peaks[0] is the left channel, obj.peaks[1] is the right channel, isn't it?

      Correct, so obj.peaks[0] is a number, so your loop is like writing for (x in 10)

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

      JulesVJ 1 Reply Last reply Reply Quote 1
      • JulesVJ
        JulesV @d.healey
        last edited by

        @d-healey Hmm, I knew there was a syntax mistake :) I am new into this.
        Can you please be more clearer or a simple snippet?

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

          @JulesV obj.peaks is an array. obj.peaks[0] will give you the first value in the array. A for in loop will loop over all the values of an array.

          Your original snippet that you posted does this.

          d69d99ee-5958-4818-83f5-7f2d1a236516-image.png

          Everything you need is in that snippet.

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

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

            @d-healey Yes I know, that's because I used for (x in obj.peaks[0]) for the left channel, like previously mentioned.

            And I got no iterable type error.

            I really don't get it.

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

              @JulesV obj.peaks[0] contains just one value. Let's imagine it contains 0.05. A loop requires an array, 0.05 is a number, not an array.

              If you want to do something with the left channel's value you write obj.peaks[0], and for the right channel obj.peaks[1].

              If you want to do something with both channels then you would use obj.peaks and a loop, as in the snippet.

              For example to print both the left and right values to the console you can do this:

              Console.print(obj.peaks[0]); // Left value
              Console.print(obj.peaks[1]); // Right value
              

              Or you could do this

              for (x in obj.peaks)
              {
                  Console.print(x);
              }
              

              Or this

              for (i = 0; i < obj.peaks.length; i++)
              {
                  Console.print(obj.peaks[i]);
              }
              

              etc.

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

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

                @d-healey Yes I already know this. And that's still not the solution or help hahaha :D Thanks anyway.

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

                  @JulesV said in LAF for MatrixPeakMeter:

                  that's still not the solution

                  Do you know how to draw a rectangle in a paint routine?

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

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

                    @d-healey Yes I know.

                    d.healeyD orangeO 2 Replies Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @JulesV
                      last edited by d.healey

                      @JulesV Draw two of them in your look and feel function. Then draw two more on top of them and multiply the height by the obj.peak value.

                      You might need to add an offset to the Y or something funky like that, otherwise the peak meter will look upside down, but we can deal with that later.

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

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

                        @JulesV As David suggested you need to draw with obj.peak value. But you need to use obj.peak value like this:

                        HiseSnippet 1809.3oc0Y8zSabDEeWfMEb9iRpRU5kJMB0CFJX40j.zRqvIXbhUgDKLIzJDJZX2msm3cmwc2w7mDEodreExs9In26sdsm6gdpRUJGpxgJ0uAouY1016BFBklPRrTPd98duY9Mu4Mu2abpFHbfvPQfgYl02uMXXdAqZ6ykMWpIkwMpTxv7RVqRCkP.IB5V62lFFBtFllCeaEf4XiXn+7OKdKpGk6.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tSqgy+pMT0J7M6HE9Q2SvmDTcY8O8noYzqAzWYL9W.5u1kZ
                        

                        develop Branch / XCode 13.1
                        macOS Monterey / M1 Max

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

                          @orange If we use this snippet and disable effects ( Reverb and Delay) we will see abrupt peak meter run down kind of on/off. Looks very ugly.

                          Bollywood Music Producer and Trance Producer.

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

                            @DabDab MatrixPeakMeter apparently does not get obj.peak values by taking the Up & Down DecayTime values in LAF. Because of that it seems like that.

                            @d-healey Is there a way to get Up & Down DecayTime values in the FloatingTile json data in LAF?

                            Or create peak meter with these values in LAF for MatrixPeakMeter FT?

                            develop Branch / XCode 13.1
                            macOS Monterey / M1 Max

                            d.healeyD DabDabD 2 Replies Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @orange
                              last edited by

                              @orange said in LAF for MatrixPeakMeter:

                              Is there a way to get Up & Down DecayTime values in the FloatingTile json data in LAF?

                              Not that I'm aware of. You'd probably need to make a custom meter using a panel + timer.

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

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

                                @orange said in LAF for MatrixPeakMeter:

                                MatrixPeakMeter apparently does not get obj.peak values by taking the Up & Down DecayTime values in LAF.

                                Exactly. 👍

                                Your post https://forum.hise.audio/topic/6615/laf-collection-for-everyone?_=1744108411508
                                and Knob Peak Meter by Steve-mohican is impressive.
                                I didn't find matrix peak meter very useful in anyway.

                                Bollywood Music Producer and Trance Producer.

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

                                28

                                Online

                                1.7k

                                Users

                                11.7k

                                Topics

                                102.3k

                                Posts