Jump to content

midi latency at recording, not the average problem


Recommended Posts

What about drummer tracks? Doing a "bounce in place" on them doesn't put them early; the transients line up with the MIDI data (and the grid). Wouldn't "bounce in place" have to account for those different buffer sizes?

 

Drummer tracks are tracks with software instruments aren't they? The conversion from digital to audio in real time is not involved when bouncing in place, it's all in the DAW and the sound interface is not involved at all. The buffer size shouldn't matter in that situation.

Link to comment
Share on other sites

Just to clarify, your most recent video is not the same result as you had with external midi track. In the external midi track example...the audio recorded into the region early. In the external instrument plugin example, it recorded to the region late.

 

Secondly, to be clear, LogicPro has a number of design flaws and bugs related to latency management. You get no argument from anyone on this forum in that regard. But also I can say that quite frequently people are not understanding how LogicPro works and they could work with it or around it. So no, its not obvious to me that this is for sure a bug yet. I told you already some things that have been determined already which might help you to figure out if you can get it working.

 

I would need to try to setup an external synth and replicate your problem and try various different work arounds in order to understand what may or may not be happening. Right now my studio is being relocated to a new condo which is being renovated, so I don't have any external synths hooked up to try to find a work around for you.

 

Also, I happen to be recovering from a ski injury, which has been getting worse lately, I just had an MRI and might have to get back surgery actually...so I can sometimes not sit at the computer for more than a few minutes at a time.

 

Pay attention to what I said about external tracks being different from external instrument plugin. Also pay attention to what I said about how Logic will register audio when it thinks you heard it, not when it received it. Also keep in mind that audio tracks know NOTHING about the grid. They only know about currently known latency and they make a calculation to record the audio where Apple thinks you intended it. This may or may not make sense while trying to bounce an external midi instrument..I totally get what you are trying to do...don't shoot the messenger, I'm just trying to tell you what I do know....if you can't get it working, then file a bug report.

 

Also you seem intent on using direct monitoring and that is fine, I totally understand why you want to use that...but it may be that you will need to use direct monitoring while recording the midi track and then go back to software monitoring while bouncing the audio...something like that. I'm just guessing now because I don't have an external synth available to test any more theories any time soon.

 

I might have an old drum machine laying around here somewhere if I can find some time and deal with the pain long enough to try some things I will let you know, but don't count on it.

Link to comment
Share on other sites

Drummer tracks are tracks with software instruments aren't they? The conversion from digital to audio in real time is not involved when bouncing in place, it's all in the DAW and the sound interface is not involved at all. The buffer size shouldn't matter in that situation.

 

