Jump to content

Anyone experienced weird playback timing issues?


des99

Recommended Posts

So this is a weird one I've not had before. I'm breaking out an old LP7 project in 10.5.1. It has MIDI + audio, tempo changes, no flex or any stretching, barely no CPU/disk resources used. (This is not plugin related, there are very few plugins used, not on busses or the master - I'm just prepping this old project at the moment. Low latency mode etc makes no difference).

 

As an example of what's happening, I have a MIDI track of drums, along with a previously rendered audio bounce of the same part. Both align perfectly to the click, and in this example, I'm hard panning the audio left and the MIDI part right so I can more easily see when there are differences in timing.

 

1656482055_Screenshot2021-01-16at19_24_31.png.e02412df6cbba7bac9b20048a00cf00b.png

 

Up to around bar 67, we have a drop out and there are tempo changes that slow down, before ramping back up at the end for the final chorus (bar 75).

 

If I start playback at say where the playhead is in the screenshot, playback is fine - both drum parts come in where expected and align perfectly to the click, and everything is in time (including other audio tracks - guitar parts etc).

 

However, if I play through the middle section (ie start playback at, say bar 66), then when the parts kick back in at 75, the timing is off slightly between the MIDI/click and the audio - the audio is being played slightly faster than it should be (it should be tight to the click) - so the audio drifts compared to the MIDI (which gets worse the further playback goes). Very weird. I'm not sure how off they are, but I'd say probably something like 40 ticks of so within the first few bars of the end section - enough to be noticeably out of time with the click and by the end, almost half a beat off.

 

The upshot is that if I playback the song, the end sounds a horrible out of time mess unless I just resume playback from midway, in which case it's all in time and sounds fine. The end results *should* be the same regardless of where playback is starting.

 

I've sort of explored all I can think of, maybe someone else has an idea or has experienced something similar - if you have any suggestions, let me know!

Link to comment
Share on other sites

Hmm, there's another section during tempo changes that the click/MIDI drifts from the audio, and then comes back into time about 10 bars later.

 

Both of these timing problems occur over a period with a longish tempo ramp - if you resume playback in the middle of that tempo ramp (after the start tempo node of that ramp), it seems stuff stays in time, but if you resume playback *before* the start node of the tempo ramp, things will be out of time by the end.

 

It's weird, seeing as whatever bar position you are at, the tempo *should* be the same regardless of where you started playback, and the audio trigger position should be the same too, so there should not be timing differences depending on where you resumed playback...

 

I'll continue to play with it and see if I can find something to influence this behaviour. I can't just edit the tempo tracks when the results change depending on where you started playback from. I do want to use the MIDI+audio parts on this track though, so I need to find a workable solution that remains consistent...

Link to comment
Share on other sites

So, I imported the MIDI drums and the audio drum bounce, and the tempo track into a new project.

 

The weird timing behaviour continues. Interestingly enough, I can confirm the timing behaviour above (when playing through the middle section, the audio bounce and MIDI drum parts end up out of time) - but if I leave the MIDI drum track (which is a Kontakt in this instance) in *live mode* (ie, with the track selected) - the timing will *always* be good, regardless of where playback starts from.

 

So, will experiment with buffer sizes next to see if they make a difference (I'm running 128, medium buffer range)...

 

Edit: So buffer sizes etc made no difference to this behaviour. The one setting though that *did* I tried because the timing seemed better when the MIDI drum track was in Live mode - the "Multithreading" option was set to "Playback & Live tracks". I changed this to "Playback tracks", and now, the timing seems more consistent regardless of playback position or selected track, like I'd expect. It's still not perfect - the timing between the two tracks when played through is still a little off when played through the tempo changes, verses starting playback right before the regions where the timing is absolutely solid.

 

I'm willing to expect that perhaps the tempo changes won't phase align with the original bounce as maybe Logic's timing engine is a bit more precise now - but this doesn't explain why the timing differs depending on the start position, because there should be no reason for this. The audio bits output should be the same at 75 1 1 1 regardless of whether we started playback at 74 1 1 1 or 64 1 1 1.

 

(There's nothing SMPTE locked or anything either...)

Link to comment
Share on other sites

A quick demo video so you can see/hear what I'm experiencing:

 

Top (green) track is audio bounce of drums, lower (blue) track is MIDI drums (Kontakt).

 

I start in my normal Multithreading: Playback & Live tracks, and play through (sped up to avoid the blank middle bit) - you can hear just how out of time the two drum parts are after the playthrough over the tempo ramp.

 

If I start playback manually just after the tempo ramp, the two tracks are played in sync - and this also happens if the MIDI drum track is selected (live mode) - which is not shown in the video for brevity.

 

I then switch to "Playback tracks" multithreading mode, then play through the tempo ramp, the two drums tracks are much closer in sync (although still not as tight as manually starting playback just before those regions.)

 

Weird stuff. Why is the timing of these parts varying depending on the multithreading mode, and where playback is started?

 

https://www.dropbox.com/s/k5rhsyif7jhz72v/logic_timing.mp4?dl=0

Link to comment
Share on other sites

13268679_Screenshot2021-01-17at11_56_00.png.c84a9d39917545b95ea27ce4e2303f3f.png

 

Even with a contiguous audio region, the tempo varies depending on the "Multithreading" audio preference.

 

When set to Playback, the audio and MIDI sync up perfectly.

When set to Playback & Live, the end of this audio track is out of time with the MIDI/grid, meaning it's tempo is being played very slightly differently.

 

Very odd!

Link to comment
Share on other sites

Interesting problem, des, I've not seen this before. Have you tried starting with a clean LPX project, creating some tempo changes and some MIDI parts, bouncing those to audio, and see whether this weird timing glitch can be reproduced there (ie, not based on the tempo data etc of the older project)..?
Link to comment
Share on other sites

So, I created a similar new project from scratch, MIDI drum track, tempo change section, more drums, then bounced those out and re-imported to compare.

 

With Multithreading set to Playback only, it seems pretty solid - the MIDI + audio panned left and right maintains solid cohesion.

 

*However*, when Multithreading is set to Playback & Live, the timing cohesion is lost, and you can hear a marked delay between the MIDI and audio - again, only when you play through the tempo change section, and when there are still tempo changes occurring. And once the tempo changes are over, it goes back to being solid too.

 

If you start playback from just before the second part starts (even when there's still tempo changes happening), it's solid, so we only lose timing when there's been some previous tempo change activity.

 

So there seems to be an issue here related to the accuracy of tempo changes, in conjunction with the multithreading mode, that's causing a loss of timing accuracy.

 

My takeaway is that if you are using MIDI + audio, and some tempo ramps/movement, do not use the multithreading mode "Playback and Live tracks".

 

So for now, I will see how the multithreading mode set to Playback only works for my original project..

 

(Additional info - I was still getting this behaviour in 10.4.8 as well as 10.5.1. And the timing problem with this new project is nowhere near as bad as it is in the original source project - but I didn't recreate the previous tempo changes exactly, so difficult to say, but my guess would be it's probably related to a change in timing accuracy and tempo change events from earlier Logic versions compared to recent ones.)

 

If anyone is interested, I can set up a sample project for you to download and try on your own systems to investigate or verify.

Link to comment
Share on other sites

So, I'm using playback mode, and while the playback timing does shift and go out, it's not as bad as playback & live mode. But it does indeed still audibly and significantly throw the project out of time when played through the tempo changes. I'm having to work with it as it is.

 

*Thankfully* bounces appear to not be affected by this playback timing bug - full bounces stay in time properly, even when bounced from the beginning. (I was worried that I'd literally have to bounce out sections of the song and then edit them together afterwards, but this doesn't appear to be necessary.)

 

Frankly, I'm a bit surprised no-one seems to care about this pretty significant problem, as it's easy to replicate...

Link to comment
Share on other sites

A similar bug emerged in 2016 during the shift from Logic 9 to Logic 10. Tempo changes introduced a cumulative playback lag in MIDI tracks that became obvious in 60-90 seconds, depending on the number of tempo changes introduced. If you stopped playback, everything was reset, and normal playback resumed. The delay ONLY became evident after the timing errors accumulated during uninterrupted playback. The bug was bad enough that I went back to Logic 9 until it got corrected, too. I discussed it with Eric Cardenas, who forwarded a bug-report directly to the Logic team. I was subsequently contacted by that team, supplied what they needed to reproduce that bug, and it was squashed in the next update. If this bug has the same origin, then disabling Live Playback threads should lessen its impact on you until it is also fixed. If Eric is still around, I'd definitely recommend contacting him with the details. Hope that helps.
Link to comment
Share on other sites

Thanks for the post, that's interesting. I appreciate the feedback.

 

Disabling Live multithreading mode does indeed lessen it's impact, as I discuss above - but doesn't fix the issue altogether.

 

I'm not sure whether the MIDI stuff is delayed and the audio plays fine, or whether the audio is the problem. The MIDI stays rock solid to the metronome/click, and the audio plays faster - but if it's the MIDI timing that is off, it's possible that it's making the click itself be off too, and the audio playback is ok. But what you describe certainly sounds suspiciously like, or at least related to what I'm seeing here.

 

I'm not sure whether Eric hangs out here these days...

 

(And of course, even a bug fix won't help me in this particular case as there are no more bugfixes for the pre-10.6.x branches...)

Link to comment
Share on other sites

Related threads (incuding Homina's):

viewtopic.php?f=1&t=130813&p=668198

viewtopic.php?f=1&t=127538

viewtopic.php?f=42&t=129928

viewtopic.php?f=1&t=129950

 

I took a look at this issue and have found a pretty severe bug related to realtime MIDI playback and tempo changes.

The condition is worsened by using the Multithreaded preference: Playback & Live Tracks.

 

The Multithreaded preference Playback Tracks starts to behave erroneous at about 200 tempo changes.

The Multithreaded preference Playback & Live Tracks starts to behave erroneous at about 100 tempo changes.

 

Audio is not affected.

Offline accuracy is not affected.

Link to comment
Share on other sites

A bit more investigating, and it *is* the same issue as described above. It's Logic's grid during playback that gets incorrect after a bunch of tempo changes - the audio is playing at the normal, correct rate, but Logic is playing it's own time reference wrong, so any MIDI tracks (that follow Logic's grid) will be off compared to the audio.

 

I offline bounced out the click (this timing bug doesn't show up in offline bounces), so I had an audio version of the click I could compare to Logic's internal click. The rendered part always stays in time with the other audio. But after the tempo changes are played, the Logic click does indeed sound off compared to the bounced audio click - and the MIDI is following Logic's click.

 

The workaround is to bounce/freeze MIDI parts where possible, so that stuff is fixed to audio and thus won't drift.

 

(It's a pain when working with multi-output drum instruments with various bus/FX routings as you can't freeze them, and I'm still at a stage where it's convenient to edit the MIDI as required, so I'll just have to workaround this. It's also a pain at the composition stage when you need the MIDI working...)

 

So it doesn't look like this bug was ever actually fixed (and none of the above posts indicate it was fixed). Eric just leaves with "try and not use so many tempo changes" and hope you avoid this bug. But Logic not managing it's own timing correctly during tempo changes is a pretty big one, and it seems it's been there for some time. If you only use a handful of small tempo changes, you probably won't run into it, but if you start using tempo curves, which generate a lot of intermediate tempo positions, you will...

Link to comment
Share on other sites

Des, I'm sure your monologue of inner voices is fascinating, but TL;DR, sorry.

 

Heh! ;)

 

Most of the above stuff is me trying to work on out my own what the hell was going on. Now we know, so it's not necessary to read that stuff anyway.

 

There was (is?) a problem with curved tempo changes which is not there when the tempo gradient is approximated with several smaller stairstepping ones. Perhaps you are experiencing this ?

 

Looking at the previous posts on this issue, it seems to be related to the number of tempo events - and using curves generates many more tempo events than just a few points, so it exacerbates or triggers the issue. The problem seems to be a compound timing innaccuracy that kicks in after a lot of tempo events (numbers suggested above).

 

I do have curves in this project, as it came from a time (LP7) where this bug didn't exist and using tempo curves wasn't a problem.

 

However, all the audio was originally recorded to this tempo map, so I can't change it for sync reasons.

Link to comment
Share on other sites

  • 1 year later...

I have random timing issues with songs I recently worked on - nightmare - but I may have just solved by 'Apply Project Tempo to Region and Downbeat' from control menu - apply to all audio files possibly? Why why.....ALSO the issue is not just timing - the Audio files appear to be De-tuned - like a tape machine. slowed down

 

OK not a complete fix - some Audio files don't respond......

Link to comment
Share on other sites

  • 4 weeks later...

Hi ... forgive me, but I'm a newbie with Logic and don't have too much time to dig deeper ... but I had a very similar experience working with an imported click track containing lots of minor tempo changes, and one major slow-down towards the end of the song, going from around 100bpm to 60bpm in the space of a few bars. Recorded MIDI was OK until the section where the tempo dropped to 60bpm in several steps, at which point playback was all over the place.

 

The thing I noticed, however - and forgive me if this is a schoolboy error - some of my sloppy playing had resulted in MIDI events lying across the points where the tempo track was reducing tempo. As soon as I nudged the events to be cleanly one side of any tempo step change, the whole thing got better.

 

Not sure if this may be part of the original reported issue, but possibly worth looking out for :-)

 

ps another behaviour that emerged when trying to figure this out - I set the offending region on a playback cycle, to try and tweak events. After several cycles of playback, the audio finally gave up. I had to restart Logic to get audio working again. Almost like a 'memory leak' sort of behaviour. Curious.

Link to comment
Share on other sites

  • 6 months later...

Hi Des

I'm having very similar ussues. I have recorded logic playing it's midi tracks and a click track, made by Logic's Klopfgeist. When I stack them in Qlab they don't match - they are adrift by 4 10ths/second.

I also imported several audio tracks - sent by various people to compile a single project - the audio files were all adrift from eachother.

 

I have not been able to solve the issues

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...