Old 09-13-2014, 06:36 PM   #1
Moogie
Human being with feelings
 
Moogie's Avatar
 
Join Date: Apr 2014
Posts: 38
Default Who understands round-trip latency?

Hey guys, looked far and wide for an answer, maybe I can finally find someone who knows this. If so, you get 1000 points and a Super Mushroom power up!

I have one problem in two categories.

1. If I send MIDI out to a hardware synth, the audio returns are never recorded in time with the MIDI notes. There is always an offset -- either too late, or too early depending on settings. I've tried it every way there is. Different channel modes, and ReaInsert.

2. If I send audio out to outboard gear, same thing happens (so not limited to MIDI). Again, tried different channel modes and ReaInsert.


What is going on and how do I get this fixed? I need audio returns to be sample-accurate if I'm to do parallel processing or record synthesizers in time!

I've experimented with different ASIO latencies, no change. Im using RME UFX.

I'm convinced this is a problem with how REAPER outputs, because whenever I track into REAPER I've never had a problem. Only when I send and return. Since Im using more and more outboard gear now, its become a big problem!

Thanks!
Moogie is offline   Reply With Quote
Old 09-14-2014, 03:08 AM   #2
Nip
Human being with feelings
 
Join Date: Jun 2010
Location: Sweden
Posts: 1,344
Default

When I last used ReaInsert there was a bug in the time you got from using the auto-option. The time you get must subtract the soundcard roundtrip latency to line up correctly. So it gave me the total time delay, but forgot that Reaper compensate for soundcard latency.

If I subtracted what was reported to Reaper in settings, it lined up nicely.

You can also check your midi in/outs by setting a midi cable from midi out to in, and record that. You can see if anything to adjust for. But I think the ReaInsert will work if doing the compensation.

Otherwise use the time_delay JS plugin to adjust for any delays not shown as reported. I actually found differences between different A/D converters on my card - whether they were piggyback addons or regular onboard converts. So there might be a reason to take the time and calibrate once and for all.

When I found the right settings, I save these tracks as template not having to redo this over and over.
__________________
----- Windows 7 Pro x64, i7-860 2.8GHz 16G, RME HDSP 9632+Ai4S, Now ditched Reaper 5.4 x64 -----
Nip is offline   Reply With Quote
Old 09-14-2014, 03:50 AM   #3
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 9,191
Default

options -> prefs -> audio -> recording

use audio driver reported latency

you can manually adjust the offset if needed
Reno.thestraws is online now   Reply With Quote
Old 09-15-2014, 07:30 AM   #4
ReaDave
Human being with feelings
 
ReaDave's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,299
Default

Moogie, I know I mentioned in the other thread (electronic music one) that I was getting sample accurate results but upon further investigation, I am actually seeing exactly the same issues as you.

To be honest, I don't know why I wasn't more aware of this issue but recently, I've been recording a lot of Berlin School style music using a combination of analog hardware synths and sequencers and MIDI sequencers with VSTi's in the same project and the timing issues have become a lot more obvious.

I was sync'ing the analog sequencers via MIDI and was noticing drift on the audio tracks (hardware synth tracks) with the MIDI sync. I then tried an experiment with the REAPER metronome. I sent the metronome audio out two outputs (one output for the start of each bar and the other for each beat) of my RME Fireface UFX and into the pulse shaper and clock inputs of my System 700 sequencer and then into the System 100 and into REAPER.
When I recorded those parts and checked the audio afterwards, it lined up perfectly and without drift. If I then added another part using MIDI (whether VSTi or hardware synth), there was drift again.

I have also noticed that the drift is not consistent. In other words, even on the same take, the MIDI timing drifts by varying amounts so moving the audio afterwards doesn't entirely fix things. Some beats are behind the clock while others are in front.


All this has made me rethink some of the performances I've recorded in the past where I was playing piano (via Yamaha KX8 into NI New York Grand) or drums (via TD20 V-Drums kit into Superior Drummer 2) and thought my timing was sloppy. Perhaps my timing was better than I thought and the issue is more to do with this REAPER MIDI instability. Hmmm...

