HISE Logo Forum
    • Categories
    • Register
    • Login

    Issue creating true monophonic behavior

    Scheduled Pinned Locked Moved Scripting
    33 Posts 5 Posters 2.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.
    • Christoph HartC
      Christoph Hart
      last edited by Christoph Hart

      Yup, the voice limit is a parameter like anything else. I don't notice the 2 voices glitch, but I'll check it. You are using a sampler, right?

      EDIT: Just checked again, and it does it here too. I'll sort it out.

      1 Reply Last reply Reply Quote 1
      • Casey KolbC
        Casey Kolb
        last edited by Casey Kolb

        Functionally it seems to be working fine despite the 2 voices glitch.

        However, setting attribute 6 for the sampler seems to be changing the Voice Amount rather than the Soft Limit. Not sure if this matters, but is there a way to access the Soft Limit from the script?

        HiseSnippet 1241.3oc4X0saaaCElxNpH1stnsnWraFfPvtvAnKvtMIsXCCQwNIEAqIwvJqaX2zwHQaSDIRAJpz5UTf8Drmk8HrGo9FrcHkjEkqWlqW25vluxme424GdNzdff6SRR3BjUiymFSPV2x1aJSNo+DLkgN9.j051CDjDhD0aZLNIgDfrrp+TkTqFqgzed6d8vgXlOojEB8bN0m7LZDUVxcf6WSCCOBGPNmFYn81tG6yY84g7T.I0s6fhw9WhGSNEqTqlMx5FGFPkbgmDKIIHq05wCl5Mg+RVl9OmlPuHjnH5h7.Gkw9HdXfBwpui5OgFFLnHhSPHK6Akwe8r3+91mPCny3WlGtiVfSoEl4CqZWG75thvyx.dqkAu6Z64KnwxRIJrcS6iYRhXDFJAlvJSWTs6TytOGzfI2JBeI4HAPLyh161oyCb1oSmM+xVMa0DJDIRmqvBGObTbHQz04qbz8DaMlH0fTS0diB4aLugP2ht5ueDOkIAyKNbkC3QwbFPzdippk6kVMorPJi3LJk4KoblC31JJpblfG11uvSO.NzvTxlsZ95VMcfOE.aKvv8kRA8hTIDl454rmSWmuvo6Ceh5Dei9TWN.p7W9o2GGFdAzi19O.cYAiQLb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bC
          Casey Kolb
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • Casey KolbC
            Casey Kolb
            last edited by

            Ignore me – the solution was just to set it this way. In my particular case I need to set the VoiceLimit to closer to 5 or 6 to avoid pops and clicks in my plugin, but overall the monophonic functionality is what I'm after so thank you!

            sampler.setAttribute(sampler.VoiceLimit, value ? 1 : 128);
            sampler.setAttribute(sampler.VoiceAmount, value ? 1 : 128);
            
            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              Don't change the voice amount, but only the voice limit:

              
              const var NUM_POLY_VOICES = 128;
              
              const var b = Content.addButton("b", 0, 0);
              
              const var Sampler1 = Synth.getChildSynth("Sampler1");
              
              inline function bc(c, v)
              {
                  Sampler1.setAttribute(Sampler1.VoiceLimit, v ? 2 : NUM_POLY_VOICES );
              }
              
              b.setControlCallback(bc);
              

              If you also change the voice amount, it will reallocate the voices, this might lead to problems when you use it in a realtime context (if you want to switch between monophonic and polyphonic during playback for any reason).

              Also the number 2 isn't a glitch: it tells the sampler at which point to start killing voices, so two means "as soon as two are active, fade out the oldest voice". 1 isn't a valid number here (because it would always kills notes then), that's why it updates it to the minimum amount. It's a bit misleading though :)

              lalalandsynthL Casey KolbC 2 Replies Last reply Reply Quote 1
              • lalalandsynthL
                lalalandsynth @Christoph Hart
                last edited by lalalandsynth

                @Christoph-Hart

                Nice ! This seems to work somewhat for a monophonic sound (bass) although you do need the legato as well (for an analog bass synth emulation) , and for that to work in a predictable way it would need to be able to set the low or high note priority , guess that could be scripted though.

                Is there some other way to achieve monophonic envelope (paraphonic) behaviour for polyphonic sounds, something I have missed ? I played with the monophonic envelopes but never got it to work properly ?

                https://lalalandaudio.com/

                https://lalalandsynth.com/

                https://www.facebook.com/lalalandsynth

                https://www.facebook.com/lalalandsynth

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

                  guess that could be scripted though.

                  you mean if you release the latest note while holding an older note, it should replay the older note? Just slap a Legato with retrigger module in there and you're done :)

                  lalalandsynthL 1 Reply Last reply Reply Quote 0
                  • lalalandsynthL
                    lalalandsynth @Christoph Hart
                    last edited by

                    @Christoph-Hart

                    I am using the legato module but that does not work in a low or high note priority manner.

                    Low note priority should only allow notes lower then the initial note to be played, high note the opposite.
                    This is the way most analog synths work , for most synths its needed and in some instances essential.

                    For example if you have a bass section that is monophonic included in a poly section , like some string synths.
                    Then you can play a chord on the "lower" section of the keyboard )which includes the mono bass) and the bass will only play the "root note/lowest note"

                    Also needed for monophonic leads.

                    https://lalalandaudio.com/

                    https://lalalandsynth.com/

                    https://www.facebook.com/lalalandsynth

                    https://www.facebook.com/lalalandsynth

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

                      Ah I see, yeah, in that case you need to script something, shouldn't be too hard though...

                      lalalandsynthL 1 Reply Last reply Reply Quote 1
                      • lalalandsynthL
                        lalalandsynth @Christoph Hart
                        last edited by lalalandsynth

                        @Christoph-Hart
                        Ok.

                        Is it reasonable to expect an update where you can make paraphonic behaviour ?
                        That is , a poly synth with monophonic envelopes ?

                        I am willing to wait if needed , but would love to know if I am wasting my time preparing all these string and bass synths that need that functionality or if in fact I am just missing how to achieve that ?

                        https://lalalandaudio.com/

                        https://lalalandsynth.com/

                        https://www.facebook.com/lalalandsynth

                        https://www.facebook.com/lalalandsynth

                        Christoph HartC 1 Reply Last reply Reply Quote 1
                        • Casey KolbC
                          Casey Kolb @Christoph Hart
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • Casey KolbC
                            Casey Kolb
                            last edited by

                            @Christoph-Hart said in Issue creating true monophonic behavior:

                            Don't change the voice amount, but only the voice limit:

                            @Christoph-Hart Yup quickly figured this out. Only changing Voice Limit now 😂

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

                              @lalalandsynth said in Issue creating true monophonic behavior:

                              Is it reasonable to expect an update where you can make paraphonic behaviour ?
                              That is , a poly synth with monophonic envelopes ?

                              Actually this is supposed to work already, it's just superfishy, but I'm cleaning it up now.

                              Quick question: in a monophonic envelope, the attack value is ramping from the current value, not from zero if it's retriggered, yes?

                              e27fd39c-8a97-4f13-b425-5985ba0c9c49-image.png

                              So this gap here should not be there (as you can see I had to create a small ramp in order to remove clicks, but the other solution would be to just ramp up from the current value).

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

                                Alright that gap is gone. You can still enable it with HISE_RAMP_RETRIGGER_ENVELOPES_FROM_ZERO if you depend on that behaviour, but it only affects monophonic envelopes which were broken anyway :)

                                I've also redesigned the bipolar frequency modulation for the filter. I didn't bother about any backwards flags as I am not aware that it's used in any live project.

                                I've changed it to pan mode, which has these implications:

                                • all modulators can be switched between bipolar and unipolar and the intensity goes from -100% to 100%
                                • the modulation signals are added instead of multiplied

                                The bipolar freq knob should now respond as expected, but I'm open to suggestions here.

                                With these fixes and the other one with the squared time-variant modulators you should have anything you need in order to use the monophonic envelopes.

                                lalalandsynthL 2 Replies Last reply Reply Quote 2
                                • lalalandsynthL
                                  lalalandsynth @Christoph Hart
                                  last edited by

                                  @Christoph-Hart Excellent !!
                                  Let me test this , will report :)

                                  https://lalalandaudio.com/

                                  https://lalalandsynth.com/

                                  https://www.facebook.com/lalalandsynth

                                  https://www.facebook.com/lalalandsynth

                                  1 Reply Last reply Reply Quote 0
                                  • lalalandsynthL
                                    lalalandsynth
                                    last edited by

                                    This is the classic retrig behaviour although reset to zero is also used in some cases.
                                    Retrig.jpg

                                    https://lalalandaudio.com/

                                    https://lalalandsynth.com/

                                    https://www.facebook.com/lalalandsynth

                                    https://www.facebook.com/lalalandsynth

                                    1 Reply Last reply Reply Quote 1
                                    • lalalandsynthL
                                      lalalandsynth @Christoph Hart
                                      last edited by lalalandsynth

                                      @Christoph-Hart just so I am testing properly, do I still need to put a mono envelope on top of the poly one ? And if so...will that not cause problems? Anyway..will test this

                                      https://lalalandaudio.com/

                                      https://lalalandsynth.com/

                                      https://www.facebook.com/lalalandsynth

                                      https://www.facebook.com/lalalandsynth

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

                                        Yes, you need a poly envelope on top of the monophonic one - you always need at least one polyphonic envelope.

                                        1 Reply Last reply Reply Quote 1
                                        • dejansD
                                          dejans
                                          last edited by

                                          Filter Cutoff modulation with Envelope is not working now, bipolar modulation works though

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

                                            FAIL! How could I miss that :)

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

                                            19

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.4k

                                            Posts