Midi recording precision dependent on latency

Hi,

when I record midi in Renoise (macos), the recorded result get worse regarding the timing with increasing latency. For testing I play an external synth with a short impulse sound, and record the notes then, playing a short sample sound in Renoise. If I set the latency to 80ms and focus on the external synth sound, and later replay the recording, the timing is completely messed up. There should be a latency of course, but the space between the notes should be the same. This is not the case at all. Is this maybe a conceptual problem in the midi code?

I did the same test in Bitwig, and there the space between the notes stays absolutely constant, no matter what latency.

I think this makes midi recording not really satisfying in Renoise. I can’t tell about Windows version, but I would assume it is the same.

The distance between the notes should not be dependent on latency.

Here is an example, recorded with 80ms latency at 48kHz, left channel is the actual external synth sound like I played it, right channel is the replayed midi recording in Renoise with a short sample. I would say this is a mess.

Just as a reference, this is how Bitwig records midi input at maximum (43ms) latency:

As you can hear, there is no variation in notes’ distances at all.

True,

When I set my buffer higher, the midi indeed gets sloppier.

I always thought it had something to do with the tolerance decreasing, when the buffer space is increasing. I’m not sure if this is a Renoise problem though, could be a shortcoming of using a bigger buffer and the data that is stored there and processed for a longer period.

It is a problem of Renoise, since it is not the case in other DAWs. This is IMHO quite a show stopper, because in bigger projects you usually get a lot of extra latency due PDC of plugins. Then recording is almost not possible anymore (or you disable PDC temporarily). But even with 8ms latency, I would assume that this problem already causes quite a lot of imprecision.

Aha! It seems to be caused by the midi option “Compensate latencies while recording”. So this seems to be buggy.

Enabled:

Disabled:

No problems here. I can record all my external gear with no latency problems. Maybe you missed these 2 important settings besides the “Compensate latencies when recording” option:

1.) Your MIDI track. On the “Output Device” settings you have to set the Mode to “LineIn Return”
image

2.) On the Line Input device you have to set the “Latency” mode to “MIDI Return Mode”
image

This then should solve the recording latency issues.

1 Like

It’s not about the latency, but the space inbetween the notes. This is not about midi-out at all. Did you really try what I wrote above?

  1. Set latency to maximum.
  2. Enable compensation
  3. Record midi notes with an external synth, but while recording those, also record the direct audio out of your synth with a sample editor or so.
  4. Compare the timing of the direct output recording and the replayed notes. The timing will be completely messed up. Maybe it starts too late, but this is not the topic. Align both recording by aligning the start point of both, e.g. left and right channel.

Of course this is better audible, if you use a short impulse like sound with 0 attack and short decay.

  1. Now repeat all above with compensation disabled.

P.S: Compensation should align only the start point of the recorded notes (shifting all up by the same amount of latency), it should not affect the rhythmic pattern at all.

The varying space between mid notes when there shouldn’t be is called midi JITTER

No man, please read my text again. MIDI jitter is commonly used as term for very small variations due the nature of the midi protocol and low speed, but here it’s huge. This is not a small fluctuation, but extreme random like offsets inbetween notes, can be a whole 1/16th note. Also it doesn’t happen in Bitwig. Also doesn’t happen when compensation is disabled.
Also you would have known this, if you understood / read the text above…

As i wrote, for me it works fine. When i start playing the pattern, and my external gear is triggered by a MIDI track in the pattern, it plays all the notes in time where they should be. Even works with recorded samples. I still think it’s a missing setting you still have to do, or maybe it’s even a Mac thing, because i’m on Windows, and here it works fine as it should.

You are referring to midi input, but for me the midi output als get’s less tight (space inbetween notes) when I make the buffer bigger.

1 Like

Well then please open a new thread with exact steps to reproduce and maybe audio or visual material. This here is all about recording notes via midi input, so the notes are already written in a wrong way, no matter what playing device it might be ( can be a sample, a vsti or external, DOESNT MATTER BECAUSE NOTES ARE ALREADY WRITTEN BADLY).

Thanks. I’ll look into this after I’ve dealt with MIDI timing in Renoise is bad when getting sequenced externally (by Cirklon 2) - #32 by toimp

This is an old problem, but there definitely is room for improvement. Probably this also behaves differently on Mac and Windows…

3 Likes

That indeed sounds like a mess but I also can’t replicate this on Windows yet. Maybe it’s an OSX thing. will test that later.

Is the playback in Renoise already messed up or are just the recorded (and then later on played back) MIDI events in Renoise off?


The “Compensate latencies while recording” option does the following:
When it’s enabled, it will write down the events exactly as you hear them.
When it’s off it will write down the events exactly when they got received.

The difference can be more easily shown where there a lot of PDC latency (try adding a #PDC Test Delay).
With the option enabled it will backdate the recorded event by the song’s latency so they are aligned with the playback.

The recorded notes are messed up, only when “compensate” is enabled. If compensate is disabled, the note distances are very exact, only there is not PDC compensation at all, so the notes come too early. The higher the latency is set, the bigger is the negative offset. Best to be test with maximum latency set.

So the playback is always accurately replaying what was recorded.

? Hm, I do not exactly understand this… Do you mean by “as played” just like it would sound if you use an external sound generator? I would expect both modes to record the input exactly as played. Maybe this option should be removed and it should work like disabled now, but of course with proper PDC/latency compensation. I guess you mean that this exactly should happen while the option is enabled… Currently when enabled, the note position varies “randomly”, the higher the latency is.

So currently I have the choice between very offsetted recording vs. totally messed up timing, which is kind of frustrating, esp. when the song has grown and quite a bunch of PDC was introduced.

Maybe the approach should be changed and some kind of real midi buffer was introduced then? Then Renoise could a bit later write the notes down/transform to pattern data and even be a bit more clever while placing polyphonic notes, having more lookahead. Or then there could be that neat feature “always recording”.

There also were two minor related problems here: a) Was something about polyphonic recording and pattern repeat. I actually forgot what exactly it was and how to replicate now. Somehow it was about that Renoise does not realize which note columns are already used after repeat and then it mixes up notes. b)was that sometimes while midi recording, Renoise places the note off command of the prior note straight after the next note (I think that happened on pattern repeat, too), so then you have two messed up note lengths. I think this happens exactly on pattern repeat, if the note recorded to the end of the pattern still was not released, the note off then will be placed after the first note in the pattern, since Renoise does not realize that there already are notes in the same column then, or so.

Found the problem here. The option will fix the jitter in both cases - when turned on or off - in the next update.

3 Likes

Very nice, thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.