Jump to content

External Midi Instrument delay


revolucian

Recommended Posts

So I have an external G5 running Plogue Bidule and some Kontakt Players loaded in it.... I determined the buffer in Plogue had to be set up to 1024 to avoid any crackling

 

With the buffer so high, actually recording anything rhythmic to these tracks directed to this external G5 is pretty impossible.

 

Also, playback is not lined up with my internal instruments. Obviously, there needs to be some sort of delay compensation that is universal for everything playing on my external G5, but what is the best way to do that?

 

So I guess i have three questions:

 

1. Is a dual 2.5 G5 with plenty of memory just not powerful enough to play back without a big (1024) buffer? Is it a Plogue issue?

 

2. What is the best way to compensate for this delay when the audio returns to my main mac it's at least a quarter of a second off. Is there some sort of anticipation I can program to the multi-instruments in my environment so that it does delay compensation for all things going to this? Or am I supposed to do it track by track?

 

3. also.... when it's an external instrument? what's the best way to determine the delay compensation amount? trial and error?

 

____________

Quad 2.66 Mac Pro

9GBs RAM

Mac OS X 10.5.6

Logic Studio 8.0.2

Apogee Ensemble (audio interface)

Link to comment
Share on other sites

Get ready for a long reply! 8)

 

Every MIDI device is going to exhibit a different amount of delay in response to MIDI data. The delay will vary depending on the amount of data being sent to the unit as well. Even a series of quarter notes, hard quantized, will never play back exactly in time with the metronome. Even if it's a millisecond or two variation, that variation will always be there. There is no way around that.

 

As an aside... Before the days of plugs where external MIDI was the only kind of MIDI gear, one of the boons of Logic (and even Notator back in the day) was the ability to delay individual tracks or even whole instruments using the realtime delay parameter. Without that, it would have been impossible to get drum tracks played from multiple MIDI synths to groove right, as an example. That's because of this non-standard amount of processing delay that each synth exhibits.

 

That parameter is still available (per track and per instrument. Their settings are cumulative). This kind of compensation is still necessary, because nothing about MIDI has changed since those days. The only thing you can do to compensate for the delay between different instruments' response time and the absolute position of a beat is to do some experiments and figure out what the delay value is for each piece of external MIDI gear you have.

 

I agree that some kind of internal delay compensation is needed in Logic to compensate for timing response at varying buffer sizes. Conversely, it's my inclination to think that it might be technically impossible to accomplish this, given that Logic doesn't use a dedicated audio interface, and different manufacturer's interfaces exhibit varying degrees of inherent latency.

 

That being said, I did some experiments in response to your post. It's something I've always been curious about myself but never bothered to test until now. However, I've been aware of this phenomenon for a long time -- the larger you make your buffer size, the larger the deviation in timing there will be in playback of MIDI instruments, and, possibly, automation data as well. But I'll leave automation out of the picture for now.

 

So, to the tests... I recorded 4 quarter notes, hard quantized them, and had them play by a percussive synth sound on my NordLead 2. Tempo was 120 BPM. Then I recorded the audio from the Nord 8 separate times to see how much variation there would be between takes. Here are the results, showing the first recorded note of each take:

 

Buffer Size = 32

As you can see, I'm zoomed-in to the sample level. Note the position of the left locator --- it's set to 1 tick before the downbeat (at bar 2). Timing is rather tight and consistent, averaging about a 1/2-tick deviation between takes. Very nice!

http://www.score2picture.com/logicpix/nord1.jpg

 

Buffer Size = 256

As you can see, a dramatic difference... Still zoomed into the sample level. Forgot to include the transport in this shot, but the playhead is positioned 13 ticks before the downbeat at bar 2! Notice also how the timing alternates between two distinct positions amongst the takes. That's a bit bizarre... But even more importantly, perhaps, the timing of the MIDI synth is EARLY compared to the downbeat.

http://www.score2picture.com/logicpix/nord256.jpg

 

And now for the killer...

 

Buffer Size = 1024

It wasn't possible to zoom into the sample level to see the start of the waveforms and the downbeat at 2_1_1_1 because the deviation is so vast. In this case, the audio is 76 ticks early.

http://www.score2picture.com/logicpix/nord1024.jpg

 

But you don't need me to show you graphics and do calculations. You can hear the result plain as day... Just do what I did -- set up a quantized part playing a tight short sound on external synth, set your buffer to 32, and play it back with the metronome on. The timing will be tight. Now, change the buffer to 1024 and hit play. The metronome will flam with the synth!

 

