HISE Logo Forum
    • Categories
    • Register
    • Login

    ScriptNode Pitch Shift Node - Delay Compensation

    Scheduled Pinned Locked Moved General Questions
    6 Posts 3 Posters 61 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.
    • DanHD
      DanH
      last edited by

      If I wanted to use this what would be a method of compensating for the delay it produces?

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

      HISEnbergH 1 Reply Last reply Reply Quote 0
      • HISEnbergH
        HISEnberg @DanH
        last edited by

        @DanH I'm just guessing at a solution here but perhaps use a delay on the dry portion of your signal (equal to the delay time introduced by the pitch shift), then you can use Engine.setLatency to dynamically readjust to your total delay time (in samples). There probably is a better solution for delay compensation however. 🤔

        DanHD 1 Reply Last reply Reply Quote 0
        • DanHD
          DanH @HISEnberg
          last edited by

          @HISEnberg Do you know if that can that be done on the fly? i.e will a DAW be able to then compensate for the sudden shift in latency?

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

          HISEnbergH 1 Reply Last reply Reply Quote 0
          • HISEnbergH
            HISEnberg @DanH
            last edited by HISEnberg

            @DanH When I read the documentation (there’s more about it in the JUCE docs) the answer is yes, but that always raises suspicion for me. I know it definitely does on the recorded output (I usually test this by loading an impulse on the channel with the plugin, then record it to a new channel and compare them on the sample level).

            But how it can be done in real-time playback doesn’t compute for me, since hypothetically there is no way to delay the signal, fill the buffer, then move it back in time by the proper amount of samples. I guess I should test this with just a delay module and check for phase incoherence but this is the furthest I have gotten.

            That being said, if your input/dry signal is delayed by the same amount of samples as is introduced by the pitch shifter, then you won’t hear any phasing in so far as your plugin goes!

            Sorry for the ramble I hope that’s moderately clear. Just make sure you operate in samples and not milliseconds, so if you are operating at different sample rates the latency difference is consistent!

            DanHD 1 Reply Last reply Reply Quote 1
            • DanHD
              DanH @HISEnberg
              last edited by

              @HISEnberg Yeah that makes sense. As long as when you restart the DAW playback it can account for the latency changes that would be fine. I'l' run some tests when I find time

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

              1 Reply Last reply Reply Quote 0
              • JulesVJ
                JulesV
                last edited by

                I think using Engine.setLatency dynamically can be problematic.

                Instead, after the maximum delay value caused by pitchshift is set in Engine.setLatency, the difference can be balanced dynamically with a delay node according to the parameter values ​​that give less delay.

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

                21

                Online

                1.8k

                Users

                12.0k

                Topics

                104.2k

                Posts