Delay compensation

Discussion in 'Feature Suggestions' started by Z Gabr, Jan 6, 2020.

  1. Kubrak

    Kubrak NI Product Owner

    Messages:
    750
    You are probably right....

    If Reaktor suddenly starts miraculously calculate it for all patches, old projects where user compensated for latency would have to be changed. And change/improvement of latency calculation would again unexpectedly change the projects...

    It seems to be better and more under controll if patch developers report latency by means Reaktor would provide them with. It would be way easier to implement for NI, and possibly better for all (to automatic latency calculation by Reaktor)
     
  2. Z Gabr

    Z Gabr NI Product Owner

    Messages:
    239
    Manually enter ...
     
  3. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    With so many variables producing erratic latency error reports I made a simple sync pulse ensemble that produces a 10 sample square wave. The first sample recorded produces a positive value the next sample produces a negative value and so on. The values are 20db down so when you play it back you hear a soft click sound. The plugin also passes the audio with no processing and is always the last plugin in the chain. I never start playing after a few measures anyway so after the final mix it gets cropped out. Naturally the 10 sample square wave can be used to line up tracks that have been bounced or re-imported. So I really don't have a problem with track offsets from latency and other factors. But I will warn you not to filter the track itself, it will screw up the square wave. I always keep this track as the master track and duplicate the track that is going to be processed. Once satisfied with the processed track I play them together and shift the processed track back in phase with the original. In other words there is more than one way to skin a cat.
     
  4. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Nice to see you out and about. I agree, seems a good daw can run the plugin internally and record the true latency verses a reported latency. I can't imagine it otherwise. There is a reason Steinbergs Nuendo retails around 1250. I seriously doubt they don't calculate the latency of any plugin beforehand.
     
  5. Kubrak

    Kubrak NI Product Owner

    Messages:
    750
    No, I did not mean DAW could handle it I meant dealer of Reaktor patch shoul handle it.

    Patch may change latency any time, I guess. How would DAW know that it has been changet and that it should measure it again. And how would DAW measure it during time when plugin works.
     
  6. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    I knew you were going to say that. The problem is with both, the daw may only ask for latency 1 time during start up. Even if reaktor did report a new latency with a patch change it's questionable whether the daw will compensate on the fly. That's why I recommended you try Nuendo. Or just ask them. Nuendo is a razor sharp top of the line daw. They might appreciate the question and actually incorporate new latency after a patch change. Steinberg prides themselves on perfection. Even if you can't afford it you should try the 60 day trial just to see it in action.
     
  7. Kubrak

    Kubrak NI Product Owner

    Messages:
    750
    VST has means for plugins to report latency dynamicaly. Plugin anounces to DAW that latency has been changed to a new value. If DAW uses that information may be another question. But it should.
     
  8. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Exactly. High end programs like Nuendo are on a professional level. Seems you need professional results. Contact Steinberg and ask them if they support what you want. You may be surprised to find out they do their own analysis of a plugins latency and do not rely on reported latency.
     
  9. Laureano Lopez

    Laureano Lopez NI Product Owner

    Messages:
    408
    They do not though. VST3 is Steinberg's plugin format. In VST3, the plugin asks to be restarted with a latency changed flag, then the host asks for the new latency value in samples. It's the plugin's responsibility to compute its own latency, it's the host's responsibility to apply whatever delays are needed. Any decent DAW using VST3 does this, including Cubase and Nuendo, but also most of the rest. Anyway, that's why I say it doesn't make sense to expect Reaktor to compute latency -it's part of a patch's output as much as anything else.
     
    • Like Like x 1
  10. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Exactly!
     
  11. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Years ago people were blaming the daws. In reality the plugins themselves were misreporting sample accurate latency. So some daw's had to put a track shift so we could do it manually. It makes logical sense not to fully trust a reported latency in high end daw's. Since 10 or more years have past you might think the plugin makers would provide correct latency. I have my doubts though and I really think a professional daw should analyze the latency of a plugin just to be sure. You might say it's a pro feature for professionals who don't have the time to complain. Anyway, I slapped together a marker maker. It's just a little square wave that puts out a 5 k square wave. It's hooked up to start/stop module and runs while in play or record mode within a daw. I didn't bother making it stop after 5 milliseconds or a number of samples but the levels -12db down. Don't blow your tweeters. lol If there is no latency it should start at the beginning. If someone else wants to pick up on it and make a short burst of say 10 ms that'd be great. Seems it could be placed in parallel with any ensemble and can be used as a marker. Ok, hope it helps. Getting some zzzzz's now.
     

    Attached Files:

  12. Kubrak

    Kubrak NI Product Owner

    Messages:
    750
    DAW cannot automatically measure and correct latency. Regardless it is Pro or non-Pro.
    It may do some kind of measurements and present those values to user. It may check if reported value corresponds to measured one and report difference to user. But the user must decide if it is latency or intentional delay.

    Simply DAW cannot know if the value of time lag between output and input is undesired latency to be compensated or desired delay that must not be compensated. Plugin designer knows, and plugin user may know.... DAW has absolutely no idea....
     
    • Like Like x 1
  13. Z Gabr

    Z Gabr NI Product Owner

    Messages:
    239
    Yep! Absolutely!
     
  14. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Well, that makes sense. If you intentionally put in a delay it may come back with the delay added in as part of the latency.

    You asked me before how to tell how much latency a plugin has. Now you have a method to find out. Use the marker I made above and put it on a track or effects plugin and press record. The marker starts immediately when play or record starts. So record a track for a second and stop it. Now examine the wave file and count the number of samples before the marker starts.. That is your latency.
    marker link>>> https://www.native-instruments.com/forum/attachments/marker-maker-ens.110063/
     
  15. Z Gabr

    Z Gabr NI Product Owner

    Messages:
    239
    Thanks! But I know very well what the delay is in my ens. All I need is a supposed latency compensation module where I could enter a fixed latency value that will be reported to the host application. This module could be used when creating modular FX, for example, in Molecular, in which the final delay varies depending on the selected FX processors and types of routing: entering the maximal delay value created by a certain set selected FX processors and a certain type of routing into the expected delay compensation module. When changing the set of FX processors and routing types, where the total delay will be less, take this into account when designing and compensate for the difference in delay between its maximum detected value and values less than the maximum, by precisely adding delay in the necessary places, up to the maximal detected value, depending on its changes to the lower side by various FX processors and types of routing. This would work perfectly.
     
  16. Kubrak

    Kubrak NI Product Owner

    Messages:
    750
    Well, not really. If anyone asked, it was not me.....
    The thing is not how to measure latency of Reaktor patch. The thing is how to report its latency (possibly dynamically) to DAW.
    Now one can 'fix' latency using third party plugins, but not on the go in real time....
     
    • Informative Informative x 1
  17. colB

    colB NI Product Owner

    Messages:
    3,824
    Also, as Laureano has already mentioned, plugins that use IIR filters (that's a lot of plugins) will have latency that varies depending on frequency, so it's not possible to exactly measure or calculate a single figure for latency. Even the best super pro mega DAW cannot know what the 'correct' setting is in this situation. It has to be a choice of the plugin developer, or the engineer/producer.
     
    • Like Like x 1
    • Informative Informative x 1
  18. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Like I wrote earlier, always keep the original recording in a muted track or something. After doing your processing you can shift the processed track to be as much in phase as possible with the original. If you change a patch during a recording with a different latency you may have to split the track and time shift the new patch to be in phase with the original. Considering different frequencies can be shifted in phase all you can do is try to line it back up the best you. In other words, in the end you still have to do it your self. I gave you little marker to help out when bouncing tracks or re importing a track. That is a problem in itself so having a marker at the start allows you to fix time shifts for this problem.
     
  19. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    .....Kubak, you seem like a nice person. Here is a gift. This marker produces a 5khz tone for 1 millisecond. This CLICK sound "Marks" the beginning of a track when you press record. It also plays the click when pressing play. The Click does not mix with any audio input. It turns off the audio input for 1 millisecond at then switches the audio in. This ensures a good marker. The marker is not considered a third party plugin to fix a latency problem. It can be used to ensure a track is starting where it should be. For instance, if you export a track as a wave file and import the track later you may notice the marker is no longer in time by a few samples. So you can shift the track to fix it. The marker can also be used in a reaktor plugin as it is a core cell and a start stop module. You should put the marker on the output a plugin. This ensures the plugin does not affect the click. You can also put another marker on the input of the plugin to somewhat test the latency. For instance, If the plugin is a 1 second delay the clicks should be 1 second apart on a recorded track. If the clicks are longer then you can measure the latency of the plugin. Now you have a tool to keep an eye on things. Just remember a plugin other than a straight delay can time shift and reshape the 5k tone burst. If the plugin latency is long what is left of the 5k tone burst may help to time align the track or at least get you into the ball park for fine adjustments.
    ...For starters insert the marker as a single plugin and make a recording with no audio. Play it back and zoom in to sample level to see if the first part of the 5 k square wave is time shifted. If not all is well. Try inserting it into a shared plugin and make a recording. See how it goes. Next , export the track as a wave file. Re- import the track and see if the marker is still in the same place. Try a real time track bounce and check. Lots of things cause latency but having a marker at the start of a track is a real treat . I hope you enjoy your present. I had some time to finish the other one with my morning coffee. Enjoy and let me know how it works. I will put it in the UL for other pro engineers if it works ok for you.
     

    Attached Files:

  20. Kubrak

    Kubrak NI Product Owner

    Messages:
    750
    This tool may help to some extent and some use cases. Would not work for live sessions. Would not work in Maschine.
    And the aim of this thread is to persuade NI to let the Reaktor patch developers let report the latency of their patch. So that one does not have to deal with plugins for latency compensation, or any other means to do it manuály.
     
    • Like Like x 1