HISE Logo Forum
    • Categories
    • Register
    • Login

    Getting EQ values out of presets

    Scheduled Pinned Locked Moved General Questions
    2 Posts 2 Posters 135 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.
    • LindonL
      Lindon
      last edited by Lindon

      So I have a 4-voice instrument with a set of presets and the instrument voices each contain a CurveEQ

      I want to : for each voice randomly select a preset and take its values and apply it to the voice

      Easy enough(tedious XML parsing but leaving that aside..) for each interface param/widget..except the EQ:

      So saving the eqs into presets with:

      Engine.addModuleStateToUserPreset("VoiceEQ1");
      

      leaves me with a preset containing this XML:

          <Processor Type="CurveEq" ID="VoiceEQ1" Bypassed="0" NumFilters="5" Band0="4.173913955688477"
                     Band1="63.68705368041992" Band2="1.0" Band3="1.0" Band4="2.0"
                     Band5="-4.173912525177002" Band6="196.5518341064453" Band7="1.0"
                     Band8="1.0" Band9="4.0" Band10="0.0" Band11="1457.363037109375"
                     Band12="1.0" Band13="1.0" Band14="4.0" Band15="8.34782600402832"
                     Band16="4689.4375" Band17="1.0" Band18="1.0" Band19="3.0" Band20="-16.69565200805664"
                     Band21="263.2481689453125" Band22="1.0" Band23="1.0" Band24="4.0"
                     FFTEnabled="1">
      

      Now...how to get this into the EQ in question, as its not base64 encoded...

      Also as an aside - this looks a bit silly - 24 Bands ? when I'm only using 5??

      HISE Development for hire.
      www.channelrobot.com

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Lindon
        last edited by ustk

        @Lindon it is zero based so in fact 25 not 24.
        This means there are 25/5 param per "real" band

        So my guess is that:
        Band 0 is Gain
        Band 1 is Freq
        Band 2 is Q or Enabled
        Band 3 is Q or Enabled
        Band 4 is Type

        They effectively could have been named more appropriately

        So without saying this is what you should do since there might be a better solution for your use case, you have the possibility to parse those bands numbers (modulo 5) and retrieve the values

        Can't help pressing F5 in the forum...

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

        26

        Online

        1.7k

        Users

        11.8k

        Topics

        102.8k

        Posts