HISE Logo Forum
    • Categories
    • Register
    • Login

    Filter Parameters Custom Callback

    Scheduled Pinned Locked Moved Scripting
    7 Posts 3 Posters 150 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.
    • MorphoiceM
      Morphoice
      last edited by

      This might be a rudementary question, but even with about an hour googling I cannot find any examples or documentary to answer it

      How do I set the Filter's parameters via script?

      
      const var VCF1LowPass = Synth.getAllEffects("VCF1 LowPass");
      
      // VCF1 LowPass Cutoff
      inline function onVCF1LowPassCutoffSliderControl(component, value)
      {
        VCF1LowPass.setAttribute('Frequency',value);
        
        
      }
      

      this doesn't work as there is no setAttribute function, but neither is there a "frequency" one ...

      https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

        @Morphoice said in Filter Parameters Custom Callback:

        const var VCF1LowPass = Synth.getAllEffects("VCF1 LowPass");

        getAllEffects is used for getting multiple effects that contain the same text in their ID, and it returns an array. You need to use getEffect

        When you're setting an attribute you need to start with the module . followed by the attribute name, something like - VCF1LowPass.setAttribute(VCF1LowPass.Frequency, value);

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

        MorphoiceM 1 Reply Last reply Reply Quote 0
        • MorphoiceM
          Morphoice @d.healey
          last edited by

          @d-healey superb, that worked, thank you so much!

          https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

          MorphoiceM 1 Reply Last reply Reply Quote 0
          • MorphoiceM
            Morphoice @Morphoice
            last edited by

            Screenshot 2024-10-15 at 18.11.36.jpg the resonance seems to throw a weird error though. what am I missing?

            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

            orangeO d.healeyD 2 Replies Last reply Reply Quote 0
            • orangeO
              orange @Morphoice
              last edited by

              @Morphoice Are you sure that the Resonance attribute name is correct?
              Is this scriptnode?

              develop Branch / XCode 13.1
              macOS Monterey / M1 Max

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

                @Morphoice When you see a message with undefined parameter 0 it means the parameter you are passing to the function is undefined.

                0 means it's the first parameter, 1 would be the second parameter, 2 the third, etc.

                So in your case VCF1LowPass.Resonance doesn't exist.

                To get a list of all the parameters for a particular module, follow the instructions in the post from earlier today - https://forum.hise.audio/topic/10742/module-browser-gone

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

                MorphoiceM 1 Reply Last reply Reply Quote 0
                • MorphoiceM
                  Morphoice @d.healey
                  last edited by

                  @d-healey now I feel stupid. It's Q.

                  https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                  30

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  102.3k

                  Posts