HISE Logo Forum
    • Categories
    • Register
    • Login

    How to get correct list of filter modes from Engine.getFilterModeList()

    Scheduled Pinned Locked Moved Scripting
    9 Posts 4 Posters 206 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.
    • S
      swina
      last edited by

      I am quite new about HISE,
      and I am trying to populate a combo items with the list of the Engine.getFilterModeList() that returns an object.
      I was not able to find a way to get the filter modes list as an array of items (or at least the object keys, that should be something like State_mode_name in camel case).
      So I tried to set the combo items manually with an order mapped thru a slider set to the Filter->Mode. I found out that the Modes are 0 thru 17, where the Filter mode (no filter selected) is in position 15.
      But even setting the items manually with the following list (created manually):

      //Combo has processorId = Filter1
      //Combo as parameterId = Mode
      
      reg FILTER_MODES = [
          "Biquad LP",
          "Biquad HP",
          "Low Shelf EQ",
          "High Shelf EQ",
          "Peak EQ",
          "BiQuad LP Rez",
          "SVF LP",
          "SVF HP",
          "Moog LP",
          "1 Pole LP",
          "1 Pole HP",
          "SVF Notch",
          "SVF BP",
          "Allpass",
          "Filter mode",
          "Ladder 4Pole LP",
          "Ring Mod"
      ];
      Combo.set("items",FILTER_MODES.join('\n'));
      

      from the interface the combo selection doesn't set the correct value for the corrispondent filter. Items are correctly listed as the array order. Index order seems to change every time I compile.
      Any idea ?
      Thank you.

      Oli UllmannO 1 Reply Last reply Reply Quote 0
      • Oli UllmannO
        Oli Ullmann @swina
        last edited by

        @swina
        I think the easiest way is to hard code it.
        Here is a snippet:

        HiseSnippet 1199.3oc0W0jaiaCElJwZPsZ6fLEEEX1QjUNEAAVwNINcPQ8+wFichRbZlhtY.MEcLQnIcjnlYLJBPW1yQOIE8BzE8BziPWz8sjRxwJIpJIdPA5nE158yG4Ge7w2ixwSfI99BOfg0oylR.Feh4fYb43FiQTNnaSfwSM6i7kDOXjp5ylh78It.CiUOPqvHeNP3ye9M0QLDGSVnB.NSPwjdzIT4BsNUeIkwZibImRm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V+zuW83jaupvbhygqW83.DaQz8O90m+a0pSmJXHu22H+i31oYkd7ElWunfuO4w4dXaR2SkvGbNsdm4CG99by3McnNX+gCuep4w+OfrmHBjT948QpaxnqPeXvjApOHDSTDkyILecU6Uz8QijKpk0DZ.g6FJ72pmXi1ZYiXi1yMpp8i8DuFG08Ue94iB0n3DO7SMyq9lWkLz91sZAfIpur60X7MGp6.b6kEXokEX4kE3NKKvcWVf6sr.qb+.0e3cs.oXRTNL.z2oU3UiLLZwQprwvzYv+.H8HqtD
        
        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Oli Ullmann
          last edited by

          @Oli-Ullmann Oooo that's nasty.

          I recommend using the method from the docs. - https://docs.hise.audio/scripting/scripting-api/engine/index.html#getfiltermodelist

          HiseSnippet 1174.3oc0W0saaaCElJNpn1aqncnX.6pQ3qTFxbsSyOMnHaIwIdMXKINycECnKnfhhJhKzjdRTswXn2sK186EXuK6IXXuH6MX6PJYK4DiTGWLfVeggN+xOd3geGotwJJKIQEibp8zgCXHmOzs2PoNpcDgKQGrGx4NtGRRzrXblpcGNfjjvBPNNU9ZiBmpKhr+9muZWhfHorBUHzyTbJ6a4845Bsc29a3BQGR.6o79k7d0sOfpjsUBUJfmJtMQCHzyImwNhXbaAWzSHIQHmO20m32jPCCWeE+GE1b0UVaEe+UCVEz3uwlatY3ZsHq8vMnTjys1OfqUw8zDMKAR5tpfg8hTuRls.Oimv8ELiPKTOXkyTiZGwEAcGUbRPHmE6VTppjUptu6g7.9X8Ekr6ZMfKhnbQyYgqCRstAPxoDjVLCR2ysGMlOPWXwfmOv8.IbBFRfylxPIyWzB+dE21JvCotQex4rNwfv3H7VuYykwveK83Z0fymDMtCW.Fag2Ba6UZbFSueXHip8pmapN3blugVEGpBft.PbK79xy3RlIlNSXxaJgj.9+7IyPicDByNX4Kk4FGKYcUB1S3mE0cZ1MF5EwDgmN45XZtrqScHyXSn0WFW238jB1Xqe53hPaUee0tpKLkgQUOXSApGnjffW8wdXpFiEZjv.abMquI2kvPieRwkd0+QY8ktr+l7GqDsIBgObkvybKI2btIygCWJfJKNLUR0bkDeUu7niP2x3WRDorkp8K0vvuG7.L03qu5hLCIXRLCmnIwZt7L7q35HbKqqBEkHvbY.6BXmacF+E3VO1Zz9GOD6kY+K2B2bIqtrkIeoRSXXcDKOIZEFpaVEDpNERtLsuOP3DFq5aUWtgfDGSF1Xb1x62LEocz5Xtepl4MRoIhx8AIO2thmtTFXecsWWqTw5HklcrzyTRpBVvW1TX3TskWZEr3oZ1PwEecA5ksaKcfXcDtROIOwslMdBZVqXIGUxCjb8wCX4xcTh.y8eyyWkUAk2Ka3WxQH3p1xtb2b1kQsUHdfgbYbWFxtEJOQ.88GrGQSFkLHuvZMfAMUlsjydrWBiGxntp5tGK4bsZf0271TXaOiK8EHGWm+DVzglG1CdnOwpqB7n81Fx4ybGcEu13620JtbCSltBgJPkqBRED8j76lIe4FfCyIHUMDmxDtdX45vMfzu40R5OqP7dtc4ZZzzw3BSAivQz+GXLeT4G4lMfn.fK514Gl24hMm84hUyV+O1ElMLbPjRxoYrCVPT0Mmp3ZdsFDpSL6mSYRZQ05296sOo7wqgboPd4sOAXwJpt+wuV4u1YW9.kfD+1V4uAukx00d7Iti2T32l93EmsCo2.kyL2SaNYd+Auepa9gN1Tre+A22w8j2A.62oRMu5wgDXptgH+nz98fOLfx.fJkLQhgbeAy.qL4lFYCf5wjAVg+E9karkQ1I2XqQFgQDzX0KnYi4L2etsUCfIo8SNpBe6CHiuxjMX5B7F9uv7EFkS0UBbk4MvGNuAt57F3ZyafqOuAtw7F3idyAZ9.rcR0p9Y8vHzgc229lHNN6KIP2nscF8e6ZeODB
          

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

          Oli UllmannO 1 Reply Last reply Reply Quote 1
          • Oli UllmannO
            Oli Ullmann @d.healey
            last edited by

            @d-healey
            ha ha :-) Yes, that's true! But isn't it just as much hard coding in the end, since you also fill the filterNames array manually? It's just a different way... It even seems like more effort to me.

            And I'm having a problem with Engine.getFilterModeList(). I get 18 filter modes:

            filterModeList.Allpass
            filterModeList.HighPass
            filterModeList.HighShelf
            filterModeList.LadderFourPoleHP
            filterModeList.LadderFourPoleLP
            filterModeList.LowPass
            filterModeList.LowShelf
            filterModeList.MoogLP
            filterModeList.OnePoleHighPass
            filterModeList.OnePoleLowPass
            filterModeList.Peak
            filterModeList.ResoLow
            filterModeList.RingMod
            filterModeList.StateVariableBandPass
            filterModeList.StateVariableHP
            filterModeList.StateVariableLP
            filterModeList.StateVariableNotch
            filterModeList.StateVariablePeak

            But the filter only has 16 modes... Or am I misunderstanding something here?

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

              @Oli-Ullmann said in How to get correct list of filter modes from Engine.getFilterModeList():

              But isn't it just as much hard coding in the end,

              Maybe, but it's more readable, you're not just looking at magic numbers. Also if Christoph adds new filter types in the future it won't mess up your list.

              @Oli-Ullmann said in How to get correct list of filter modes from Engine.getFilterModeList():

              And I'm having a problem with Engine.getFilterModeList(). I get 18 filter modes:

              Maybe there are other filter types that can be enabled via pre-processor, or perhaps some were removed, or maybe there is another filter effect that makes use of the extra modes, I'm not sure.

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

              S Oli UllmannO 2 Replies Last reply Reply Quote 1
              • S
                swina @d.healey
                last edited by

                @d-healey
                As a developer I am always trying not to "hardcode" options that are going to probably get an update, but in this case my problem was to associate them to a combo items with a correct index in order to work without any hardcode. If you use a normal knob with any value from 0 to 100 and you set the parameterId to the Filter->Mode it works correctly. There is also the problem that "Filter mode", that means no Filter mode selected has to be added to the combo's items in a position that doesn't make sense (see pict below).

                Filter mode is index 16

                1 Reply Last reply Reply Quote 0
                • Oli UllmannO
                  Oli Ullmann @d.healey
                  last edited by

                  @d-healey
                  Yes, you're right. That's definitely the cleaner way! :-)

                  S 1 Reply Last reply Reply Quote 0
                  • A
                    aaronventure
                    last edited by aaronventure

                    I recommend staying away from the filter module entirely, and instead create your own setup in Scriptnode using svf_eq for lp, hp, ls, hs, peak, svf for allpass, notch and bandpass, and then maybe one pole, ringmod and moog on their own.

                    svf node also has lp and hp, and they're the same ones that are in the Filter module, and they're busted.

                    Link Preview Image
                    HISE Filter Display Inconsistencies

                    I've been running HISE in PluginDoctor for a few days while working in ScriptNode and this afternoon I noticed a rather large discrepancy between the actual ...

                    favicon

                    Forum (forum.hise.audio)

                    There's no point in using non_svf versions of lp, hp, ls, hs, peak as they will introduce some minor noise and produce zipper noises if you automate them.

                    To sum it up: the best filters in HISE at the moment are in the svf_eq node and allpass, notch and bandpass in the svf node in ScriptNode.

                    1 Reply Last reply Reply Quote 1
                    • S
                      swina @Oli Ullmann
                      last edited by

                      @Oli-Ullmann
                      Hi, thnak you !
                      I will start studying and create something with Scriptnode (yes I too noticed that the Filter module create some glitches when change some parameters, and it happens also with the VST compiled used in different DAWS).
                      I didn't try the standalone if it has the same problems.

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

                      5

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.3k

                      Posts