HISE Logo Forum
    • Categories
    • Register
    • Login

    Control polyphony number

    Scheduled Pinned Locked Moved General Questions
    switchnumberpolyphonymonomax
    4 Posts 2 Posters 1.2k 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.
    • Dark BoubouD
      Dark Boubou
      last edited by

      Well I'm using the command
      Sampler.setAttribute(Sampler.VoiceLimit, value ? 1 : 128);
      Assigned with a knob that allow to switch in mono or polyphonic mode. (clic= mono, second clic=128 voices)
      The problem I have is that this dosn't change max voices, but the number of voices played at the same time...
      For example 1=note with no stack
      2=note + a second one (stack, +6 dB)
      3=note + a third one (Stack, +9dB)...

      So there's still no limit to polyphony number and the sound gets ultra-limited by the compressor included...
      What's the right command please?
      Thanks!

      D.B.

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        VoiceLimit is the actual amount of voices that the sampler has, and setting this to 1 will kill the last voice without a fade (also changing this value will cause clicks during playback because it needs to reinitialise some internal buffers). Also, the Sampler does not have named attributes but this one is on me :)

        Quick 'n Dirty solution: Use Sampler.setAttribute(6, value ? 1 : 128); until I added the parameter name constants. 6 is VoiceAmount which is rather a "soft limit". You also might want to combine this with a call to Engine.allNotesOff() to make this cleaner.

        1 Reply Last reply Reply Quote 1
        • Dark BoubouD
          Dark Boubou
          last edited by Dark Boubou

          Nice, but a small correction:
          Sampler.setAttribute(6, value ? 2 : 128); the sound gets really mono :)

          Sampler.setAttribute(6, value ? 1 : 128); cuts the sound when you replay a note, so 2= play a note, then a second after cut and restart ;)
          Thanks Christoph :)

          1 Reply Last reply Reply Quote 0
          • Dark BoubouD
            Dark Boubou
            last edited by

            And this one is better :D

            mainSampler.setAttribute(6, value ? 2 : 40); 
            mainSampler.setAttribute(2, value ? 1 : 40);
            

            6: Amount
            2: Soft Limit

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

            22

            Online

            1.7k

            Users

            11.8k

            Topics

            103.2k

            Posts