Forum
    • Categories
    • Register
    • Login

    linking slider to a simplegain, the other way around.

    Scheduled Pinned Locked Moved Scripting
    8 Posts 3 Posters 45 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
      Jeetender
      last edited by Jeetender

      i have a filmstrip of a vumeter on a slider, iam just tryin to effect the slider values with the value of the peak on a simplegain, iam using the getAttribute function ,but the console says function now found. i could have used a matrixpeakmeter with laf to run the filmstrip but this is just how i want to do it.

      
      const var SimpleGain = Synth.getEffect("SimpleGain1");
      const var vumt = Content.getComponent("vumt");
      
      const var VUTimer = Engine.createTimerObject();
      VUTimer.setTimerCallback(function()
      {
          var peak = SimpleGain.getAttribute(SimpleGain.Peaks);
          vumt.setValue(peak);
      });
      VUTimer.startTimer(30);
      
      ulrikU David HealeyD 2 Replies Last reply Reply Quote 0
      • ulrikU
        ulrik @Jeetender
        last edited by

        @Jeetender I don't think the SimpleGain has an attribute named Peaks

        SimpleGain.getAttribute(SimpleGain.Peaks)
        
        //    try
        SimpleGain.getAttribute(SimpleGain.Gain)
        
        

        Hise Develop branch
        MacOs 15.6.1, Xcode 16.2
        http://musikboden.se

        1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @Jeetender
          last edited by

          @Jeetender Use a peak meter floating tile and look and feel.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          J 1 Reply Last reply Reply Quote 0
          • J
            Jeetender @David Healey
            last edited by

            @David-Healey i tried it, also took reference from a snippet, but the filmstrip is flickering ...

            @ulrik its not reading .gain too..

            ulrikU 1 Reply Last reply Reply Quote 0
            • ulrikU
              ulrik @Jeetender
              last edited by

              @Jeetender SimpleGain.Gain, not SimpleGain.gain, it should have a uppercase G

              Hise Develop branch
              MacOs 15.6.1, Xcode 16.2
              http://musikboden.se

              J 2 Replies Last reply Reply Quote 0
              • J
                Jeetender @ulrik
                last edited by

                onst var SimpleGain = Synth.getEffect("SimpleGain1");
                const var vumt = Content.getComponent("vumt");
                
                const var VUTimer = Engine.createTimerObject();
                VUTimer.setTimerCallback(function()
                {
                    var peak = SimpleGain.getAttribute(SimpleGain.Gain);
                    vumt.setAttribute(vumt.Value, peak);
                    Console.print(peak);
                });
                VUTimer.startTimer(80);
                

                its reading the gain values and printing the gain value on the console as i move the gain knob on teh simplegain module,

                1 Reply Last reply Reply Quote 0
                • J
                  Jeetender @ulrik
                  last edited by Jeetender

                  @ulrik IMG_5324.mov

                  const laf = Content.createLocalLookAndFeel();
                  
                  laf.loadImage("{PROJECT_FOLDER}vumeter.png", "VUMeter");
                  laf.registerFunction("drawMatrixPeakMeter", function(g, obj)
                     {
                  	var a = obj.area;
                  	var z_value = 0;
                  	var frames = 128;
                  	var zerpnt = 90;
                  	
                  	for (i = 0; i < 2; i++)
                  	{
                  		var z = obj.peaks[i];
                         	if (z <= 1.0)
                  		z_value = Math.round((zerpnt - 1) * z);
                         	else if (z > 1.0 && z <= 1.413)
                  		z_value = Math.round((zerpnt - 1) + (frames - zerpnt) * (z - 1.0)/0.413);
                  	else
                  		z_value = frames - 1;
                  		g.drawImage("VUMeter", [i * 150, 0, 128, a[3]], 0, 80 * z_value);					
                  	}
                  });
                  
                  const var FloatingTile1 = Content.getComponent("FloatingTile4");
                  FloatingTile1.setLocalLookAndFeel(laf);
                  
                  
                  David HealeyD 1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @Jeetender
                    last edited by

                    @Jeetender You can do this without a filmstrip

                    There's a working example here: https://forum.hise.audio/topic/13154/knob-web-studio/66?_=1777296953372

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

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

                    21

                    Online

                    2.3k

                    Users

                    13.6k

                    Topics

                    118.6k

                    Posts