Now, things go from bad to worse.

 

Still at the 1024 buffer size... At 120 BPM, 76 ticks = 39.58 milliseconds. So I set Logic's All Output MIDI Delay (MIDI prefs) to 39 milliseconds and hit play. Expecting that the Nord would now play in time with the click, I was summarily disappointed when I hear the first note flamming with the metronome. But subsequent notes were tight with the click.

 

Now, that was on the first playback. I hit stop and then hit play again. This time, ALL notes flammed with the click. Several more tests of this kind reveal that there is absolutely NO consistency in the timing. Sometimes playback will be tight, other times barely out, other times flamming wildly.

 

My conclusion here is that (on my system anyway), the All Output MIDI Delay should definitely NOT be used to compensate for change in buffer size.

 

But then there's more bad news...

 

As an alternative to using the All Output MIDI Delay, I chose to zero that parameter out and use the track's realtime MIDI delay to compensate instead. Unfortunately I got the same result: no consistency in the timing upon repeated playbacks.

 

Perhaps you can try these simple tests yourself; if you get the same result, at least you'll know that you won't need to chase your tail to get timing accuracy. The solution will lie with smaller buffer sizes and some other way of achieving playback of the sounds you need which you're currently hosting/playing from Plogue.

Edited by ski
Link to comment
Share on other sites

ski,

 

regarding the picture with buffer size 1024: does it mean that variation amongst different takes is in the order of 20-30 ticks? If so, how could this be explained? I would think that latency for a specific buffer setting is constant..

Link to comment
Share on other sites

regarding the picture with buffer size 1024: does it mean that variation amongst different takes is in the order of 20-30 ticks?

 

Yes. Could be as high as 35 ticks off (going by eye off of my screenshot).

 

If so, how could this be explained? I would think that latency for a specific buffer setting is constant..

 

Just like you said, latency for a specific buffer setting is constant. All in all I can't explain this situation. If I have time I'll do another test, this time with a ROMpler (just to get more consistent-looking waveforms) and see what happens.

Edited by ski
Link to comment
Share on other sites

BTW, what audio & MIDI interfaces do you use?

For testing I've just used another Mac as external device, like this

 

Mac1 --- (built-in MIDI network) ---> Mac2 --- (built-in Audio) ---> Mac1

 

I suspect the problem in Logic is due to the 'magic' delay compensation (which puts the audio early).

Quite interesting that it doesn't even seem to work reliably with built-in audio.

Link to comment
Share on other sites

Fred,

 

Wow... just... wow... :cry:

 

I just did another small battery of tests, this time with a JV2080 (rompler, very consistent attacks because sounds are sample-based). Same procedure, i.e., quantized quarter notes:

 

@ Buffer = 64, very consistent, tight results, all recorded transients within 1/2 tick of the beats

 

@ Buffer = 1024, very inconsistent timing. Over 5 takes, the timing of the audio was late for four takes (different result than with my NordLead test), with one take being early (per the NordLead test). The timing difference between the earliest and latest takes was 37 ticks. See screenshot:

1248322219_Picture7.jpg.a97caf1e7907f5492c3c340780f6e7c3.jpg

Link to comment
Share on other sites

This does not present a pretty picture at all...

 

Gonna test things out with plugins as well to see where the tipping point of acceptability is on my system with respect to buffer size, if at all. After that, automation accuracy. And after that, if I can stand to do it, audio region accuracy. Stay tuned.

Link to comment
Share on other sites

Just wanted to mention that the inconsistent timing also happens when using a software sampler as 'external instrument' on the same computer. So I've tested the following configuration which is often used to overcome the RAM limitation of Logic.

 

Logic ---(IAC Bus)---> Kontakt ---(Soundflower)---> Logic

 

It turned out that the timing variation of recorded audio was around 25 ticks at 120 bpm (which is more than 10 milliseconds).

The test was done with I/O buffer of 512 samples.

 

I've also checked that the variations are not caused by IAC or Soundflower since the same configuration exhibits consistent timing when using another DAW instead of Logic.

Link to comment
Share on other sites

  • 1 month later...

Expermiented same stuff yesterday.

No way to compensate the delay

.

 

Funny things is that the external audio is recorded EARLIER. Latency is supposed to put things later, right ?

 

When trying with no latency mode OFF, it was recorded LATER.

 

Trying to change the overall MIDI delay, just did some very random results.

 

I'm very pissed off. We finished recording and place audio by EARS. Not very professionnal.

 

Question ; Is there any DAW stable with external MIDI, with NO latency issue ?

