# How to get latency down?



## Hanu_H (Dec 4, 2018)

Hi guys,

I am trying to get my latency down when playing with my template. I use Cubase 9.5 and VE PRO for the template. At the moment, I have to use 512 samples and it's impossible to play faster parts. I have all my samples and Windows on a SSD's(Samsung EVO's) but my project files are still on a older HD. Maybe that's the bottleneck for me? I am using fairly new i7 with 32 gigs of ram. My template takes about 25 gigs of ram with a busy orchestration. I can play pretty heavy patches with really low latency in Kontakt standalone. Other thing I am wondering is the audio interface. Before I was using firewire interfaces but when I bought the new computer it didn't have any firewire connections. So I purchased a cheap Focusrite Scarlett 2i2 to get rolling again. Would a better audio interface give me better latency with sample libraries? I am not doing a lot of audio recordings at home(mostly demo guitars and bass), so I will only upgrade the interface if it helps with the sample libraries as well. I have done some optimizing(no anti-virus, etc), but maybe there is something more I should do?

Thanks in advance.

-Hannes


----------



## Kony (Dec 4, 2018)

This could be a settings issue in 9.5 - I recently got the Scarlett 2i2 for audio recording as I wanted something cheap to take on the road and have to say it has virtually no latency btw. I'm also on an i7. The HD could also be the bottleneck. If you're having to set the buffer to 512 for 25 Gb RAM useage, then something isn't right. Are you using Ozone btw? That can add a lot of latency....


----------



## Hanu_H (Dec 5, 2018)

I can record audio with low latency as well. The problem is when a lot of VST instruments are playing and I want to record more, I can hear clicks and pops. I am using Ozone at times. Have to remember that.

-Hannes


----------



## Kony (Dec 5, 2018)

The latency with Ozone is so bad that I will only add it (if required) when doing the final mix. 


Hanu_H said:


> The problem is when a lot of VST instruments are playing and I want to record more, I can hear clicks and pops.


Has this got something to do with the Kontakt buffer - and with the cores settings in Kontakt?


----------



## Hanu_H (Dec 5, 2018)

Kony said:


> The latency with Ozone is so bad that I will only add it (if required) when doing the final mix.
> 
> Has this got something to do with the Kontakt buffer - and with the cores settings in Kontakt?


Yeah, I also use Ozone for mastering and add it only when the mix is done. I have tried different setting in Kontakt as well, without any help. That's why I was wondering if the reason for it is the old HD or the interface.

-Hannes


----------



## jneebz (Dec 5, 2018)

I have a similar issue, using an Apollo Twin Duo, 32GB RAM, Cubase and an i5 3GHz. I end up using the delay compensation feature for faster and/or percussive passages. Have you tried that?


----------



## BubbaMc (Dec 5, 2018)

Have you got the latest bios and chipset drivers installed for your machine? It might be worth running Latencymon to see if your system has any issues.

This is essentially why I moved back to Mac, the quality of system drivers are pretty much guaranteed for audio work. In my case I was running an i9 processor and getting clicks and pops at high buffer sizes (and this with an RME interface known for its low latency performance). Changed to a vastly less powerful Mac and it's rock solid at tiny buffers with very low latency.

PC hardware is a bit of a lottery for audio work. Unless you buy a system that's known to be suitable you might end up in this situation, for example:


----------



## Kony (Dec 5, 2018)

The clicks and pops could be from a combination of factors though - this video might help (apologies if you've already seen it):


----------



## Synetos (Dec 5, 2018)

I had a lot of trouble with this issue a while back. I turned out to be my integrated network card driver. I went directly to the manufacturer for the driver and it solved the problem. In my case, it was an asus board. I went to intel for the network card drivers and it fixed it.

For a while, nVidia drivers were a problem child. Not so much now.

Here is a link to maybe help troubleshoot the issue. Similar things as BubbaMC was suggested.

https://www.sysnative.com/forums/wi...y-high-dpc-latency-storport-sys-ndis-sys.html


----------



## Hanu_H (Dec 5, 2018)

Thanks everyone. I will try to go everything through and see if any of it helps.

-Hannes


----------



## JohnG (Dec 5, 2018)

Run Latencymon, which often reveals where the problems lie. It's at resplendence dot com. 

You have to read the instructions about how to interpret the results, and be sure to run it for at least four minutes while a sequence is playing.


----------



## Hanu_H (Dec 5, 2018)

Kony said:


> The clicks and pops could be from a combination of factors though - this video might help (apologies if you've already seen it):



I watched the video and did some testing with Latencymon. My CPU usage on a large project is about 70-80% and it used 22 gigs of ram. So I think, I can confirm that the issues I am having are related to the real-time performance not CPU performance. Funny thing is that Latencymon is saying everything is fine, even when I have these hiccups. I used a buffer of 256 in this test. I got a lot of drop outs, etc. Have to do some more digging tomorrow...

-Hannes


----------



## JohnG (Dec 5, 2018)

Hanu_H said:


> it used 22 gigs of ram



Hmm. Did you go through the tips on this thread?

https://vi-control.net/community/threads/windows-10-settings-stuff-you-can-turn-off-for-music.49446/

It's possible you need to have a look at the BIOS or it could be one of those other weird things (like the Windows settings for "Privacy" and the Network Adapter settings.


----------



## Hanu_H (Dec 5, 2018)

JohnG said:


> Hmm. Did you go through the tips on this thread?
> 
> https://vi-control.net/community/threads/windows-10-settings-stuff-you-can-turn-off-for-music.49446/
> 
> It's possible you need to have a look at the BIOS or it could be one of those other weird things (like the Windows settings for "Privacy" and the Network Adapter settings.


Have have done some of the things in that list. I will have to take a better look on that list and try to narrow down the possible reason for it. I haven't done any of the BIOS stuff and I am not sure if I am skilled enough to start messing with it. Thanks again.

-Hannes


----------



## Hanu_H (Dec 5, 2018)

Here's all the data from LatencyMon. It seems that the graphic card is one of the reason at least...


----------



## JT3_Jon (Dec 5, 2018)

To be clear, are you getting disk streaming dropouts or CPU drop outs? Cubase will let you know in their "audio performance" monitor if its average load, real-time peak, and disk. If its real-time, then you are likely hitting your CPU limits. Are you running a lot of plugins / reverbs, etc? You mentioned Ozone, which is a large CPU hog + causes latency.

Also Cubase has a setting called "constrain delay compensation" which will automatically bypass all latency inducing plugins when enabled. This will help you narrow down if your latency is caused by plugins that need the latency for look ahead, etc. If you still need to use those plugins for mixing, consider making this a key command and toggle it on when recording new midi parts.

If you are using a lot of VI's, in particular virtual synths, you can also try freezing them and seeing if this brings down your CPU enough to lower your latency. You can also "bounce in place" any parts that are finalized and disable the instrument. I'm running an older mac pro and often have to bounce / freeze tracks to keep my latency at a manageable level, but as my projects grow I often end up running at 512 buffer size, which in conjunction with "constrain delay compensation" allows me to continue to write. I also tend to use a lot of mix plugins as I write, which can get me into trouble.


----------



## Hanu_H (Dec 5, 2018)

JT3_Jon said:


> To be clear, are you getting disk streaming dropouts or CPU drop outs? Cubase will let you know in their "audio performance" monitor if its average load, real-time peak, and disk. If its real-time, then you are likely hitting your CPU limits. Are you running a lot of plugins / reverbs, etc? You mentioned Ozone, which is a large CPU hog + causes latency.
> 
> Also Cubase has a setting called "constrain delay compensation" which will automatically bypass all latency inducing plugins when enabled. This will help you narrow down if your latency is caused by plugins that need the latency for look ahead, etc. If you still need to use those plugins for mixing, consider making this a key command and toggle it on when recording new midi parts.
> 
> If you are using a lot of VI's, in particular virtual synths, you can also try freezing them and seeing if this brings down your CPU enough to lower your latency. You can also "bounce in place" any parts that are finalized and disable the instrument. I'm running an older mac pro and often have to bounce / freeze tracks to keep my latency at a manageable level, but as my projects grow I often end up running at 512 buffer size, which in conjunction with "constrain delay compensation" allows me to continue to write. I also tend to use a lot of mix plugins as I write, which can get me into trouble.


Hi Jon,

I checked the Cubase audio performance monitor and when all the reverbs, etc are on, I get a lot of real-time peaks. I disabled all of the plugins and now the average load and real-time peak stays close to a minimum. Disk is not showing any activity. This is on a 256 buffer. But when I play any instrument with legato, I get clicks and pops but the meters still stays really low, so no real-time peaks. Are you using the ASIO-Guard or do you have it disabled? When using it, the playback is a lot better but playing the instruments is not. Maybe I have something wrong in the VE Pro settings, or inside Kontakt?


----------



## HelixK (Dec 5, 2018)

Kony said:


> The clicks and pops could be from a combination of factors though - this video might help (apologies if you've already seen it):




3 years is a long time for tech but this video is still very relevant and helpful. Thanks for sharing!


----------



## DAW PLUS (Dec 6, 2018)

Hi Hanu,

first of all: the Scarlett range has really poor drivers. High latency and poor performance. Using a better interface will make a difference, especially when using something really solid like RME. A list of best performing interfaces can be found here:
https://www.gearslutz.com/board/showpost.php?p=13368351&postcount=2186
Top is best, bottom is worst. It is a combination of both *real* measured latency (as opposed to the reported latency which Cubase shows) and performance both while using mixing plugs and Kontakt voices.

Second, you may want to tyr using ASIOguard, by setting a slightly lower buffer in the interface but activating ASIOguard. It is greyed out like in your screenshot if its own buffer is set too high.
The advantage is that you get lower latency when recording a performance.

Your DPC values are ok. They could be better, but anything below 1ms is on the edge anyway and you will not get much more voices when DPC is lower, as especially with lower buffers, the CPU headroom becomes large but is absorbed by realtime spikes. As soon as a spike overloads a single core, you will get dropouts. In that scenario, a DPC of 20µs will rarely save you as opposed to a 600µs, eventually a few spikes will strike if the CPU can't handle the task. BTW one should run Latencymon after a reboot in idle, to identify whether drivers are interfering.

If your HDD is too slow, this should be shown in Cubase, it would light up in red. Have you defragmented it? If you can play the same amount of voices in Kontakt standalone as when doing the same in Cubase/VEP (but without issues), then the HDD is not the culprit. Rather the settings (Cubase settings seem fine, you may want to switch from Audio priority Boost to normal, as you do quite some MIDI stuff). Using Cubase & VEP means a lot more resources than what Kontakt standalone uses, so you simply may run into CPU issues. 
I recommend to run CPU-Z, open the "Clocks" tool and check what the speed of the cores do. They should be minimum at base speed of the CPU, preferably higher (between base and max Turbo clock), and *stable*. If they keep switching speed, or go below base speed, something is wrong - energy settings. Disable energy saving, as that is what kills realtime operation. Most music software companies have tweak sites how to do this. I don't agree with everything in there though...

Good luck!


----------



## Hanu_H (Dec 6, 2018)

DAW PLUS said:


> Hi Hanu,
> 
> first of all: the Scarlett range has really poor drivers. High latency and poor performance. Using a better interface will make a difference, especially when using something really solid like RME. A list of best performing interfaces can be found here:
> https://www.gearslutz.com/board/showpost.php?p=13368351&postcount=2186
> ...


Hi DAW PLUS,

Yeah, I was thinking that the Scarlett might be a part of my problem. I did some testing and using Kontakt standalone, I can use buffer of 64 and I can play Adventure Strings full strings marcato and viola adventure patch in the same time without any clicks or pops. Even with fast rhythms and many notes at the same time. Same thing if I load Kontakt straight into a Cubase without VE Pro. But when opening my template and trying to play a single instrument, at a lower buffer than 256, is impossible. And if I want to play hiccup free, I have to set the buffer to 512. And that is when all the effects are disabled and all the meters in Cubase stay really low all the time, same with CPU and disk activity. So can't really tell why there is hiccups when nothing is shown in any of the performance meters. I will see what the CPU-Z is saying about my situation.

Thanks for a detailed answer.

-Hannes


----------



## DAW PLUS (Dec 6, 2018)

Hi Hannes, have you verified the amount of cores used in VEP? Try setting it to "all -1" (i.e. if your system shows 8 cores, try setting it to 6 or 7).


----------



## Hanu_H (Dec 6, 2018)

DAW PLUS said:


> Hi Hannes, have you verified the amount of cores used in VEP? Try setting it to "all -1" (i.e. if your system shows 8 cores, try setting it to 6 or 7).


Yeah, I have it at 6 at the moment. Maybe I should try 7?

-Hannes


----------



## DAW PLUS (Dec 6, 2018)

To be honest, I don't think it will make a huge difference. Rather when it was set to 2/4.
What is Kontakt set to?


----------



## JohnG (Dec 6, 2018)

DAW PLUS said:


> Hi Hannes, have you verified the amount of cores used in VEP? Try setting it to "all -1" (i.e. if your system shows 8 cores, try setting it to 6 or 7).



Mine's set to 2, but I have about 15 VE Pro instances running. 12-core Mac Pro

I'd welcome any suggestions on this topic. I just guessed.


----------



## Hanu_H (Dec 6, 2018)

-Hannes


----------



## ghostnote (Dec 6, 2018)

Hey Hanu, could be a lot of reasons like:

- outdated graphic cards driver
- enabled network card driver
- or simply a problem within your template

Are you susing reverb sends? Or QL Spaces? Have you tried to change the reverb or to build a new template from ground up?


----------



## X-Bassist (Dec 6, 2018)

Hanu_H said:


> -Hannes



Hey Hannes! I had the same problem as you and the same settings. Spoke with Evil Dragon about it a month ago and he suggested changing my Kontakt multiprocessor support to HALF my cores (I have twelve cores, so I set it to six) and it worked great! I was getting pops and clicks at a 512 buffer, and now I can get it down to 128 without a problem! (He is brilliant!)

This is with VE Pro AND Pro Tools running in multiprocessor, which I thought was a no-no. But he said VEP uses multicore support one way, and Kontakt multiprocessor support is different. I’ll see if I can dig up the thread for you. Cheers 

Edit: Found it! Here is the relevant comment from Evil Dragon:

“You should try raising Kontakt's multicore setting regardless of what VEP is doing. Kontakt's multicore is spreading voices across cores, so it works differently from what VEP and DAWs do (which is spreading whole tracks across cores).”

Here is the thread page:
https://vi-control.net/community/threads/taiko-creator.75872/page-4#post-4294312

Hope it helps!


----------



## Hanu_H (Dec 6, 2018)

ghostnote said:


> Hey Hanu, could be a lot of reasons like:
> 
> - outdated graphic cards driver
> - enabled network card driver
> ...


Hey Ghostnote,

I haven't tried to build a new template, maybe during the holidays I have some spare time to do that. Yesterday I updated the graphic card driver and network card driver. I am using QL Spaces for reverbs and it really takes a lot of processing power, at the moment I am testing without any reverbs but still getting pops and clicks. Processor staying under 40% at all times.

-Hannes


----------



## Hanu_H (Dec 6, 2018)

X-Bassist said:


> Hey Hannes! I had the same problem as you and the same settings. Spoke with Evil Dragon about it a month ago and he suggested changing my Kontakt multiprocessor support to HALF my cores (I have twelve cores, so I set it to six) and it worked great! I was getting pops and clicks at a 512 buffer, and now I can get it down to 128 without a problem! (He is brilliant!)
> 
> This is with VE Pro AND Pro Tools running in multiprocessor, which I thought was a no-no. But he said VEP uses multicore support one way, and Kontakt multiprocessor support is different. I’ll see if I can dig up the thread for you. Cheers
> 
> ...


Tried this and it helps a bit but can't go below 256. I am starting to think that it definitely is the interface causing me the headache...

-Hannes


----------



## DAW PLUS (Dec 10, 2018)

Interesting that Kontakt standalone manages that patch in single core mode without issues. What CPU and what OS do you use? I suspect Kontakt manages due to a high single core Turbo boost, but as soon as Cubase is active, that Turbo speed will never be reached.


----------

