HISE Logo Forum
    • Categories
    • Register
    • Login

    Stepped Frequency Selector

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 317 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.
    • A
      alepan
      last edited by alepan

      Hi all, I'm trying to create a knob to select specific frequencies in steps, something like this:

      //TEST
      const var Filter1 = Synth.getEffect("Filter1");
      const var Low_Freq_Knob = Content.getComponent("Low_Freq_Knob");
      const var a = [20, 30, 60, 100];
      
      inline function onLow_Freq_KnobControl(component, value)
      {
          for (i = 0; i < 4; i++);
          {
              if (Low_Freq_Knob.getValue() == i)
                  Filter1.setAttribute(Filter1.Frequency, a[i]);
          } 
      };
      
      Content.getComponent("Low_Freq_Knob").setControlCallback(onLow_Freq_KnobControl);
      

      Unfortunately, it doesn't work; if I use Console.print(Filter1.Frequency), I get four "1" in a row, instead of the four values specified in the "a" array.

      The Knob paramters are: min=0, max=3, step=1, mid=1
      Any suggestions?
      Thanks a lot

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

        Link Preview Image
        precise button

        hello, I'm looking for a way for a slider to give me an exact value on an eq. for example on an eq I have 4 frequency that I want to retain 20 30 60 and 80 H...

        favicon

        Forum (forum.hise.audio)

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

        A 2 Replies Last reply Reply Quote 1
        • A
          alepan @d.healey
          last edited by

          @d-healey Thanks, I read it immediately

          1 Reply Last reply Reply Quote 0
          • A
            alepan @d.healey
            last edited by

            @d-healey Of course, that solved my problem :) thanks a lot mate!

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

            42

            Online

            1.7k

            Users

            11.7k

            Topics

            101.9k

            Posts