Link to comment
Share on other sites

  • 2 weeks later...

I've known about this for ages and been asking all over this and other forums with no response. So now we all know it doesn't work, I have one question:

 

1. HOW THE FCUK IS EVERYONE WITH EXTERNAL MIDI INSTRUMENTS ACTUALLY USING THEM WITH LOGIC?

 

I mean, are ALL logic users 'in the box' or what??? If you have MIDI hardware, you can't use it with logic...surely this is bigger than when Warburtons released the first sliced loaf? But no'one really talks about it.

Link to comment
Share on other sites

must admit i never tried such ridiculously low buffer settings, i'll give it a go, but what a chore having to change buffer settings all the time, you have to reboot logic each time you change buffer settings ffs!

 

and why isnt everyone up in arms about this? this is way bigger than when steinberg released SX then another chargeable upgrade about a week later, or when Waves introduced their 'WUP' policy??

Link to comment
Share on other sites

I've settled on a method that gives me a good compromise.

 

Settings:

Buffer 256

Process Buffer Range: Small

 

Using the External Instrument plug-in on an instrument track, assign this instrument channel to a bus and pick it up on an aux. Go through the real time bounce routines to determine the ballpark delay. Insert a Latency Fixer plug on the aux channel that the instrument channel is feeding. Don't put it on the Inst channel as it won't do anything there. Set the Latency to the figure you determined. Bounce again and see how they line up. I like to pan the Inst left an the audio right and check it in the sample editor to see the delta. It might need a little tweaking in so bounce a few times and check it.

 

It's not perfect, but at these settings I can maintain a +/- 4 ticks variation from bounce to bounce. Close enough for jazz.

 

Anyway, once I have that setting for that particular external instrument I save the aux channelstrip setting and name it after that instrument and buffer size. Then I can recall that every time I use that external instrument. This is working pretty well for me.

Link to comment
Share on other sites

must admit i never tried such ridiculously low buffer settings, i'll give it a go, but what a chore having to change buffer settings all the time, you have to reboot logic each time you change buffer settings ffs!

 

You do? On both Logic 7 and 8 you can change the buffer size, click "apply changes" (or close the prefs window -- L8 ) and Logic will do a 'warm restart' -- your song remains loaded, Logic just goes through the motions to change the buffer size, etc.

 

and why isnt everyone up in arms about this? this is way bigger than when steinberg released SX then another chargeable upgrade about a week later, or when Waves introduced their 'WUP' policy??

 

I daresay because even if people did complain, Apple wouldn't acknowledge the problem anyway. The only time I've seen Apple sit up and take notice was when PPC Quad owners raised a serious stink on the Apple/Logic forum when it was discovered that Logic 7 only ran on 2 cores of the Quad. OMG was there an uproar! And, if memory serves, just a few weeks later Apple released a new version that addressed the problem.

 