We shall have to keep on the ball with this and keep this topic updated.
ReaDave is offline   Reply With Quote
Old 09-15-2014, 07:31 AM   #5
ReaDave
Human being with feelings
 
ReaDave's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,299
Default

Quote:
Originally Posted by Reno.thestraws View Post
options -> prefs -> audio -> recording

use audio driver reported latency

you can manually adjust the offset if needed
I actually have that selected. The issue though is that the MIDI timing is inconsistent and drifts even on various takes with the same audio driver latency settings.
ReaDave is offline   Reply With Quote
Old 09-15-2014, 12:28 PM   #6
4x4uk
Human being with feelings
 
4x4uk's Avatar
 
Join Date: Jan 2013
Location: Newcastle UK
Posts: 466
Default

might be worth checking this thread out

http://forum.cockos.com/showthread.php?t=144134
4x4uk is online now   Reply With Quote
Old 09-15-2014, 05:12 PM   #7
Moogie
Human being with feelings
 
Moogie's Avatar
 
Join Date: Apr 2014
Posts: 38
Default

So it seems that ReaInsert is complete garbage for MIDI and audio.

Manually adjusting the offset times in Preferences fixes only audio or midi, but not both as their times are different, and the wonderful JS script for MIDI clock by Boreg will fix the clock start time well, but not the midi notes themselves.

Also you'd have to manually adjust audio offset times for each project as they'd change.

The only way to make the MIDI work and still preserve the audio, is you'd have to manually nudge the MIDI clip or recorded audio to get it to align (or JS plug).

This is a serious bummer. Looks like my needs have outgrown what REAPER can deliver working OTB. Cubase and Ableton do a good job with MIDI... Protools always seemed to have latency problems, but it is so much easier to edit in there rather than Cubase/Ableton... Grrrrr!
Moogie is offline   Reply With Quote
Old 09-16-2014, 04:38 AM   #8
ELP
Human being with feelings
 
Join Date: Apr 2014
Posts: 943
Default

For Hardware gear(MidiOut) > check(activate) Open device in low latency/low precision mode(TGT).

Same with Hardware gear(Midi IN) check(activate) Low precision system timestamp (TGT)

Every Asio Driver use Timestamps and almost every Asio Driver use stamps based on TGT
"Zitat M.C. RME: Our (every) ASIO driver uses timestamps to indicate the sample position. This is based on TGT. So putting MIDI on QPC and the QPC timer drifting -"

So if you use Midi Hardware and Asio at the same time it is best to use TGT and not QPC or let reaper timestamp......

Maybe this solves your problem: )

I have no problems with Midi Harware and drifts and I use a lot of MIDI hardware stuff.
ELP is offline   Reply With Quote
Old 09-16-2014, 05:08 AM   #9
ReaDave
Human being with feelings
 
ReaDave's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,299
Default

Quote:
Originally Posted by ELP View Post
For Hardware gear(MidiOut) > check(activate) Open device in low latency/low precision mode(TGT).

Same with Hardware gear(Midi IN) check(activate) Low precision system timestamp (TGT)

Every Asio Driver use Timestamps and almost every Asio Driver use stamps based on TGT
"Zitat M.C. RME: Our (every) ASIO driver uses timestamps to indicate the sample position. This is based on TGT. So putting MIDI on QPC and the QPC timer drifting -"

So if you use Midi Hardware and Asio at the same time it is best to use TGT and not QPC or let reaper timestamp......

Maybe this solves your problem: )

I have no problems with Midi Harware and drifts and I use a lot of MIDI hardware stuff.
I'll give these options a try and see what happens. Thanks for the tips.
ReaDave is offline   Reply With Quote
Old 09-16-2014, 11:42 AM   #10
ReaDave
Human being with feelings
 
ReaDave's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,299
Default

Well, I've done some testing and using TGT mode has made a massive difference here. The drift is there ever so slightly but is barely noticeable compared to QPC mode. Thanks HEAPS for the tips ELP.

