HISE Logo Forum
    • Categories
    • Register
    • Login

    Syntesizer Group Voice Amount Setting (Permanent)

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 349 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.
    • CyberGenC
      CyberGen
      last edited by

      Hi,

      Anyone know of a way to make a syntetizer group remember the voice amount setting? Not talking about the unison voices, just the synth group voices.
      I need them to stay at 2 max. But when a reload the project the voice return to 256.
      Can I script this in? if so how?

      Thank you!

      VorosMusicV 1 Reply Last reply Reply Quote 1
      • VorosMusicV
        VorosMusic @CyberGen
        last edited by

        @RastaChess
        I think that is what you want!

        const var Sampler1 = Synth.getSampler("Sampler1");
        
        //Changes the soft limit (recommended)
        Sampler1.setAttribute(4, 2);
        //Changes the hard limit
        Sampler1.setAttribute(6, 2);
        

        Be sure to set the soft limit to +1 of your wished voices, with 2 for example it will always fade out the 2nd basically beeing 1.

        CyberGenC 1 Reply Last reply Reply Quote 0
        • CyberGenC
          CyberGen @VorosMusic
          last edited by

          @VorosMusic So I'm using WaveTable Synths instead of samplers. The Attribute ID for the number of voices is not listed in the HISE Docs. But I gave it a shot anyways. Just replace Sampler1 with the name of my wavetable synth. It didn't work with 4 or 6. But it did with Attribute #2. So yes!. Thank you so very much for your help.

          Onward!

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

            @RastaChess If you're not able to find the attributes for a module you can set up a loop and log its attributes like this:

            for (i = 0; i < WavetableSynthesiser1.getNumAttributes(); i++)
            	Console.print(WavetableSynthesiser1.getAttributeId(i));
            

            And it will log this:

            Interface: Gain
            Interface: Balance
            Interface: VoiceLimit
            Interface: KillFadeTime
            Interface: HqMode
            Interface: LoadedBankIndex
            

            So here you can see the attribute name "VoiceLimit" and then set it like this:

            WavetableSynthesiser1.setAttribute(WavetableSynthesiser1.VoiceLimit, 2);
            

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

            CyberGenC 1 Reply Last reply Reply Quote 1
            • CyberGenC
              CyberGen @ulrik
              last edited by

              @ulrik SUPER valuable tip. Thank you so much.

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

              39

              Online

              1.7k

              Users

              11.7k

              Topics

              102.3k

              Posts