HISE Logo Forum
    • Categories
    • Register
    • Login

    Making a simple peak meter in HISE

    Scheduled Pinned Locked Moved General Questions
    12 Posts 4 Posters 252 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
      David Kissam
      last edited by

      I want to make a level meter VST3 plugin that reports the "true peak" level of 3 audio channels (left, right, and sidechain), and the average of those 3 peaks (add them together and divide by 3). I want the displayed peak levels to persist indefinitely, and reset to 0 every time playback is started.

      I do not need any controls or graphic components in the plugin's UI -- all I want is a display of those 4 text values.

      Is HISE well-suited to accomplishing this? I am currently trying to understand how to do this with JUCE, but I have close to zero programming experience. C++ seems to have an expansive syntax, some of which is difficult for me to grasp. Thus, I am wondering if HISE might offer an easier way to make this very simple plugin.

      d.healeyD clevername27C 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @David Kissam
        last edited by

        @David-Kissam There is a built in peak meter floating tile component, you can modify it with look and feel to just show text values.

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

        D 1 Reply Last reply Reply Quote 1
        • D
          David Kissam @d.healey
          last edited by

          @d-healey Thanks for the reply. Would I be able to measure 3 channels with this, and calculate and display the average of those values? Could I make the values persist, and be reset only when playback is started?

          I just want to know that my goal is possible before spending the time it would take to learn how to do it.

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

            @David-Kissam said in Making a simple peak meter in HISE:

            Would I be able to measure 3 channels with this

            Yes

            @David-Kissam said in Making a simple peak meter in HISE:

            and calculate and display the average of those values

            Yes

            @David-Kissam said in Making a simple peak meter in HISE:

            Could I make the values persist, and be reset only when playback is started

            Not sure, but if not you can use other functions in HISE to get the peaks and roll your own solution.

            d52e14b3-997f-4687-9980-7ea5b25118d1-image.png

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

            D 1 Reply Last reply Reply Quote 1
            • D
              David Kissam @d.healey
              last edited by

              @d-healey Thank you; that is helpful. Would you make any recommendation to a novice such as myself on whether to learn HISE or JUCE?

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

                @David-Kissam said in Making a simple peak meter in HISE:

                novice

                By novice do you mean no prior programming experience?

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

                D 1 Reply Last reply Reply Quote 0
                • D
                  David Kissam @d.healey
                  last edited by

                  @d-healey My only experience is writing a script in Lua for Kontakt Creator Tools which can search my filesystem for certain keywords and map the files it find by tokens in the filenames.

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

                    @David-Kissam Learn HISE, if you need to go deeper you can learn C++/JUCE and modify HISE.

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

                    D 1 Reply Last reply Reply Quote 2
                    • clevername27C
                      clevername27 @David Kissam
                      last edited by

                      @David-Kissam I wrote a detailed tutorial on this topic - just search the forum.

                      1 Reply Last reply Reply Quote 1
                      • D
                        David Kissam @d.healey
                        last edited by

                        @d-healey I just noticed that HISE has a filesystem class. Could I use HISE to make a batch-processing tool that would rename files with their peak levels? (I found a thread from 3 years ago where you said you didn't think it was suitable, but perhaps things have changed since then.)

                        d.healeyD ustkU 2 Replies Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @David Kissam
                          last edited by

                          @David-Kissam yeah probably, if you can get that data offline. But ffmpeg or sox would probably be more straightforward.

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

                          1 Reply Last reply Reply Quote 2
                          • ustkU
                            ustk @David Kissam
                            last edited by ustk

                            @David-Kissam You can get the peak level of any buffer with Buffer.getMagnitude()

                            As for the batch processing, I'd say load your audio files into an AudioLoopPlayer (or something else maybe?), then Engine.renderAudio(). From here you can (I haven't tested in this configuration) get the magnitude of the buffer and use it as part of the file name.

                            And for realtime audio recording I have published a snippet recently (but the search in the forum is somewhat painful currently). There's also a recorder example in the Snippet Browser

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

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

                            34

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            102.3k

                            Posts