One issue I do have now though is that the MIDI offset doesn't do anything in TGT mode and there's a 7ms delay on audio recorded from MIDI tracks. In other words, if I send MIDI out to a synth and record the audio, the recorded audio track is delayed by 7ms. However, it is not an audio latency issue but a MIDI delay issue.

Therefore, if I manually adjust the audio offset, audio recorded from a synth responding to the MIDI data is correct but then all other audio is shifted 7ms too early.

If we could have the option to use TGT mode AND set a manual MIDI offset, that would solve all my issues. As it is now though, TGT mode has solved my drift issues which was my main concern.


On a final note, BY FAR the best timing is achieved for me when I set my RME UFX to either 48 or 64 samples buffer size. Anything higher and the MIDI timing starts to get all screwy, albeit consistently screwy with TGT mode (if I record multiple takes at higher buffers, each take has the SAME errors in TGT mode due to the drift issue being solved).
ReaDave is offline   Reply With Quote
Old 09-16-2014, 11:44 AM   #11
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 22,630
Default

Quote:
Therefore, if I manually adjust the audio offset, audio recorded from a synth responding to the MIDI data is correct but then all other audio is shifted 7ms too early.
Sorry for not reading previous posts but can you set the recording offset in prefs to a +/- value to compensate for this automatically or does that screw up everything else?
karbomusic is online now   Reply With Quote
Old 09-16-2014, 11:59 AM   #12
ReaDave
Human being with feelings
 
ReaDave's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,299
Default

Quote:
Originally Posted by karbomusic View Post
Sorry for not reading previous posts but can you set the recording offset in prefs to a +/- value to compensate for this automatically or does that screw up everything else?
That's actually what I meant when I said 'manually adjust'. I didn't mean manually shifting the audio. Adjusting the preferences fixes the audio recorded from MIDI but messes everything else up.

That's why I'd like to see the option to adjust the MIDI offset working in TGT mode. It currently only works in QPC mode.
ReaDave is offline   Reply With Quote
Old 09-16-2014, 12:59 PM   #13
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 22,630
Default

Quote:
Originally Posted by ReaDave View Post
That's actually what I meant when I said 'manually adjust'. I didn't mean manually shifting the audio. Adjusting the preferences fixes the audio recorded from MIDI but messes everything else up.

That's why I'd like to see the option to adjust the MIDI offset working in TGT mode. It currently only works in QPC mode.
Ah, makes sense. I asked because in the past (don't remember when) I ran into situations where it was just easier to be aware and shift the items by a known amount instead of doing the automatic offset and likely for similar reasons.

I also always have some manual offset that is performed via loopback (per sample rate) because even without external syncing the soundcard is always off a few samples. Or better worded I have never done a loopback that was sample accurate without needing "some" manual offset which predates both Reaper and my current sound card.

Old news to you I'm sure, just chatting.
karbomusic is online now   Reply With Quote
Old 09-16-2014, 03:46 PM   #14
Moogie
Human being with feelings
 
Moogie's Avatar
 
Join Date: Apr 2014
Posts: 38
Default

TGT is indeed a big help. Thanks ELP!

I got everything down to ~2 ms of midi error, I guess thats close enough for me to just use the handy nudge tool and pull back the midi. Thats a lot more steady than some older sampler clocks. I can confirm I get better results with a smaller buffer size. Otherwise its 4-8ms. It would be so nice to have an automatic way to control this...

Midi aside, I was doing lots of messing around with offsets so Im not sure what I did, but I have been able to record a sample-accurate audio loop. Yay, I can do OTB parallel processing without phase problems, or having to shell out for a mixer.

However I have not tried this in a session with loads of cpu-hungry plugs. And I wont bother using ReaInsert ever again, what a tease.

I guess we are just stuck manually nudging midi clips? At least this way you can monitor the synth in time to be able to dial in your envelopes and midi automation (I use ReaControl MIDI to use the automation lane in stead of the s*** editor) in time.
Moogie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.