HISE Logo Forum
    • Categories
    • Register
    • Login

    Phaselocking 2025 and other sampler related discussions

    Scheduled Pinned Locked Moved General Questions
    20 Posts 7 Posters 238 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.
    • A
      aaronventure @d.healey
      last edited by

      @d-healey said in Phaselocking 2025 and other sampler related discussions:

      I just wanted to test this. Here is a trumpet C3 crossfade between 3 dynamics, original and phase-aligned. These are hall samples. They both sound pretty good actually thanks to the smoothing of the CC modulator. I think the crossfade sounds a little better on the aligned one but that's subjective. The attack of the aligned one is a little chorusy.

      Both of these sound good. But that crossfade is very slow. How does it sound if you stay at the crossfade instead of driving the controller past it to fully fade in the other layer?

      What about when you do a very fast crossfade? Because that's what'll happen when crossfading to a legato sample, and the room sound will be where it's the most obvious, and you can't remove it.

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

        @aaronventure said in Phaselocking 2025 and other sampler related discussions:

        What about when you do a very fast crossfade?

        original-fast.wav
        aligned-fast.wav

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

        1 Reply Last reply Reply Quote 1
        • SimonS
          Simon @d.healey
          last edited by

          @d-healey Audio embeds already work!

          22d2d59f-e324-43f0-b5f7-e8b4f4b25059-image.png

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

            @Simon Perfect, thanks, I didn't realise!

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

            1 Reply Last reply Reply Quote 0
            • clevername27C
              clevername27 @Christoph Hart
              last edited by

              @Christoph-Hart Are you sure you're solving the right problem?

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • SimonS
                Simon @aaronventure
                last edited by

                @aaronventure Aligning legato samples to the sustains as Christoph is implementing certainly doesn't require bone dry nor pitch-locked samples. It's just like editing a loop, the crossfade happens over a few hundred ms, so the pitch variations don't have time to throw it more than a few degrees out of phase. Even on an ensemble the difference is subtle, but definitely audible.

                As for pitch-squashing / phase-locking of different dynamic levels, you probably have the most experience with that of anyone here, and I agree with your analysis that it's practically useless on anything other than bone dry samples.

                @clevername27 Depends what you mean by the "right" problem! Aligning legatos to sustains is a problem that every Kontakt developer who has ever done legato has encountered, and has no way of solving. Without switching to HISE, of course ;)

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

                  nice nice nice, good discussion guys.

                  This alignment will be most noticeable on solo instruments that are already closer to sine waves than to the chaos of an ensemble

                  Of course. In the end you probably enable this with solo instruments that are reasonable dry while deactivating it with big ensemble patches, but for the "sinesque" stuff it makes a drastic difference (hence my inquiry about phase-locking as this also is most useful for those kind of sounds.

                  Attack and release time, and curve,

                  Currently it's a single time for both the fade into and out of the legato sample, but I can easily make this two separate values. But do you really need to adjust the curve like in a real world scenario? I'm using the same internal technique as the usual Synth.addVolumeFade(), so in that case I would have to define a per-sampler curve for all volume fades.

                  There might also be situations where you want release samples to have yet another setting, so targetSustain.release would change depending on whether you're playing to a new legato sample, or to a release sample.

                  This is a subject for another discussion - the release transition will be handled by the specific release trigger layer that will come with its own set of properties (but these are much more clearer to me).

                  I just got the length of the legato sample from the samplemap, and delayed playback of the target sustain by that amount.

                  Yes that's precisely how it works at the moment and is hardcoded into the engine. It will not account for realtime-pitch modulation through modulators, but the sustain sample will be automatically delayed by the exact sample length of the legato sample.

                  Legato sounds much more natural if you jump very far into the target sustain. I know this is tricky in HISE with the maximum offset being relatively small, I forget the name of the remedy you and David came up with.

                  Yes that makes sense and the idea is an additional API method that can add an additional start offset to the sustain sample to make this work. The max offset is UINT16_MAX which would be 65536, if that isn't enough you can add a multiplier somehow, but I also forgot how to do that. David?

                  I think one of the best advances in conventional sampled legato was made by Cinematic Studio Series where they recorded the slowest legato (gliss/port. is separate) and then use timestretching to shrink it down for higher velocities with some smart editing.

                  Yeah, then we are back in CPU spike-land as my masterly deceitful trick of delaying the sample playback a few milliseconds until the timestretchers are initialised messes up the timing between legato & sustain samples.

                  I would assume that this process can be done offline and render a few versions to be layered across the velocity axis - I don't think that there's a need for more than eg. 5-6 prerendered legato speeds.

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

                    @Christoph-Hart said in Phaselocking 2025 and other sampler related discussions:

                    but I also forgot how to do that. David?

                    Link Preview Image
                    Add start offset multiplier by davidhealey · Pull Request #680 · christophhart/HISE

                    As discussed - https://forum.hise.audio/topic/11921/how-to-get-around-max-start-offset-is-65536

                    favicon

                    GitHub (github.com)

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

                    1 Reply Last reply Reply Quote 0
                    • A
                      aaronventure @Christoph Hart
                      last edited by

                      @Christoph-Hart said in Phaselocking 2025 and other sampler related discussions:

                      I would assume that this process can be done offline and render a few versions to be layered across the velocity axis - I don't think that there's a need for more than eg. 5-6 prerendered legato speeds.

                      Is this something HISE could do? Could you make it less intensive on disk space?

                      Can you somehow precalculate 126 steps of timestretch without it being equal to rendering it out that many times?

                      If the answer is still rendering it to audio, this is one of those times having OPUS support would be very beneficial.

                      1 Reply Last reply Reply Quote 1
                      • SimonS
                        Simon @Christoph Hart
                        last edited by

                        @Christoph-Hart Single time for fade into and fade out of legato sample is fine. Curve has been very important to adjust in the past, but I realize that's always been in the context of typical unaligned legato, where it might play in or out of phase.

                        So, going on the assumption that the phase-align-o-matic does its job, the crossfade should be linear as it is now, and probably doesn't need to be adjustable.

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

                        48

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.2k

                        Posts