Reduce latency Thinkpad P15V Gen2

Dear all,

As my first experiences with Cantabile were good, I got myself a new computer to reduce the latency. My new system is an Lenovo Thinkpad P15V Gen2, intel i7-11800H, 32 GB, 1 TB SSD. I hoped that my latency would reduce to zero, but that is not always the case. I installed the ASIO - Yamaha Steinberg USB Asio Audio driver.

Up to now I have only free VSTs, so that may be a factor. My best results I have now with the Iowa Piano, which is a simulated piano. This would be almost acceptable, even on fast repeating notes, although still some latency is there.

I tried the Ivy audio Piano in 162 for a sampled version, using Sforzando as sampler. This has an unacceptable amount of latency, making it very difficult to play fast passages.

I further found out that using the live mode the performance is much better, showing that I am a beginner here.

My question to the forum is: What can I do to further decrease latency?
I also installed LatencyMon to get some data, but I couldnā€™t really understand a lot, apart from that it says that my system is suitable for real time audio.
Any tip is welcome!

regards,
Joop

An important metric is a simple ā€œRound Trip Latencyā€ ('RTL") - the time to send and send audio through your audio interface. In my experience, most of the lightweight VSTs I run introduce very little latency compared with the overhead of the interface and itā€™s buffers.

The RTL Utility by Andrew Jerrim of Oblique Audio is an excellent, free tool to measure the latency of an audio interface under various sample rates and buffer sizes (https://oblique-audio.com/). Itā€™s a little app that directly tests Round Trip Latency on an Audio interface with a loopback cable installed (just an audio cable from your Audio Out to your Audio In). I downloaded it most recently last November from https://oblique-audio.com/rtl-utility.php. Unpack it and run the app directly and it is pretty self-explanatory.

Here is some notes I collected along the way that might be helpful ā€¦

These pertain mostly to live performance rigs (setups used for studio recording have different latency issues and considerations).

Context: I use C3 in a variety of live settings to live loop hardware and software virtual instruments, mostly from a Sylphyo wind-synth/controller. Iā€™ve been playing out solo over the last year, but will now be adding a series of ā€œsatelliteā€ keyboard players. They are mostly very experienced on keyboards, but not on sound rendering, so I plan on rendering and mixing their sound. My focus on latency is for my own wind-synth work and also to give the satellite keyboard players a good experience.

*** Basics

There are some basic items that I started with. I canā€™t comment on how bad things might be if they were not done:

ā€¦ Use custom ASIO drivers from a good vendor. I was pointed toward RME (in a personal communication from the prolific poster Evil Dragon) early on and avoided the confusocopia of picking an audio interface vendor. The RME drivers have never let me down, but I donā€™t have experience with other brands of audio interfaces.

ā€¦ Optimize your operating system for audio use. See Bradā€™s ā€œGlitch Freeā€ Guide: https://www.cantabilesoftware.com/glitchfree/

*** Latency affects how you play

My initial rig designs resulted in over 50 msec of latency (over 1/20 of a second). I was initially enamored with the ability to render sound and simply accepted it and adjusted to it.

In retrospect, I was completely disconnected from my playing. The only genre I could play on my Windsynth was Ambient Music with lots of reverb. Actually did a number of solo concerts like this, and it was great, but I was definitely limited to this genre.

When I was able to get the latency below 20 msec, it felt almost normal and I mostly forgot about latency issues. I suspect that this is where the ā€œconventional wisdomā€ of ā€œyou canā€™t hear latency if it is below 17 msecā€ comes from.

Everything changed when I introduced live looping. Nothing rhythmic really worked, especially if I was trying to use a loop-synched delay effect to get a rhythmic effect from my WindSynth. I use a Strymon Timeline synched to my RC-505, and sending that output back through my RME interface made it difficult to synch overdubs with a bed loop.

When I bludgeoned the latency down to 5 msec (my mental image of latency reduction is the Japanese arcade game ā€œWhack a Moleā€), rhythmic loops once again became easy. And, when playing WindSynth, it feels (to paraphrase Matt Traum) as if I am singing the music directly out of my breath. This was (pre-)echoed in a post by Patrick Stinson over 8 years ago:

ā€œDespite the word on the street, a latency of 8-9 ms round trip is not acceptable for live work! ā€¦ It is impossible to lock in the loop on time. Itā€™s also not possible to play perfectly in synch with a ping-pong delay.ā€

This arc of experience leads us to the next big learning:

*** Latency perception / tolerance is highly individual

Style and genre of play, ability to anticipate or mentally adjust your playing to a given latency, experience of the player ā€¦ and many other things mean that there is no absolute ā€œacceptableā€ latency for all players and situations.

*** ā€œItā€™s an audio interface too!ā€

Audio units that have audio interfaces as an auxiliary feature (such as Boss Loopers and inexpensive digital-capable mixers) can introduce significant latency. You can easily see this from the minimum buffer sizes offered by the associated ASIO drivers.

*** Identify and understand the components of latency

Iā€™ve learned to distinguish between:

  • Input Latency - the time to get an external audio signal into the DAW, including A-to-D conversions (ADCs) and input sample buffers.

  • Output Latency - the time to convert an outgoing digital signal to an external audio signal into the DAW, including D-to-A conversions (DACs) and output sample buffers.

  • Software Latency - the time to render an incoming MIDI or audio signal to an output digital signal.

  • RTL - ā€œRound Trip Latencyā€ - the total time from input signal, through the DAW, to output signal.

On mis-understanding I had early on was my thinking regarding MIDI. I had thought that, since it was digital, it would not be subject to input latency. Not true! See the section on ā€œMIDI Quantizationā€ below.

*** Routing

Consider routing digital units that augment the direct sound (delay, reverbs, loopers) as sidechains rather than as inserts. These digital units can introduce significant latency on the dry sound path - each has itā€™s own RTL.

*** Hidden Buffers

Look beyond buffer sizes for predicting latency. Interfaces often have ā€œsafetyā€ or completely hidden additional buffers.

*** Direct Monitoring

Make use of ASIO direct monitoring setups where possible to dramatically reduce latency. Some vendors have custom implementations of direct monitoring such as TotalMix routing in the RME poduct line.

However, realize that your mixing may get more complex if you use some flavor of Direct Monitoring. You may need a hybrid system that allows you to control the mix in your DAW and the Direct Montoring system in parallel. Creative use of MIDI and external MIDI Controller can help. I also use internal MIDI commands from C3 bindings sent over loopMIDI to change the direct monitoring configuration of my interface as needed between songs in my set list.

*** Sample Rate

Carefully selecting a Sample Rate for your audio interface can improve latency - sometimes significantly. If you change from, say, 44.1kHz to 48kHz, many audio interfaces will still offer the same choices of buffer sizes. So, if you simply change the sample rate, you can get an 8.1% improvement in latency.

However, I have found that latency with many of my Kontakt sound libraries improved far more in some cases. With libraries that were recorded with 48kHz samples, changing from 44.1 to 48kHz improved latency over 18%. Most sound library producers will state the sample rates associated with each of their sound libraries.

Increasing sample rates beyond 48kHz can be problematic. The additional audio samples bring additional data requirements on all other parts of the software signal path, and host CPU load increases. Higher sample rates can also raise the noise floor of your audio interface.

*** MIDI over USB vs Serial

I have tested MIDI over USB to be marginally faster, but have higher jitter, than MIDI over Serial lines (i.e. with DIN5 connectors). Testing was done on dedicated USB lines - latency and jitter of MIDI over a busy USB with other traffic may be far worse.

*** MIDI Quantization

Incoming MIDI traffic tends to be ā€œquantizedā€ into blocks by DAWs. From this post [Does incoming MIDI go through the ASIO Sample Buffer?] by @Torsten:

ā€œAll MIDI input is processed in blocks in parallel to audio input, and then forwarded along the processing chain. MIDI plugins always get a buffer-load of MIDI commands to process, just like audio plugs get a buffer-load of samples to process - in fact, there is no architectural difference between MIDI and audio plugins - they are just plugins that process their input in chunks of ā€œsample buffer sizeā€.ā€

In practice, I have found that C3 buffers MIDI in blocks on 1.00 msec boundaries, while Reaper tends to run in blocks of about half that duration.

*** Jitter

Mind the jitter - the variation in latency from note to notes. Jitter can be more unsettling that latency, especially for percussionists.

1 Like

Clint made some excellent points. To add to thatā€¦
Iā€™m a guitar player and Iā€™ve been gigging with C3 for years, but I also play an Akai 4000S wind instrument, which of course is midi.

I think most everyone would agree that youā€™re never going to get decent latency or other decent performance from an onboard audio card on your laptop. An interface makes all the difference. I started out with an old Vaio with an i7 chip, donā€™t remember which model but it was circa 2011. For about 200 bucks I got a Scarlet 2i4 interface. That was certainly playable, I got round-trip latency of around 13ms and gigged with that for a few years.

Now I have a custom built rack PC and a Presonas quantum 2626 firewire interface. IIRC I get RTL of 4ms @44k sample rate and 32 buffer. Whatā€™s funny though, is recently I hooked up the old Vaio rig, which is my backup gig rig, and the additional latency was not nearly as annoying as I remember it being. In fact it was quite playable. On the other hand, I do recall realizing that the years I spent playing with that rig taught me to play just slightly ahead of the beat on critical passages.

Sounds travels at about 1 millisecond per foot. So if you are 10 ft from the speaker, you get about 10 milliseconds latency. Most people notice latency at around the 10 millisecond mark, so the pundits say. Iā€™m a little more sensitive and can hear it / feel it at around 7. You can test this yourself to some degree by running through a delay that shows the delay in milliseconds, use a sound with the fastest possible attack, start at zero and gradually increase it until you actually hear the attack of the note twice. Bear in mind, even at 4:00 or 5:00 milliseconds you may start to hear the sound getting a little fatter, but youā€™re really listening for the attack. Itā€™s an interesting test, but the real test is playing and how it feels to you.

I use sforzando also, and although Iā€™ve never actually tested it I can feel that it adds a little latency, which varies depending on the sample/instrument Iā€™m playing. As Clint pointed out, different VSTs can have different latencies, and there are many factors. Itā€™s rarely just one thing. And if you havenā€™t already, be sure to read and follow Bradā€™s computer optimization guide which is somewhere here on the forum or on the main cantabile site. Itā€™s one of the better ones, I believe I shaved about 5 milliseconds off my initial tests just by optimizing the PC.

Just remember, itā€™s a process. Itā€™s a lot to learn, especially in the beginning, but it is well worth it. Iā€™m constantly getting other musicians coming up to me, asking how the hell I get all these tones and effects and complex layers, yet switch instantly between song sections, or from one song to the next. All with just one button that advances on my foot pedal. There is virtually nothing you canā€™t do with Cantabile.

3 Likes

Hi Joop,
The P15v Gen2 is capable to do anything you want and more. :slight_smile:
I bought the P15v Gen1 last year and didnā€™t have latency issues.

If i understand you correctly, you hava a steinberg interface, right?
What is your latency right now? What happens if you go lower?

Iā€™m running at 96 samples latency. Lower latency is possible but doesnā€™t make a difference except for higher time load.

Hereā€™s what made a difference in audio performance:
Go into the BIOS
Turn off - Intel Speedstep & Hyperthreading

Best,
Steffen

The audio interface is critical to latency, IMHO. The best performers that I have used are most of the Focusrite (E.G. ā€˜Scarlettā€™), interfaces. Iā€™m enjoying <5ms with a ā€˜tinyā€™ buffer of 100-150 samples.

Dear all,
many thanks for all your help. As my P15v Gen2 is a rather expensive laptop I did not want to take the risk that in the end I do not get the latency fixed. Maybe I should have gone through the learning curve before I acquired the machine. My actual plan is to cross the river and to continue on Mac. Iā€™ve been playing half a year with mainstage without latency issues, however Iā€™m not a particular Mac fan (more a Mac hater).

The weeks I worked with Cantabile did really convince me that it is a better program (for me) than mainstage. I did read a bit on Mac available live software and I believe that Gig Performer could be a way to go.

Iā€™ll consider to go through this learning curve on another machine, desktop and not so fast. Once I know the trics I can try again on the P15 Lenovo.

Thanks again for all your help and I feel a bit embarrassed that I gave up so quickly.

regards,
Joop

1 Like

Dear all,

Just to let you know: Today I tried Cantabile on my home desktop:

  • Processor AMD A10-9700 RADEON R7, 10 COMPUTE CORES 4C+6G, 3500 Mhz, 4 Core(s), 4 Logical Processor(s)
  • 8 GB SSD

So I would guess this cannot realy match the Lenovo

  • Lenovo Thinkpad P15V Gen2, intel i7-11800H, 32 GB, 1 TB SSD

However, image my surprise: It works fine. I can set the sample buffer to 64 without glitches up to now and with high performance, aggresive use of multi-core, latency is not disturbing me at all. With arrangement I measured (other post) a RTL of 7.8 ms, so that fits I would say.

Would it have been a setting on the laptop that frustrated the performance or should I just try another labtop?

It seems Iā€™m back and will stay!

Honestly, laptops can be really tricky beasts when it comes to real-time audio performance. Laptop builders go to all kinds of lengths to squeeze the last bit of battery life out of their systems, so there are all kinds of funky energy management mechanisms built into laptops.

BTW: Unfortunately, since NUCs generally use laptop chipsets, this also applies to them, even though they have no batteries.

So working with laptops for live audio is always a battle against the energy-saving mechanisms vendors build into their systems. First line of defense is always @bradā€™s excellent e-Book ā€œGlitch Freeā€. After that, itā€™s open hunting seasonā€¦

And some systems still refuse to cooperate - some require you to de-activate Wifi to get a reasonable and stable latency performance. I hate that - I regularly use rtpMIDI via Wifi to connect my live systemsā€¦

My consequence has been to move to a small form factor PC instead of a laptop. I use a tiny ASRock DeskMini 300 with an Intel Core i5. No funky energy management, just smooth and uninterrupted performance. In addition to this tiny box, I carry a 10 inch touch screen mounted on a mic stand with me - enough for most live interaction with Cantabile (and I have a USB trackball on my keyboard if I really need to dig into things). Lean setup and no more worrying about power management kicking in and ruining thingsā€¦

Really recommended as an alternative to laptops!

Cheers,

Torsten

1 Like

My thoughts were going in the same direction already, Iā€™ll consider!

Joop

Hi Joop,

Turn off Intel Speedstep and hyper threading in the BIOS.
That made a big difference in my P15v.

The Laptop is fine for music production.

Best,
Steffen

Yes, turning off all cpu throttling features in BIOS will make a big difference for the better. Note that you might need to look up whatever feature name you see in your particular BIOS in order to identify whether it is related to any form of throttling or cpu allocation scheme. Names can be different from maker to maker but its all essentially the same thing. Also turn off anything that is power savings related. I even run my desktop studio DAWs with CPU at wide open frequency at all time. Electricity bill is a little higher, but remarkably reliable and glitch free. [edit] Also if there is a BIOS feature to turn CPU fan on at all times, do that too. CPU will throttle down no matter what the BIOS and Power settings when thermal limit is hit. And this can be the biggest fly in the ointment when using laptops, since their thermal capacity is usually designed for lower duty cycles in order to save weight and space. What can happen is the high end cpu throttles down due to thermal when pushed hard for continuous periods of time and effectively runs like a lower end cpu. All to say thermal capacity is something to shop for in a laptop imo.

1 Like

Hi,
I my case ( hp elite 8300 USDT ) I found very useful a ā€œcarefulā€ shutdown of many unused win10 services to bring down latenciesā€¦

I am using the blackviper scripts with good results ( from https://github.com/madbomb122/BlackViperScript ) - beware this can be dangerous stuff if you donā€™t know what are you doing
Luigi

My new pick: a refurbished HP EliteDesk 800 G4 mini, wuth a intel i7-8700 processor. I compared it on CPU userbenchmark and ot actually should be faster than some new models of double the price. Any remarks?

Just to keep you updated:
have my HP EliteDesk 800 G4 mini and am happy with that. To reduce latency to acceptable levels I have to switch of audio in in the ASIO4ALL driver, I actually did the same with my desktop that I described above. In the end I think this works easier that a lab-top, as I have keyboard and screen as separate units and can place them wherever I want.
cheers,
Joop