As long as they are software instruments the latency compensation should take care of it. But once you do a "bounce in place" they become audio data and then would theoretically also have to be moved to an earlier point to effectively stay at the same position (if Dewdman42's theory/explanation is true).

Link to comment
Share on other sites

Putting more thought into the above, there are actually two things different between the audio early and audio late results. In the first example you were recording the audio direct to an audio track. In the second example you used the external plugin, but you also routed that through a BUS instead of recording direct to audio track.

 

So a third use test would be to use external midi track, but bring the audio back into the logicPro mixer via AUX channel first, bus that to audio track. I'm betting the result of that will be same as the external instrument plugin example............late...

 

The reason being that by using an AUX for taking the input from the sound card, LogicPro presumes its not going to a region and doesn't offset it earlier.

 

lateness can be explained by the fact that the midi has to go out the interface over a cable into your synth midi input before generating audio. That audio also has to come back in through the audio interface too which isn't being corrected since coming in to AUX instead of audio track.

 

That doesn't really fix your need to bounce from external, but may help you understand what is going on.

Link to comment
Share on other sites

Also pay attention to what I said about how Logic will register audio when it thinks you heard it, not when it received it. Also keep in mind that audio tracks know NOTHING about the grid. They only know about currently known latency and they make a calculation to record the audio where Apple thinks you intended it.

 

Which raises another (interesting? well...) question: Where do we manually position audio data?

I'm thinking of post production situations: Do we put the audio at the actual SMPTE position or do we have to factor in the buffer size? The latter would strike me as rather odd because this type of compensation should really be the job of the software itself. AFAIK MIDI events will show up at the same SMPTE position regardless of buffer size.

Link to comment
Share on other sites

Dewdman42, sorry to hear about your accident. Thank you for taking the time to help me anyway and I hope you will feel better soon!

 

About not getting the same result when recording with a software instrument track and an external midi track, that's very well spotted! I did indeed miss that.

 

When I record the audio on a regular audio channel it ends up BEFORE the midi as opposed to when I record it on an audio channel that gets fed by the bus from a software instrument track with an external instrument plugin. It's the same result when I bus the audio from an external midi track with an external instrument plugin.

 

To verify that the difference is on the audio side and not the midi side I hooked up my octatrack sequencer. That way I can send midi signals to Logic on the exact time every attempt. That shows no difference in the midi recorded between using an external midi track and a software instrument track with an external instrument plugin on it.

Link to comment
Share on other sites

I did find this manual page which says something interesting:

 

https://support.apple.com/en-us/HT206774

 

This would imply that with the external instrument plugin, when you check that auto compensation checkbox, what it does is to delay the midi being sent out, so that it will match the delayed audio of the project through your sound card.

 

Not sure if that is working properly or not, but the point is that LogicPro does sometimes change the timing of midi... For example if you have a midi region feeding a channel with latent plugins, LogicPro fees the midi from the region EARLY to the the instrument channel so that the result will be sync'd up. In this case, this particular ext inst plugin will delay the midi so that the outgoing midi lines up with the audio that is delayed due to large buffer.

 

Now that makes sure the audio you hear through the external monitoring will line up with whatever is coming through the project, but the question is how to bounce this to an audio region

 

This manual page seems to imply if you are bringing it back in through AUX channel, then don't use auto-compensation checkbox. That lines up with what I have been saying, the Audio track registers incoming AUDIO early, attempting to compensate for sound card input latency. AUX input assumes no region and does not change anything.

 

In any case there could be a bug here or it could be a matter of trying all the combinations until you figure out which combination will work for bouncing from external midi instrument.

 

Apple seems to imply this should work, but its entirely possible they haven't thought it all the way through for the bounce situation...because for bouncing you kind of need the output midi delayed to match up with whatever else is playing back in your project through the latent sound card, but while bouncing you need to be able to register it neither early nor late.

 

there is one scenario I can think of to get it working but not ideal.

 

Use the external instrument plugin

 

on the same instrument channel, also put an instance of Expert Sleepers Latency Fixer plugin (its free).

 

Bounce it in via AUX channel so that its coming into the region late.

 

Use latency fixer to manually set the amount of latency that is being caused by the trip over midi cables to the synth and back in through the sound card. That will cause midi events on the region to be fed early to the ext inst plugin...which will go out early to your synth and back in through and should bounce exactly on time, once you get LatencyFixer set to the right value.

 

The bummer is that when you change the audio buffer size, you'd also have to manually change the value in latency fixer.

 

That's all I have right now as a work around...and unless I get drum machine or something to try stuff out...I can't think of anything else.

 

Its entirely possible Apple has a bug here or design flaw, but I suggest you try to identify EXACTLY what the problem is or it will be ignored, and might be ignored anyway, but its always worth a try. I agree that it should be obvious that people want to use external midi instruments and it should not be such a stretch on the brain to figure out how to bounce an external midi instrument.

Link to comment
Share on other sites

Ok I found a drum machine. I achieve an accurate bounce, as I explained above..here are more explicit instructions in case you want to try it:

 

  1. Set up an instrument track, with the External Instrument plugin on it, Assign its input from the audio port where audio is coming in.
     
    1103024484_ScreenShot2021-05-22at2_47_47PM.thumb.jpg.667f374c8bd9fd1ad17179356964d01c.jpg
     
     
  2. Note in this mode the auto-compensation checkbox can not be disabled.
     
     
  3. Setup an AUDIO channel to record the bounce. Use Bus1 as described earlier to route the audio from the inst channel to the audio channel:
     
    1058570950_ScreenShot2021-05-22at2_50_11PM.thumb.jpg.c27a67358e2804620d783e286dce94ac.jpg
     
  4. Get Expert Sleepers Latency Fixer. Add it to the instrument channel. Set its value with the seconds slider to be equal to the latency reported by your sound card. Note that this plugin has a little menu where you specify either samples or seconds..for which slider to use, and for some reason I am finding they are backwards??? Not sure, anyway I had to set it to samples and use the seconds slider, but anyway, I don't know if that is a problem with my system or something in the plugin, because I don't remember having to do that before. Just an FYI
     
    618116472_ScreenShot2021-05-22at2_53_10PM.thumb.jpg.be2d2c33ae09eb2ccfc1ac8212de55f3.jpg792580237_ScreenShot2021-05-22at2_53_18PM.thumb.jpg.21aca81c9040110d892fdcf81ebc8ca2.jpg
     
     
  5. Now do the bounce. For me it lines up
     
    364200717_ScreenShot2021-05-22at2_54_03PM.jpg.d9350477f28e60e23b3e76fb0ef055f8.jpg

 

As I said above, if you change the size of the audio buffer you'll have to manually change the value set in LatencyFixer. We are manually compensating the sound card latency since LogicPro appears to be not working right for this use case.

Link to comment
Share on other sites

You are sending midi clock or another midi signal from Logic to the drum machine and then recording the audio from the drum machine, right?

 

Its nice that you came up with a solution. Thing is I already came up with another solutions in earlier posts. Enter midi delay in the settings, you have to tweak it manually to fit the delay caused by the buffer setting and latency inducing plugins.

 

The thing that remain unsolved is sending both midi and audio to logic. Can your drum machine send midi?

Link to comment
Share on other sites

A few more general comments

 

  1. The auto-compensation checkbox is definitely useful while you're working pre-bounce. If you have a larger project with a lot of other tracks, some of which may have plugins with latency...that checkbox will make sure that the midi sent from this plugin will be delayed to match the delayed audio. It is not clear to me whether this checkbox accounts for sound card latency or not... Might not be, which might be part of the problem we're having here. But still generally if you are working on a larger project you are going to want the midi delayed to match whatever else the mixer might be doing, if for example you have a latent plugin on an AUX channel, then all audio will be delayed even more then the sound card...and you want the midi delayed along with it. This is one strong reason to use the External Inst plugin rather then an external midi channel.
     
     
  2. Audio tracks record the audio offset early according to the known input latency of the sound card when they are fed directly from an audio input (but not when receiving indirectly through a bus). That is generally desirable behavior when recording normal tracks, like vocals or whatever, but in this case for bouncing, its not, so use AUX/BUS indirection in order to avoid that while bouncing to a region.
     
     
  3. Another possible solution would be to use the midi delay parameter of the midi track to offset the midi track, instead of LatencyFixer in combination with the AUX input trick. I'm not sure exactly the best approach right now. Part of the challenge is figuring out a solution so that playing back tracks while using the external midi device as a sound module, will be in sync, and bouncing will also be in sync..without having to change anything..and also as you add plugins to the project on AUX or MASTER channels...these could create timing problems so you want to only have to update that delay value when the audio buffer size is changed, never for any other reason. I'm not sure whether it makes sense to use a negative-delay with AUX for taking the audio in...or positive delay in combination with AUDIO input, but almost certainly it makes sense to use the external instrument plugin in order to at least automatically compensate for plugin latency.
     
     
  4. I think probably Apple has overlooked sound card latency when using the External Instrument auto-compensation checkbox, which is why we have to do this little tap-dance to get accurate bounce. If the outgoing midi from the ext inst plugin were delayed to match both sound card and plugin latency, then when bouncing directly to an AUDIO track it should work out in sync instead of early. Write to apple about it.

Edited by Dewdman42
Link to comment
Share on other sites

You are sending midi clock or another midi signal from Logic to the drum machine and then recording the audio from the drum machine, right?

 

no absolutely no midi clock. I am not trying to synchronize two seperate transports. nor should you be.

 

Its nice that you came up with a solution. Thing is I already came up with another solutions in earlier posts. Enter midi delay in the settings, you have to tweak it manually to fit the delay caused by the buffer setting and latency inducing plugins.

 

As I just said, that will work too. but that may or may not result in you having accurate sync during playback when you are trying to listen to many other tracks playing with plugin delay, etc..and wanting your external keyboard to be sounding in sync with them. for that the amount of delay needs to match the sound card delay as well as various AUX plugins you may have. The External Inst plugin auto mode will handle that part of it, but not sure about the sound card part of it.

 

I am tired of arguing with you, so this is my last post on this thread. good luck.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...