[RWP] Midi Sync for Compensating Hardware Latency
Indigo
33indigo at charter.net
Sun Aug 21 08:33:13 EDT 2011
Okay, here's how to set the latency offset for your midi device:
In options/preferences go to audio.
There are 5 divisions under audio:
1 device, 2 midi devices, 3 buffering, 4 playback, 5 recording.
Go to Midi Devices, Midi output device to make available, and select the
midi output device you want to set latency offset for.
Once that's done, go to Recording.
Control+tab up to the setting Use Reported lacency...and check the checkbox.
Tab down once and you have an edit box to set the offset for the latency
of your midi output device you selected in Midi Devices.
Tab down again and there is an edit box for the latency setting in
milliseconds.
Tab down again and you have the edit box for the midi input device you
selected in midi devices, provided you selected a midi input device to
set its latency offset.
Tab down again and you have an edit box for the latency for the selected
midi input device in milliseconds.
When your settings are complete, click on apply, then okay.
Below are some snips from Cockos forums on the settings to enter in the
offset edit boxes, and how Reaper handles latency compensation.
snip:
Positive values shift back the recorded audio and midi by any entered
amount.
Negative values shift forward the recorded audio and midi, but really,
it is limited
to double your ASIO buffer size.
So even when you enter -100ms, with an ASIO buffer of 256 at 44.1KHz =
6ms latency,
it is actually taking effect -12ms, shifting forward recordings by 12ms
only and
ignoring your -100ms.
snip:
A few words about MIDI timing in Reaper, specifically timing for MIDI
coming in to
or going out of Reaper.
To be clear, this is entirely about MIDI hardware timing. Internally
within Reaper,
there should never be any issue with MIDI timing.
When recording and playing MIDI you care about three kinds of timing:
jitter, audio sync, and latency.
Jitter is how consistent or inconsistent the timing between notes is. If
you have
a quantized MIDI beat, you want it to actually play quantized instead of
hits being
randomly early or late.
There are systemic limitations on how low jitter can be with any
hardware. A couple
of good articles about MIDI timing and Windows:
http://www.soundonsound.com/sos/dec0...etech_1207.htm
(e-sub)
http://www.tim-carter.com/music-prod...di-latency.php
The summary is that there is a minimum MIDI jitter on Windows in the 1
ms range,
with the additional problem that each device must make a decision about
what kind
of timestamps to use, and mismatched timestamp assumptions can cause
terrible jitter
in the 50 ms range.
Reaper 3 adds a per-device MIDI timestamp setting, with the default
choice of ignoring
the device's timestamps and letting Reaper timestamp everything. In
loopback tests,
either using the default setting, or ensuring that Reaper's setting
matches the hardware
device, should reduce jitter to the 1.5 ms range, which is about as good
as it gets
on Windows.
(Any piece of hardware or software that handles the MIDI data along the
way may cause
additional jitter, so keeping the signal path short is important.)
Audio sync
is making sure that MIDI and audio events that occur at the same time
get heard
at the same time. When not in low-latency output mode, Reaper syncs
audio and MIDI
during playback or recording, but specific devices may add additional
latency that
Reaper doesn't know about, which will throw the MIDI out of sync. You
can adjust
for additional latency per-device in Reaper's MIDI output settings.
Keeping MIDI and audio in sync allows creative processing of MIDI and
audio together,
like triggering a synth with an audio gate, or using audio volume to
modulate a cutoff
filter.
Latency
is how long it takes for a MIDI note played on hardware to get
recorded by Reaper,
or a MIDI note output by Reaper to get played on hardware. Because
Reaper does not
yet have a direct MIDI-thru mode, there will always be some MIDI latency
and when
not in low-latency mode, the latency depends on the audio hardware
buffer size. This
latency makes it difficult to route MIDI through Reaper for live
playing. We intend
to add a MIDI-thru mode that will disable MIDI/audio sync completely but
allow MIDI
to pass through Reaper with very low latency, but for now, MIDI takes
time to pass
through Reaper.
So: for minimum jitter in Reaper, make sure the device is not set to
low-latency
mode in Reaper's preferences. For minimum latency, make sure that the
hardware device
is set to low-latency mode. And remember that jitter is worse than
latency, because
it's much harder to correct once recorded.
snip.
Indigo again" Later today I'll set up a hardware unit and learn how much
latency I get, and try those offset settings.
Hope this helps,
Indigo
On 8/20/2011 11:23 PM, Jim Snowbarger wrote:
> Indigo, I can't find these settings.
> Are you talking about the track recording settings that you get when
> pressing the context key on a track?
> It sounds like those settings affect how midi plays bac when playing the
> project.
> I really don't like the idea of messing with audio buffering settings to
> deal with a simple midi delay. Those things are more dependent on hard
> disk speed, and other things that actually affect audio performance. I
> really don't see why those settings should affect midi through.
> Yes, it does have a midi through. it is what happens when you set up a
> track to record midi input, arm it for recording, and turn monitoring
> on. The midi data gets echoed out the midi output. Eventually.
> In fact, that is the way I would want to use it. My sound module would
> be tracking my keyboard action when I 'm recording through the
> monitoring. Then, when you punch out, it will automatically receive the
> playback.
> I think I got the throughput delay to diminish a little by by unchecking
> the item that restricts midi hardware to a single thread. Frankly, I'm
> slowly coming to the conclusion that this is just a reaper bug.
> It's a pretty nasty bug, for my mode of operation.
>
>
>
> ----- Original Message ----- From: "Indigo" <33indigo at charter.net>
> To: "Reapers Without Peepers" <rwp at reaaccess.com>
> Sent: Friday, August 19, 2011 6:37 AM
> Subject: Re: [RWP] Midi Sync for Compensating Hardware Latency
>
>
>> There are midi input and output offset settings just at the end of
>> record settings, but I don't know if these are the sync settings
>> referred to.
>> Still looking. for something specifically called sync offset.
>>
>> On 8/19/2011 5:31 AM, Indigo wrote:
>>> I think this forum post might have exactly what's needed for your
>>> hardware latency problem.
>>>
>>> Quote:
>>> Reaper midi sync latency compensation setting
>>>
>>> Question: I recently scored a tr-727 so I synced it up to my TC konnekt
>>> 8, which I ran
>>> "midiTest" on, (if you don't know what it is google it... pretty
>>> interesting!) and
>>> it says my midi 'send' time is less than a millisecond.
>>> I then routed the output of the 727 into a channel running 44.1 with 2.6
>>> ms latency.
>>> When I try to sync the output of the 727 to the click in reaper it is
>>> off by a considerable
>>> amount ... I was wondering where the setting is to compensate for the
>>> latency? My
>>> immediate fix was to nudge everything else in the project over to sync
>>> with it, but I know there must be a better way.
>>> otherwise it syncs rock solid as long as I start from the very beginning
>>> of the track!
>>> Answer: There's 'MIDI output offset' for every single MIDI output. A
>>> positive value delays
>>> the MIDI stream by X milliseconds, whereas a negative value makes the
>>> MIDI to play
>>> X milliseconds ahead.
>>> I believe a negative value is the most usable, external gear usually has
>>> some latency
>>> which you want to compensate for - the MIDI stream needs to play a
>>> little bit ahead
>>> of main audio output to actually play in sync with it.
>>> However, there's a limitation in 'MIDI output offset'. A negative offset
>>> of about
>>> 20 milliseconds seems to be the maximum negative offset.
>>> If more than 20 ms negative offset is needed, it's possible to use
>>> ReaInsert and
>>> it's plugin delay compensation. This is what I do. It's possible to have
>>> a negative
>>> offset of several seconds.
>>>
>>> _______________________________________________
>>> RWP mailing list
>>> RWP at reaaccess.com
>>> http://reaaccess.com/mailman/listinfo/rwp_reaaccess.com
>>
>> _______________________________________________
>> RWP mailing list
>> RWP at reaaccess.com
>> http://reaaccess.com/mailman/listinfo/rwp_reaaccess.com
>>
>
>
>
> _______________________________________________
> RWP mailing list
> RWP at reaaccess.com
> http://reaaccess.com/mailman/listinfo/rwp_reaaccess.com
More information about the Rwp
mailing list