[solved] External Midi Drift/Latency

Hi

Tried using Renoise with external midi while rewire slaved today, and noticed really bad midi timing. Made a test project with one hihat from renoise and one from an external synth. When using Renoise standalone the timing is perfect. When slaving Renoise to Reaper I get a really bad delay. It seems to be drifting also. Tried turning on and off automatic pdc and automatically compensate latencies without success.

Not sure if this is a bug as it might just be the extra time it takes for audio to get from Renoise to Reaper. Is there some option in Reaper to compensate for this?

Im running Renoise 2.1.0 and Reaper 3.03

There are some other MIDI problems related to Reaper as well regarding ReWire, you might try to test if the given option also gets rid of your problem:

  • Reaper 3 Beta 9 sends MIDI via ReWire even when there are no ReWire MIDI inputs registered, this is a bug in Reaper. To avoid this uncheck the MIDI event controllers in the MIDI, MIDI In preferences when Renoise is running as slave to circumvent this.

Ok tried it some more. Part of the problem is just the soundcard latency. In Renoise standalone the line in device can compensate for this, but I havent figure out how to make Reaper compensate for it yet.

However, a strange thing I noticed is that I get more latency, using the same input (Reaper), when sending midi from Renoise than I do when sending the same midi from Reaper. I use the same midi port, channel and synth.

I tried disabling the controllers also and that didnt change anything.

Latency compensation is not supported by ReWire itself unfortunately and is a huge problem most hosts deal with when one of the hosts supports delay compensation.

Though none of the host developers seem to be able to convince Propellerheads to support delay compensation in the ReWire protocol as solutions that are given in the host’s manual subscribes arbritrary procedures that are in some cases even half-assed solutions.
Yet all daw/host developers cooping to work out a standard to get this working also seems something no one bothered attempting to do.
I’ll think it will take a while before these kind of problems will vanish.

Cortex: Could you give us a description of what you are routing to what? You can’t use the LineInDevice when running as ReWire slave, so you are routing back the MIDI signal in Reaper, but are triggering the MIDI from Renoise?

This would explain the latency problems, but not the drifts. The drifts may be a result of running a lot of stuff at once on your computer (Renoise + Reaper). On windows, when using MME MIDI (you don’t see a WDM tag in the device in Renoise) the timing gets worse the less CPU is there for Renoise, because we have to send out & delay the MIDI messages in such cases, this is not done by the drivers.

But please give us some more details about your setup, so we can do the same here, test this and fix something/help/whatever…

Ok so I tried the following:

Monitor the midi synth directly (from soundcard directout), triggering midi from Renoise: The sound is delayed.
Monitor the midi synth directly, triggering midi from Reaper: The sound is not delayed.

This is the main problem. Is this because rewire dosent support pdc? Is there a way around it, like figuring out how long Reaper delays the signal and compensate with track delay in Renoise?
As for the drifting I couldnt reproduce it, maybe it was imaginary.

And “Monitor the midi synth directly (from soundcard directout), triggering midi from Renoise” NOT as Rewire slave, works just fine with your setup?

Whats the latency mode set to in Renoise for your instrument, “Ext MIDI” or “LineIn Ret”?

“Ext MIDI” will delay the MIDI events by the audio latency
“LineIn Ret” will not delay the MIDI events by the audio latency

Means “delayed” that its too early or too late? Probably its too early because we don’t know which latency Reaper, which runs the soundcard, uses?

Changing instrument mode to linein ret fixed the problem :) . I hadnt even noticed that option.