There are many serious bugs in Logic which should have received equal fix-it treatment but haven't, including the fact that Logic can't playback MIDI tracks correctly when playback is initiated from a downbeat (a problem with note chasing). Can you imagine -- a sequencer which won't playback a passage correctly from any given downbeat? Well, that's Logic for ya. Problem's been around for YEARS, still no fix. Anyway, having seen what it took to cajole Cupertino into fixing the Quad problem (including a lobbying effort to get people to call Apple Customer Relations and complain), it just takes too much time and effort. Apple doesn't do communication, so even when people complain there's rarely any feedback given to the buying public. Even my high-up contact at Apple, though glad to receive bug reports of serious nature, etc. won't reply to me and let me know the status of my reports or the problem (unless the problem can't be reproduced). So there it is...

:cry:

Edited by ski
Link to comment
Share on other sites

This is a serious problem with Logic... Apple simply HAS to fix this or Logic will lose its standing as a pro application. Most pros have external MIDI gear and favorite outboard effects units that they won't give up. Returning audio in time with prerecorded tracks, and doing it consistently, is critical.
Link to comment
Share on other sites

I've just run a quick test to see the timing errors when triggering a TR707 hihat pattern. Again I used tight quarter notes for the sequence triggered from a midi track, and recorded 5 different times on 5 separate audio channels.

Audio track one was with buffer set to 32, PDC left on.

Audio track two was with buffer set to 32, PDC off.

Audio track three buffer at 1024, PDC on.

Track 4, back to 32 for the buffer size, PDC on.

Track 5, 32 again and PDC off.

 

You can see each track is totally different, even the 32 buffer sized ones, with the same PDC settings.

 

But what are we actually seeing here? IS it Logic's poor midi timing.... or the TR707's late reaction to incoming midi signals?

I used a Motu 828 Mkii, and an old Emagic Unitor 8 for this test.

707.jpg.c438da5bca2df9f8c2dd625081010bb7.jpg

hihat

Link to comment
Share on other sites

  • 2 weeks later...

I did the same test like ski in his first post:

nearly same results: the higher the i/o buffer size the EARLIER the MIDI signal is recorded as Audio.

 

For me the best size was at 64 , no matter if PDC on or off ( only small differences , very tight)

 

Then i did a test with the internal EXS ( with Kick sample) as Midi device:

I sent the audio of EXS out and looped it back to an audio track were i redorded it.

(Loop back recording thrugh ADAT lightpipe , routed back in digital mixer also via ADAT ) Software monitoring was turned off of course.

 

The result: very consistent timing with different buffer sizes (32 - 1024).

i did several recordings with the same buffer sizes and they completely cancelled out when flipping the phase.

 

So my conclusion to this phenomen of inconsistent MIDI latency is:

Internal Midi timing is very consistent to almost perfect.

 

External Midi:

very inconsistent especially with higher buffer sizes :cry:

 

The test was made with:

Logic 8.02

OS 10.5.7

Mac Pro quad

M-audio Profire Lightbridge

Yamaha 01V96 digital mixer

MOTU midi express 128

External Midi : Jomox Airbase99 with Kick

Internal Midi: EXS Sampler with with Kick sample

 

Very disapointing...

Link to comment
Share on other sites

Thanks for doing these test... i ran a few more tests of my own and put Logic up against an Atari STE running Notator.

120bpm, 1 bar of 16ths triggering a Virus Kb, and another bar of 16ths triggering a Roland S760. Both tracks starting at bar 2, so both playing together and recorded together.

First up is Atari Ste/ Notator with midi out from atari port to Virus, and midi out from Log 3 interface to S760.

(recorded into Logic Pro, but no sync between atari and Mac, as only counting samples between events)

Virus Kb/Atari

5417 *

5538

5538

5539

5418 *

5537

5537

5538

5539

5418 *

5539

5538

5537

5538

5418 *

5539

(I've highlighted where the Virus is hiccuping for whatever reason)

S760/Atari

5511

5513

5512

5514

5514

5513

5514

5515

5512

5514

5512

5512

5516

5525

5500

5513

(very tight apart from 25 sample variation at the end.... about 0.56ms)

 

Now Logic Pro + Unitor 8 USB interface, out ports 1 + 2. (sequenced and recorded back into Logic, recording both tracks at the same time)

Virus/Logic

5535

5419 *

5538

5538

5538

5539

5419 *

5538

5538

5539

5539

5418 *

5538

5540

5538

5418 *

Again as on the Atari, the Virus sneezes at certain points.

S760/Logic

5512

5514

5511

5513

5512

5508

5512

5516

5514

5518

5510

5515

5510

5510

5517

5507

Pretty solid results for Logic and the S760... max variation 10 samples... better than the Atari !!!

 

My conclusion is that the difference in midi timing when using external instruments is as much down to an instruments midi reaction time, as much as the sequencer + interface used...... and Logic Pro + Unitor 8 don't seem too bad compared to the mighty Atari...

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...
I was experiencing the same problem that external midi device sound arrived too early during recording (the midi notes is fine, but the audio is much earlier). I finally got it working by creating an aux track where my midi device is routed to, then simply bounce it. It should work.
Link to comment
Share on other sites

  • 9 years later...

Grrrr....

i'm experiencing similar or EVEN WORSE problems.

When recording Audio and Midi at same time..

midi gets delayed. Now it comes... it gets delayed in an exponential manner. Means that at first minute of recording the midi gets delayed 4 milisecs ..

after 10 Minutes of recording the delay... therefore the distance between audio and midi gest bigggee up to 12 or more milisecs. This makes imposible to fix it even if we try fo drag files in place. THE DELAY IS NOT CONSTANT!!! and increases worh time.

For a 40 Minute recording (yes, those exist) the delay gets to around 40 milisecs.

In this case we are all very happy to work the whole night and do multiple adjustments. Apple need to fix this!

LOTS OF TIMES EVEN A 2 OR 4 Miliseconds can make the difference between a track that swings or not!! even if you cant hear or tell for shure how many milisecs are out of sync when something IS IN SYNC you notice it!

 

APPPPLLLEEEE.... FIXXXX THISSS PLEASE!

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