HISE Logo Forum
    • Categories
    • Register
    • Login

    Legato, the Achillies heel of HISE.

    Scheduled Pinned Locked Moved Feature Requests
    12 Posts 5 Posters 138 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

      OK so Legato is never easy but in HISE its doubly so....lets start with a simplish example and see how HISE starts to breakdown..

      We want some sort of legato:

      The user presses (and holds a note (lets call this A)
      The user then presses a second note(lets call this B)

      so we want to slide between A and B.

      Approach 1. The convoluted approach usually used in HISE is to take the note generated at A's note on, make it artificial, then wait for B, when it arrives we ignore it take the A-note and slide it to B's note value....

      • so the immediate down side of this is if the distance between A and B is more than a few semi-tones the result is not pleasant.. nothing like B's own note sound...

      Approach 2. Of course we can do nearly the opposite, User presses A - we just play it...
      User presses B, we fade out A ,reset B's pitch to A's and then pitchfade it back to B

      So done! finished. Well not quite, in fact not by a long way....

      So A and B are currently Held - and B is sounding... now the user releases B only - so now we want to slide back to A (still being held..)

      So whatever note we have left (in Approach 1 our messed about A, in approach 2 our messed about B) and pitch fade it to A.

      • either of the approaches is less than ideal here - well Approach 1 gets us back to a more natural sounding A (from an un-natural sounding B), Approach 2 leaves us with an un-natural sounding A.

      It only gets more and more cludgey from here..its truly ugly from here where at some point we are repitching some note to some un-natural sounding target

      What a (slightly more) sensible approach would be is:

      User presses A; we play A
      User adds in B: we fade out A , repitch B to A's value and then pitch fade to B
      (this is the same as Approach 2 so far right?)

      User releases B: We fade out B, we generate a new A note, immediately set its pitch to Bs value then pitch fade back to A's value.

      Theres all sorts of cross-fading volume and pitch stuff we can do for the transitions but you get the general idea.

      So why dont we do this?

      Because(God damn it) HISE wont let us pitch fade anything but an artificial note.... and that doesnt get in the way of our idealised solution, right up until we say:

      "generate a new A note" - which we can do in B's note off...BUT BUT BUT: we cannot make our new A note artificial so it will ignore our pitch fade instructions...

      HISE only allows us to make Message objects artificial....unless I've missed some important part of the documentation in my long and painful trawls through it.

      So feature request:

      Either a way to make generated notes artificial or allow any note to respond to addPitchFade

      HISE Development for hire.
      www.channelrobot.com

      DanHD d.healeyD 2 Replies Last reply Reply Quote 1
      • DanHD
        DanH @Lindon
        last edited by

        @Lindon I was just about to weigh in on this! It's becoming essential now.

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

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

          @Lindon I'm pretty sure what you described is what I'm doing in my legato script. I think of an artificial note as being equivalent to one I manually created with playNote.

          It's a complicated script, and I have a more refined version I'm working on, but here's the part where I create the retrigger note - https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/commit/43491f386ab7f74e6e07dbaf30970fb6e0d1138f/modules/Legato.js#L462

          @Lindon said in Legato, the Achillies heel of HISE.:

          we cannot make our new A note artificial

          Notes created with playNote respond to Synth.addPitchFade

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

          LindonL Christoph HartC 2 Replies Last reply Reply Quote 0
          • LindonL
            Lindon @d.healey
            last edited by

            @d-healey said in Legato, the Achillies heel of HISE.:

            It's a complicated script,

            I think thats at least partly my point...

            HISE Development for hire.
            www.channelrobot.com

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @d.healey
              last edited by

              Either a way to make generated notes artificial or allow any note to respond to addPitchFade

              Not sure I understand your novel there correctly, but generated notes are always artificial, so why would you want to make them so?

              HiseSnippet 1242.3oc4X1saaaCEGWJIp.1cqXcqXXWRDrKbFxBr9LNKHHe33zYr5Di3z1cWAqDsMQjI0jnylwvdG2iReC1NTxwVtwKv4ftUrMegg4g7OOGR9imik5lJCYYYxTCypWMIgYX9IV8lHTCaNjxEFsO0v7IVcnYJVJovzISRnYYrHCSy0et1fYkMLx+7tCOgFSEgr4lLLdkjGxdAeDWM2Z2i9Adb7YzH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xKZWW2tnvoHJuwe.el1osts4zNsusy+Q7wHZXp7MgEYE0b5Q4Vf0sH+g2p.OEIzlXajmor7Y4Hnn2aBCWbptiPGrBcwJzCqPerBCvJbWrBafU3dOTgUuE.piVoMZkNnU5hVoGZk9nUFfV4tnU1.sRzLjCZFxAMC4flgbPyPNnYHGzLjCZFxAMC4flgbPyPtnYHWzLjKZFxEMC4hlgbQyPtnYHWzLjKZFxEMC4glg7PyPdnYHOzLjGZFxCMC4glg7PyPdnYHOzLjOZFxGMC4ilg7QyP9nYHezLjOZFxGMC4ilg7QyPAnYn.zLT.ZFJ.MCErBLj9Und7XkbTwaRvvnS2V4uULSyVBJ7P44O.uwexUI9bU
              
              LindonL 1 Reply Last reply Reply Quote 1
              • LindonL
                Lindon @Christoph Hart
                last edited by Lindon

                @Christoph-Hart yes it seems I stand corrected...

                yes my assumption - reading the documentation that playNotes needed to made artificial...somehow- apparently not.

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 0
                • dannytaurusD
                  dannytaurus
                  last edited by

                  The problem with unnatural-sounding notes is when using samplers, correct?

                  If I'm using Wavetable Synth or Waveform Generators the current legato methods will work?

                  Meat Beats: https://meatbeats.com
                  Klippr Video: https://klippr.video

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @dannytaurus
                    last edited by

                    @dannytaurus said in Legato, the Achillies heel of HISE.:

                    The problem with unnatural-sounding notes is when using samplers, correct?

                    yes.

                    HISE Development for hire.
                    www.channelrobot.com

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

                      If I'm using Wavetable Synth or Waveform Generators the current legato methods will work?

                      Yes, that's what the RefreshMipMap parameter in the wavetable synth is for: it will switch the mip map to the nearest root note when applying a pitch fade during note playback so that the harmonic spectrum is not stuck to the wavetable of the start note.

                      The sampler cannot do that because it has no idea of the phase of the sample at any given point.

                      d.healeyD 1 Reply Last reply Reply Quote 1
                      • d.healeyD
                        d.healey @Christoph Hart
                        last edited by

                        @Christoph-Hart said in Legato, the Achillies heel of HISE.:

                        phase of the sample at any given point.

                        oooh is there a way that some kind of analysis of each sample in the map could be done so the sampler is aware of the phase?

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

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @d.healey
                          last edited by

                          @d-healey said in Legato, the Achillies heel of HISE.:

                          @Christoph-Hart said in Legato, the Achillies heel of HISE.:

                          phase of the sample at any given point.

                          oooh is there a way that some kind of analysis of each sample in the map could be done so the sampler is aware of the phase?

                          suddenly very interesting..

                          HISE Development for hire.
                          www.channelrobot.com

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

                            oooh is there a way that some kind of analysis of each sample in the map could be done so the sampler is aware of the phase?

                            yes, theoretically that would somehow be possible (and I started doing this when working on the integrated legato transition engine which picks up the zero crossings to line up the phase between sustain and transition sample), but if the samples are not pitch & phase locked perfectly this falls apart plus there is a significant complexity of making this work with the streaming engine for a very narrow set of use case - if you squash your samples to be perfectly phaselocked, then it's just a minor step to transform them into wavetables and use the "proper" sound generator concept for the job at hand.

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

                            25

                            Online

                            1.8k

                            Users

                            12.1k

                            Topics

                            105.7k

                            Posts