HISE Logo Forum
    • Categories
    • Register
    • Login

    Output Meters Function problem

    Scheduled Pinned Locked Moved Unsolved Scripting
    setvaluefuncmeteroutput meter
    6 Posts 5 Posters 379 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.
    • J
      jantrafasmusic
      last edited by

      Hello, I'm having trouble with my Output Meters code.
      I am using sliders named "LeftMeter" and "RightMeter" and all I get after writing this code is "Unknown Function 'setValue'"

      How can I make it work?

      //meters//

      const var LeftMeter = Content.getComponent("LeftMeter");
      const var RightMeter = Content.getComponent("RightMeter");

      reg timer = Engine.createTimerObject();
      timer.setTimerCallback(function()

      {
      leftMeter.setValue(Engine.getMasterPeakLevel(0));
      rightMeter.setValue(Engine.getMasterPeakLevel(1));
      });

      timer.startTimer(30);

      clevername27C LindonL Dan KorneffD 3 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Use the built in peak meter floating tile

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

        1 Reply Last reply Reply Quote 3
        • clevername27C
          clevername27 @jantrafasmusic
          last edited by

          @jantrafasmusic Also, you may want to check out my peak meter tutorial, which includes all the code for complete peak meter.

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

            @jantrafasmusic - as a more general pointer to working out this sort of thing try doing this when its not working:

            const var LeftMeter = Content.getComponent("LeftMeter");
            const var RightMeter = Content.getComponent("RightMeter");
            
            reg timer = Engine.createTimerObject();
            timer.setTimerCallback(function()
            
            {
            // do this to debug your code...
            Console.print(Engine.getMasterPeakLevel(0));
            leftMeter.setValue(Engine.getMasterPeakLevel(0));
            rightMeter.setValue(Engine.getMasterPeakLevel(1));
            });
            
            timer.startTimer(30);
            

            and then when you see the values being returned ask your self...."can I actually apply that to my slider?"

            HISE Development for hire.
            www.channelrobot.com

            1 Reply Last reply Reply Quote 1
            • Dan KorneffD
              Dan Korneff @jantrafasmusic
              last edited by

              @jantrafasmusic Also, you've defined your variables as LeftMeter and RightMeter, but your're trying to setValue to leftMeter and rightMeter.

              Dan Korneff - Producer / Mixer / Audio Nerd

              J 1 Reply Last reply Reply Quote 2
              • J
                jantrafasmusic @Dan Korneff
                last edited by

                @Dan-Korneff that was it, thank you lots

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

                48

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts