What's new

Optimising Logic for Recording Live Virtual-Piano

When running Kontakt 5 as a standalone, I can safely play with any of the native instruments pianos without going much over 10% CPU usage on my 2015 macbook pro. This is with the smallest latency of 32 samples, the memory server active and Kontakt optimised for my 4 CPU cores.

In Logic, however, I have enormous CPU spikes when loading an instance of Kontakt with these exact same settings . The only way I can avoid clicks and pops whilst playing is by putting my buffer above 64 samples, which is not what I want when improvising.


2 questions:

1) Are there any optimisations in Logic I could be overlooking?

2) Are there any hack-y work-arounds I could try?
Perhaps I could somehow capture audio and midi with a different application whilst running Kontakt 5 as a standalone?... I could kind of treat this like a little recording session, and then focus on editing my audio and or midi in Logic.
Are there any free apps that I could use to capture audio or MIDI playing virtual piano? I recently downloaded REAPER, perhaps it would be more efficient than Logic in this instance?

Thank you for the help!

Bonus facts!!!
16 GB RAM, High Sierra, latest version of Logic. Logic optimised for four cores. Large buffer range. 32 bit summing.
Samples are on the internal SSD, all instruments are batch resaved. I am so out of ideas.
 

tack

Damned Dirty Ape
I know this isn't addressing your question but ...

You can actually tell the difference between 32 and 64 samples?

At 48kHz that's a difference of 667 microseconds. I'm skeptical. :)

I'm hard pressed to notice any differences below 256 samples. And that's with relatively fast classical stuff like Fantasie Impromptu.
 
OP
William Palmer
I know this isn't addressing your question but ...

You can actually tell the difference between 32 and 64 samples?

At 48kHz that's a difference of 667 microseconds. I'm skeptical. :)
I luckily can't tell the difference at all!
The lowest setting in Logic is 64 samples. The lowest in Kontakt is 32 samples.
That tiny difference isn't my problem.

My issue is playing piano in Logic and having to go into much high buffer times to avoid CPU spikes + click and pops.
 

kmaster

Now in LA: let's get coffee!
Have you tried Processing Threads - Automatic, Process Buffer Range - Small or Medium, Multithreading - Playback Tracks?

Or samples on an external SSD - that would certainly help.

And what's your interface (Input/Output device)? More often than not, the driver for the interface has a direct impact on how low you can comfortably set buffers.
 

JamieLang

Active Member
Do you understand EVERYTHING in the entire signal flow of that VI is put on a single core? that means if the VI is bussed to a "keyboards" bus...then to the master...and you sent it to a reverb...that's three aux busses whose DSP is ALL stacked on that core. So, put nothing on the master, and send it directly to that, with no reverb.

If you really just have that VI sent to an empty master, nope--that's all Logic can do with your given set of hardware. Yes--stand alone usually runs better than in a DAW without regard to OS or hardware, IME. In fact, I typically run Cantabile on the Windows machine for plugs that don't have stand alone (or where I need multi timbral sequencing from Logic)...on OSX, it is MY experience that both Studio One and Cubase did noticeably better than Logic with VI "latency under fingers"--I say it that way because buffers don't actually mean the same thing in the different apps...point is--on the same hardware they allow lower latency playing of a piano like Ivory.
 

johnbusbymusic

Musician/Composer
When running Kontakt 5 as a standalone, I can safely play with any of the native instruments pianos without going much over 10% CPU usage on my 2015 macbook pro. This is with the smallest latency of 32 samples, the memory server active and Kontakt optimised for my 4 CPU cores.

In Logic, however, I have enormous CPU spikes when loading an instance of Kontakt with these exact same settings . The only way I can avoid clicks and pops whilst playing is by putting my buffer above 64 samples, which is not what I want when improvising.


2 questions:

1) Are there any optimisations in Logic I could be overlooking?

2) Are there any hack-y work-arounds I could try?
Perhaps I could somehow capture audio and midi with a different application whilst running Kontakt 5 as a standalone?... I could kind of treat this like a little recording session, and then focus on editing my audio and or midi in Logic.
Are there any free apps that I could use to capture audio or MIDI playing virtual piano? I recently downloaded REAPER, perhaps it would be more efficient than Logic in this instance?

Thank you for the help!

Bonus facts!!!
16 GB RAM, High Sierra, latest version of Logic. Logic optimised for four cores. Large buffer range. 32 bit summing.
Samples are on the internal SSD, all instruments are batch resaved. I am so out of ideas.
William, if all you're doing is recording MIDI then bump your buffer range to large and the buffer size to maximum (in my case it's 1024 samples) and you should be good.
If you record audio only, then decrease your buffer size to 64 or the minimum.

Also, logic still has issues with multithreading kontakt multi's so just running a single instance of kontakt is always better
 

Nick Batzdorf

Moderator
Moderator
William, if all you're doing is recording MIDI then bump your buffer range to large and the buffer size to maximum (in my case it's 1024 samples) and you should be good.
If you record audio only, then decrease your buffer size to 64 or the minimum.
Either there's something new I don't know about or... wait, you run at a 1024 sample buffer?

The latency would drive me nuts - and I'm with Tack (I run Logic at a 128 sample buffer, but the difference between 256 and 128 is on the subtle side for me).
 

johnbusbymusic

Musician/Composer
Either there's something new I don't know about or... wait, you run at a 1024 sample buffer?

The latency would drive me nuts - and I'm with Tack (I run Logic at a 128 sample buffer, but the difference between 256 and 128 is on the subtle side for me).
yep, 1024 for me
the beautiful thing here is... "Capture Recording"
i hardly ever formally record a MIDI performance, i meant to mention that earlier
 
OP
William Palmer
Do you understand EVERYTHING in the entire signal flow of that VI is put on a single core? that means if the VI is bussed to a "keyboards" bus...then to the master...and you sent it to a reverb...that's three aux busses whose DSP is ALL stacked on that core. So, put nothing on the master, and send it directly to that, with no reverb.

If you really just have that VI sent to an empty master, nope--that's all Logic can do with your given set of hardware. Yes--stand alone usually runs better than in a DAW without regard to OS or hardware, IME. In fact, I typically run Cantabile on the Windows machine for plugs that don't have stand alone (or where I need multi timbral sequencing from Logic)...on OSX, it is MY experience that both Studio One and Cubase did noticeably better than Logic with VI "latency under fingers"--I say it that way because buffers don't actually mean the same thing in the different apps...point is--on the same hardware they allow lower latency playing of a piano like Ivory.
Honestly didn't know that. That would explain the CPU usage being super lopsided.

Have you tried Processing Threads - Automatic, Process Buffer Range - Small or Medium, Multithreading - Playback Tracks?

Or samples on an external SSD - that would certainly help.

And what's your interface (Input/Output device)? More often than not, the driver for the interface has a direct impact on how low you can comfortably set buffers.
I always record audio elsewhere, so I pretty much never use my interface when I'm working with midi.
I'll A B the performance on a library when using my external SSD. I like having 'my piano' just sat ready on my laptop for me to use though!


yep, 1024 for me
the beautiful thing here is... "Capture Recording"
i hardly ever formally record a MIDI performance, i meant to mention that earlier
Great advice - never knew about this feature!
 

Nick Batzdorf

Moderator
Moderator
yep, 1024 for me
the beautiful thing here is... "Capture Recording"
i hardly ever formally record a MIDI performance, i meant to mention that earlier
Sure, I use Capture Recording a lot too. That's a totally separate subject from latency, however.

Please try the following, John:

1. Set the I/O buffer to 256 samples (or 128, which is where I leave mine set).

2. Load a piano instrument in Logic and play.

3. Now set the buffer to 1024 samples and play.

I predict you will never set your buffer to 1024 again.
 
Last edited:

Nick Batzdorf

Moderator
Moderator
When running Kontakt 5 as a standalone, I can safely play with any of the native instruments pianos without going much over 10% CPU usage on my 2015 macbook pro. This is with the smallest latency of 32 samples, the memory server active and Kontakt optimised for my 4 CPU cores.
First, you can turn off the memory server. The macOS has been able to access all the memory you have installed for several years, so it's not necessary.

Anyway, Logic has a lot more going on than a stand-alone Kontakt does, so it stands to reason that it would use more CPU. I'd just run it at a 64 or better yet 128 sample buffer and not worry.

But if the latency does bother you - well, you're much more sensitive to it than I am, but if it does, then you could try running Kontakt stand-alone and sending it MIDI via an IAC bus from Logic.

Activate the IAC bus in the Audio MIDI Setup program found inside Applications->Utilities. Set up Kontakt to receive MIDI over the IAC bus, then use a MIDI track in Logic and assign its output to that IAC bus.

I think you won't notice the difference and it's more trouble than its worth, but it is an option.
 

Nick Batzdorf

Moderator
Moderator
By the way, what piano are you using in Kontakt?

I happen to have the full Quantum Leap Bosendorfer open inside Logic, with all three mic positions + ambience turned on. It's possible to make it crackle if I hold down the sustain pedal and play lots of notes with my forearms if my Mac is set to a 32 sample buffer. With 64 samples I *think* it crackled, but at my normal 128 samples it's not even an issue.

That's inside Play rather than Kontakt, but your computer probably has better single-core performance than my 12-core's, and it runs on a single core.
 

JamieLang

Active Member
So, also keep in mind the other sources of latency. Make a new project, not from any template you have set up...just "empty"...and add a Kontakt VI track with the piano and play. The latency causing plug ins you might have installed on, say the drum bus, makes the entire mixer, thus ALSO your live software piano that much more latent.

I don't want to rehash a novel about how compensation engines work, but....basically, anything you have inserted in Logic that takes 10ms lookahead will add 10ms to your live piano, TOO...and the more "fancy" and "Advanced" the (audio) plug ins you use the more and more it gets pushed out in time.

so, try the "new....empty project"...at the sample rate you would be running Konakt standalone at...see if that helps, too. The difference in THAT and K stand alone shouldn't be THAT different. IME, maybe one notch on the buffer belt, so to speak.
 
Top Bottom