HISE Logo Forum
    • Categories
    • Register
    • Login

    Convertings problems

    Scheduled Pinned Locked Moved Scripting
    4 Posts 2 Posters 42 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.
    • H
      hyperphonias
      last edited by

      Hello, im facing some convertion problems while trying to convert some dB from my band in parametriq EQ. Sometimes it works sometimes it glitches.

      here's the chunk of the code:
      var gainValue = Math.round(band.gain * 100) / 100;

          var band = bandValues[obj.index];
          var freqText = Math.round(band.freq) + " Hz";
          var gainValue = Math.round(band.gain * 100) / 100; 
          var gainText = (gainValue >= 0 ? "+" : "") + gainValue + " dB";
          var qValue = Math.round(band.q * 10) / 10; 
          var qText = "Q " + qValue;
          var typeText = typeNames[Math.max(0, Math.min(4, Math.round(band.type)))];
      

      39aff3f5-c5e2-47af-bd05-ecd27d3a1349-image.png
      8d294410-9c5b-417e-888f-cf865a24e78e-image.png

      ChazroxC 1 Reply Last reply Reply Quote 0
      • ChazroxC
        Chazrox @hyperphonias
        last edited by Chazrox

        @hyperphonias

        I think you want:

        if (value)
        {
            yourEqName.setValue(Engine.doubleToString(value, 1));
        }
        
        // In your 'gain' button control callback
        
        H 1 Reply Last reply Reply Quote 1
        • H
          hyperphonias @Chazrox
          last edited by

          @Chazrox Thank you so much lol

          ChazroxC 1 Reply Last reply Reply Quote 0
          • ChazroxC
            Chazrox @hyperphonias
            last edited by

            @hyperphonias np! 🙏 Have a great day!

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

            35

            Online

            2.0k

            Users

            12.8k

            Topics

            110.6k

            Posts