PDA

View Full Version : MIDI timing in Reaper


schwa
04-14-2009, 05:10 AM
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/dec07/articles/cubasetech_1207.htm (e-sub)
http://www.tim-carter.com/music-production/midi-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.

(Thanks very much to user beatbybit for running a number of controlled hardware measurement tests.)

stupeT
04-14-2009, 06:52 AM
OK and thank you.

How about that tricky MIDI-interface which once came from Emagic? I am still using it. 8 ports, I guess its called ATM-8 (Advanced time management) or something. The trick of that device (as far as I remember):

To keep latency low it will accept MIDI events before they should actually be fired. But it keeps the timestamp in mind. So it is (thereotically) able to fire on all ports (and channels) at the SAME time and overcoming latency of some kind (i.e. caused by the serial transportation protocol for the 16 channels per port or the windows jitter you mentioned).

Will it's driver take care anyway? Will it be configurable to take full advantage of it?

schwa
04-14-2009, 07:05 AM
Reaper always streams the MIDI events to the device at the start of the audio block during which they are meant to be played, in other words, there is a slight amount of send-ahead. In most cases that doesn't do much for latency though, if the device needs additional time to process the MIDI events, that's additional latency.

Lawrence
04-14-2009, 07:14 AM
Latency is how long it takes for a MIDI note played on hardware to get recorded by Reaper, or a MIDI note played by Reaper to get played by hardware. Because Reaper always syncs audio and MIDI, there will always be high MIDI latency and the latency depends on the audio hardware buffer size.

Latency should affect the realtime timing of audio that is dependent on the system - like VSTi's - but should have nothing to do with midi passing through the system... like midi passing through the daw triggering a hardware synth. That midi signal should *not* be delayed by the system latency/buffer size.

That seems very wrong to me, as someone who regularly plays/records midi with hardware synths in the daw at max buffers with no delay. It's one of the reasons people use hardware synths, to avoid latency, now you're saying with Reaper even that signal is dependent on the audio buffers?

That simply can't be a good thing.

schwa
04-14-2009, 07:27 AM
As I wrote in the original post:

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 but allow MIDI to pass through Reaper with very low latency, but for now, MIDI takes a long time to pass through Reaper.

Reaper's current low-latency MIDI output mode will decrease the "long time" but not all the way to zero. For now, if you want no MIDI latency while playing live, the MIDI signal from your controller to the hardware synth has to go around Reaper, by routing the MIDI cables either physically or virtually (using MIDI-OX or similar).

When we add MIDI thru, everyone will be happy.

Lawrence
04-14-2009, 07:38 AM
As I wrote in the original post:



Reaper's current low-latency MIDI output mode will decrease the "long time" but not all the way to zero. For now, if you want no MIDI latency while playing live, the MIDI signal from your controller to the hardware synth has to go around Reaper, by routing the MIDI cables either physically or virtually (using MIDI-OX or similar).

When we add MIDI thru, everyone will be happy.

Cool schwa. Is that a 3.0 fix?

My comments above were just me shaking my head as to how that could be overlooked. It's really obvious that the devs are audio guys, not midi guys, as some really, really basic midi stuff got overlooked early on.

Midi thru is about as basic as it gets no?

stupeT
04-14-2009, 08:19 AM
Reaper always streams the MIDI events to the device at the start of the audio block during which they are meant to be played, in other words, there is a slight amount of send-ahead. In most cases that doesn't do much for latency though, if the device needs additional time to process the MIDI events, that's additional latency.

Sounds like a perfect solution. Slightly ahead is exactly what that thingie needs.

Justin
04-14-2009, 08:32 AM
My comments above were just me shaking my head as to how that could be overlooked. It's really obvious that the devs are audio guys, not midi guys, as some really, really basic midi stuff got overlooked early on.

Midi thru is about as basic as it gets no?

Well, it has its uses, however it also will have its limitations -- in a low latency MIDI thru mode, you will not be able to do many of the MIDI processing things you can do now with plug-ins. We valued extreme flexibility over a single special purpose mode that is easily accomplished using other software/hardware, which I don't think can be boiled down to an audio/midi mindset difference.

Lawrence
04-14-2009, 01:14 PM
Well, it has its uses, however it also will have its limitations -- in a low latency MIDI thru mode, you will not be able to do many of the MIDI processing things you can do now with plug-ins. We valued extreme flexibility over a single special purpose mode that is easily accomplished using other software/hardware, which I don't think can be boiled down to an audio/midi mindset difference.

No offense intended Justin - and great and sincere respect to you - but I have no idea what that means. What is the extreme midi flexibility you're talking about with Reaper?

Your comment above suggests that other hosts that have a real midi thru are somehow hampered with midi FX processing? I don't see that in practice at all. I apply midi plugins to realtime streams and the result (the output to hardware) isn't held hostage to the audio buffer latency.

My comment was actually part compliment. It's obvious you guys are audio guys and it shows.

I know it's considered heresy to disagree with the devs but I don't get this one. :)

schwa
04-14-2009, 01:37 PM
With MIDI thru you would not be able to do things like

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.

But whatever. Nobody's saying we shouldn't have a MIDI thru mode.

Evan
04-14-2009, 01:43 PM
Will the very informative first post, (and similar posts) find a way in the Reaper manual, or some sort of accessible online help? It's a shame to see threads like these get lost over time.

Oxytoxine
04-14-2009, 01:49 PM
thanks schwa, excellent summary on the topic!

FWIW, from my experience reaper is in the same "jitter league" as samplitude and cubase when recording sequenced HW synths (but me ignoramus thought that this has to do with clock issues of the interface).

Lawrence
04-14-2009, 01:52 PM
With MIDI thru you would not be able to do things like



But whatever. Nobody's saying we shouldn't have a MIDI thru mode.

Of course not and I wasn't suggesting that was the case. I certainly disagree with the above conclusion about what can't be done while midi thru is also active.

I don't see midi thru as some exclusive mode like you do but just another mult of the incoming midi signal.

But I'll stfu and go away...

Thanks for the info schaw. I didn't mean to be confrontational.

tony_man
04-14-2009, 02:40 PM
Many thanks for the good explanation Schwa..

the MIDI does appear to be tighter on my system..
IE Recording the audio of a midi click track sent from Reaper
(reaper MIDI->Device->Audio->Reaper) is to within 3 MS.


I think you guys may have cracked it...I hope it stays there like that.

oh to have MIDI pass thru (0 Latency)..


Excellent job.. I am enjoying reaper more and more.

Jae.Thomas
04-14-2009, 02:56 PM
It's really obvious that the Majority of users did not need this, as some uneeded standard midi stuff got ignored early on.



fixed for accuracy.

Lawrence
04-14-2009, 03:00 PM
fixed for accuracy.


??............... ahhh never mind. I would ask that you not quote me after you change what I say though. You can't "fix" my opinion for accuracy nor can I yours?

Please don't do that. If you do, put it down as your opinion (what it is) and not me supposedly quoting your opinion.

If we all started re-quoting each others opinions "for accuracy" what a mess we'd have huh? :)

Thanks Jason.

_Devin
04-14-2009, 03:44 PM
You can't "fix" my opinion for accuracy nor can I yours?

I am firmly of the opinion that the world is flat, rests on 4 pillars made of god's own granite, and is the unmoving center of the universe, and I ask that none of you violate my right to an opinion by suggesting otherwise. Thx.

Lawrence
04-14-2009, 05:35 PM
I am firmly of the opinion that the world is flat, rests on 4 pillars made of god's own granite, and is the unmoving center of the universe, and I ask that none of you violate my right to an opinion by suggesting otherwise. Thx.

That's so far out of the context of my request to Jason it's quite silly.

jbone1313
04-14-2009, 06:35 PM
Where do you set "low-latency mode"? Or is "low-latency mode" synonymous with a low buffer size on your audio device?

Jae.Thomas
04-15-2009, 12:53 AM
??............... ahhh never mind. I would ask that you not quote me after you change what I say though. You can't "fix" my opinion for accuracy nor can I yours?

Please don't do that. If you do, put it down as your opinion (what it is) and not me supposedly quoting your opinion.

If we all started re-quoting each others opinions "for accuracy" what a mess we'd have huh? :)

Thanks Jason.

its not an opinion. you stated as fact, and i corrected you.

what i quoted is EXACTLY what happened, not your version :)


i wont change your quotes anymore however.

stupeT
04-15-2009, 01:06 AM
its not an opinion. you stated as fact, and i corrected you.

what i quoted is EXACTLY what happened, not your version :)


i will continue to change your quotes however.

That is not fair. :)

Jae.Thomas
04-15-2009, 01:21 AM
I'm a gay fish

you are?

;)

DarkStar
04-15-2009, 01:24 AM
its not an opinion. you stated as fact, and i corrected you.

what i quoted is EXACTLY what happened, not your version :)


i wont change your quotes anymore however.

Nope, I must disagree.

Quoting people is fine, and removing non-pertinent parts of the quote is also OK.

Changing the quote to say something quite different is not the right way to do things.

IMO, of course.

Jae.Thomas
04-15-2009, 01:26 AM
Nope, I must disagree.

Quoting people is fine, and removing non-pertinent parts of the quote is also OK.

Changing the quote to say something quite different is not the right way to do things.

IMO, of course.

i dont disagree that its wrong to do that ;)

and im sorry.

it was a creative way to explain what REALLY happened. ;)

moliere
04-15-2009, 01:52 AM
it was a creative way to explain what REALLY happened. ;)

Its also a very widely accepted way of making a light hearted point in web forums, so people just need to chill out a bit.

Jae.Thomas
04-15-2009, 01:53 AM
Its also a very widely accepted way of making a light hearted point in web forums, so people just need to chill out a bit.

+1.........................

brainwreck
04-15-2009, 02:12 AM
Of course not and I wasn't suggesting that was the case. I certainly disagree with the above conclusion about what can't be done while midi thru is also active.

I don't see midi thru as some exclusive mode like you do but just another mult of the incoming midi signal.

But I'll stfu and go away...

Thanks for the info schaw. I didn't mean to be confrontational.

yea, i'm not too smart on the midi stuff, but couldn't 'midi thru' be a separate stream than the midi that needs to sync with audio? i mean, why couldn't reaper pass a midi thru stream without being set to a midi thru mode?

airon
04-15-2009, 02:12 AM
Let's heard the forum combat kids out in to their own play pen. Relax and stay on topic lads.

On topic, I've sent every midi citizen I know to this thread for the information you folks provided. I also agree this information should be part of the manual. Most folks will assume that's where they'll find out about accurate Reaper and midi devices can be. This will help to reassure them, i.e. remove doubt and uncertainty(which I call fear and ignorance) about this subject.

_Devin
04-15-2009, 05:19 AM
Let's herd the forum combat kids out in to their own play pen.

fixed for accuracy :D

Lawrence
04-15-2009, 05:52 AM
its not an opinion. you stated as fact, and i corrected you.

what i quoted is EXACTLY what happened, not your version :)


i wont change your quotes anymore however.

Thanks. My point was that this is *your* opinion about what happened. Unless you took a poll of all of the users of Reaper and the majority told you they didn't need those particular midi features... how else would you know that exactly? You state this as fact as if you asked them.

Opinions abound... we all have them and we often disagree. The opinion part being what you think most people need.

As far as the quotes go... forget my request. I'll just make it a personal habit to "correct for accuracy" all of the bullshit I read here.

So be my guest... have at it. Correct me for accuracy whenever you like... I'm gonna have fun doing the same to people here. Relax and chill right?

Dstruct
04-15-2009, 05:53 AM
Is there a way to find out if the driver is using QPC?

schwa
04-15-2009, 06:41 AM
Is there a way to find out if the driver is using QPC?

Both of the articles in the first post refer to a "MIDITime Utility" which is meant to check your driver against both timers until it perceives a difference. However I don't see an actual link to the utility on either page.

17hex
04-15-2009, 07:53 AM
Schwa and justin

THANK YOU. It's posts like this one and attention like you are giving this topic that give me NO hesitation in recommending Reaper to all of the musicians, producers and "sound guys" I know (many of whom have quite happily taken my advice). Also thank you for the "ReaControlMIDI" in v3beta. I have pull-down lists in Reaper of the patches on my SQR and DX7 (and other MIDI gear) now. Awesome. Oh yeah and inline MIDI editing.. and.. I could go on and on.. ask any of my friends ;-)

Anyway, as for the MIDI through thing, maybe I could suggest a hybrid approach to MIDI through? that's to say, sort of like how you added FX settings to individual takes (which is FANTASTIC), maybe you could have a "ReaFXMIDI" section that could be inserted inline in the MIDI through path. This would give you the opportunity to use a MIDI Arpeggiator or MIDI delay or whatever VST MIDI fx if you wanted, but still use the MIDI through. Obviously both of those plugins would do well to have "host BPM Sync", but that is quite a different thing than ASIO buffer sync... Maybe this is already what you had in mind and I just misunderstood.

I (ReaFXMIDI or not) will be VERY happy when Reaper gets MIDI through. Thank you again.

Dstruct
04-15-2009, 08:17 AM
Both of the articles in the first post refer to a "MIDITime Utility" which is meant to check your driver against both timers until it perceives a difference. However I don't see an actual link to the utility on either page.

Ok, I found the Link.


Now the problem:

Please tell MIDITime which MIDI ports you are using for the loopback test.

Output #1: Microsoft GS Wavetable SW Synth
Output #2: HDSP9632 Midi

Choose output (1 to 2): 2


Input #1: HDSP9632 Midi

Choose input (1 to 1): 1


MIDITime will now send an exciting melody through your loopback cable,
consisting solely of Middle C. (Aren't you glad you aren't the cable?)
This will probably take just a few minutes, but in rare cases it may take
up to an hour. You can use your machine normally during this time, but
if another program tries to open the MIDI port we're using, you may
get an error from that program, and if it sends MIDI data to the port,
MIDITime will get confused.
......

Your interface takes about 0 ms to process
each note.

For best results in Nuendo or Cubase, you will need to set the 'Use
System Timestamp' option under Devices | Device Setup | DirectMusic.
If your MIDI interface doesn't provide its own DirectMusic driver, you
will *have* to use the emulated port that Windows creates; the
Windows MIDI port will give you incorrect timing.


By the way, after 60 seconds, your clocks had drifted apart by
983 microseconds. A man with one watch knows what time it is; a man
with two watches is never sure.

QPC frequency: 2666810000
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: 0 ms (TGT), 0 ms (QPC)
Round trip: -1 ms (TGT), 0 ms (QPC)
Result: QPC.

---------
TGT start: 8354911 QPC start: 22278388223920
TGT sent: 8415411 QPC sent: 22439727609110
TGT in bounds: 0 QPC in bounds: 1
TGT delta: -1 QPC delta: 0
TGT avg: -0.08333 QPC avg: 0
Slow responses: 0 QPC frequency: 2666810000
Run: 60 Drift: -983
Device: HDSP9632 Midi
Driver: 050a
CPU speed: 2666
CPU type: Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz


As far as I know, the RME HDSP WDM driver 3.077 doesn't have DirectMusic MIDI support. This means I need to use the emulated MIDI ports. But REAPER doesn't list them :(


What to do?

schwa
04-15-2009, 08:34 AM
That's a saucy bit of program, isn't it.

I believe the app is simply telling you to use QPC timestamps. Apparently in Cubase you can only use QPC timestamps with DM or emulated DM ports, but in Reaper you can use QPC with the normal Windows MIDI port.

Dstruct
04-15-2009, 08:57 AM
Ok, thanks!

Lawrence
04-15-2009, 09:05 AM
True. Cubase / Nuendo has had a long history of midi timing problems for some users that has only recently started to die down. The system timestamp thing didn't necessarily fix it for everyone and the complaints were still coming in.

I personally didn't have any issues after doing the ignore port filter thing but some users have.

It's a pretty well documented historical issue/problem with that daw. Good to hear that Reaper won't have that problem.

Cool.

Shan
04-17-2009, 03:17 PM
A few words about MIDI timing in Reaper, specifically timing for MIDI coming in to or going out of Reaper...

Thanks for the overview! This sort of thing is definitely of value to be put in the wiki or manual.

Shane

Jae.Thomas
04-17-2009, 05:24 PM
what about this situation in reaper:

(i never seemed to have a problem with this in reaper but i have with other programs, but im wondering how it will be affected)

you have an audio/vsti mix running

you are across the room with headphones on at your electronic drumkit

you hit the snare

the information gets read by the brain, sent to the pc through midi, into the audio interface, delayed a bit, gets processed into the vsti, causing a bit more delay, you HEAR it...

now, you would try to get latency down as far as possible

but is reaper "what you hear is what you get" when it comes to midi?

like, will it show up aligned with audio correctly?

jbone1313
04-18-2009, 05:45 AM
what about this situation in reaper:

(i never seemed to have a problem with this in reaper but i have with other programs, but im wondering how it will be affected)

you have an audio/vsti mix running

you are across the room with headphones on at your electronic drumkit

you hit the snare

the information gets read by the brain, sent to the pc through midi, into the audio interface, delayed a bit, gets processed into the vsti, causing a bit more delay, you HEAR it...

now, you would try to get latency down as far as possible

but is reaper "what you hear is what you get" when it comes to midi?

like, will it show up aligned with audio correctly?

Jitter notwithstanding, I *think* Reaper is what you play is what you get. (That's what I prefer.) Ableton is what you hear is what you get.

See also: http://forum.ableton.com/viewtopic.php?f=3&t=106221&p=834240&hilit=latency+should+delay#p834240

Jae.Thomas
04-18-2009, 09:03 AM
Jitter notwithstanding, I *think* Reaper is what you play is what you get. (That's what I prefer.) Ableton is what you hear is what you get.

See also: http://forum.ableton.com/viewtopic.php?f=3&t=106221&p=834240&hilit=latency+should+delay#p834240

yeah but that would make everything out of time when you play it back no? Because you are probably internally compensating for latency

jbone1313
04-18-2009, 09:23 AM
yeah but that would make everything out of time when you play it back no?

It sure does. It sucks. That's my whole argument in those threads in the link.

Its amazing how some people don't care about that.

Jae.Thomas
04-18-2009, 09:25 AM
It sure does. It sucks. That's my whole argument in those threads in the link.

Its amazing how some people don't care about that.

i mean, what you PLAY is what you get being the one that sucks

HEARING what happens is the verification that you got it right, no? So then, you compensate according to what you HEAR no?

jbone1313
04-19-2009, 05:55 AM
i mean, what you PLAY is what you get being the one that sucks

HEARING what happens is the verification that you got it right, no? So then, you compensate according to what you HEAR no?

I see your point, but I prefer what you "PLAY". However, as I argued in those threads, there is a legitimate use case for for both options.

I'm a drummer, and I was noticing in Ableton Live that all of my recorded beats were late. It was only until I found out that Ableton records what you HEAR, did I determine what the problem was. When banging out beats on a padKontrol, I'm not really doing any mental latency compensation. In fact, I guess I (and others) usually don't mentally compensate for the latency.

Again, a lot of this depends on the user knowing how the DAW handles these things, and adjusting his or her playing accordingly.

And again, those threads are a good (yet long) read, about these matters.

:)

jbone1313
04-19-2009, 06:00 AM
From the Ableton thread:



The below also applies to Audio when recording and monitoring audio with an audio effect on your track.

When record monitoring MIDI software instruments, Ableton Live records MIDI notes and then shifts them back according to system/plugin latency. This is to represent what is heard through the speakers as opposed to what is directly played on the MIDI keyboard or Pad. This is because MIDI notes should be played actually infront of time to manually account for the system latency within Live. Thus on playback Live delays the notes to represent what was heard (when the player was trying to play the output sound in time) rather than what was directly played on the MIDI instrument.

This allows Live to remain constantly in sync with 'live playing' within a latent software environment when monitoring through this environment. Live uses this method which is different to common DAW methods due to Lives 'Live' concept - where juggling plugin and system latency is managed in the whole system on playback AND recording. Standard DAWs use a different management system that does not account for all latencies - although this method does not induce a MIDI recording delay. If you feel it is essential to record softsynth MIDI without Lives MIDI delay you can record into an unmonitored MIDI track and shift that MIDI recording into a softsynth track for playback.

Lawrence
04-19-2009, 07:21 AM
@JBone

I had a similar issue in my studio using real drums triggering midi drums and using electronic trap kits. What I had to do to record - what I hear - (at that exact timing) was to tune the daw recording adjustment to also account for playback system latency. The daw handles the recording latency but I had to account for the playback latency manually... the delays through other things before anyone performing against it actually hears it and reacts.

Loop the output back into the input and measure the difference. If you have a performance room, send your headphone amp output back into the daw from there and measure the difference.

You may have to tune/adjust the daw to account for that. I'm pretty sure Reaper has a recording adjustment for that.

Dstruct
04-29-2009, 06:05 AM
That's a saucy bit of program, isn't it.

I believe the app is simply telling you to use QPC timestamps. Apparently in Cubase you can only use QPC timestamps with DM or emulated DM ports, but in Reaper you can use QPC with the normal Windows MIDI port.

MMh,

this is some new info from RME:

Our 2.x series drivers used TGT. It was based on our own MME MIDI dll handling the MIDI stuff. Our current 3.x series driver is using Microsoft's miniport driver model, therefore we no longer use TGT or QPC - the operating system does, but honestly I do not know at this time which one that would be.

What makes it so complicated is that audio and MIDI must have the same relationship. 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 - there you have it...
http://rme-audio.de/forum/viewtopic.php?pid=25178#p25178

So what to use in Reaper? Could you implement a loopback test which could test the interface for the best option?

schwa
04-29-2009, 06:26 AM
It would be tricky to build a generic "test your interface" loopback into Reaper, because a user might not have a connection between their MIDI input and outputs (or might have only inputs or only outputs or whatever).

In your case it sounds like you want to let Reaper timestamp MIDI events, though (I think letting Reaper timestamp events would only be the wrong thing to do in odd circumstances).

Dstruct
04-29-2009, 06:37 AM
It would be tricky to build a generic "test your interface" loopback into Reaper, because a user might not have a connection between their MIDI input and outputs (or might have only inputs or only outputs or whatever).

Yeah. But you could tell the user to plug a cable between the input and output (on the same interface) for this ...


In your case it sounds like you want to let Reaper timestamp MIDI events, though (I think letting Reaper timestamp events would only be the wrong thing to do in odd circumstances).

Ok, thanks!

Dstruct
03-13-2010, 01:35 AM
As far as I know, the RME HDSP WDM driver 3.077 doesn't have DirectMusic MIDI support. This means I need to use the emulated MIDI ports. But REAPER doesn't list them :(

Ok, RME HDSP driver (since version 3.066) has DirectMusic MIDI support. But does REAPER make use of it too?

Kundalinguist
03-14-2010, 03:26 PM
RME HDSP here too. About to move that card into a PC. Curious as to know how it will get along with the rest of the class.

eepyikes
03-18-2010, 05:34 PM
So, can someone translate this? If I have an RME FF400 and use its midi in port to trigger vsti's in Reaper on Win7, do I need to let Reaper timestamp it or what? Also isn't there some new timestamping thing in Win7?

Neve
03-18-2010, 05:45 PM
Nope, I must disagree.

Quoting people is fine, and removing non-pertinent parts of the quote is also OK.

Changing the quote to say something quite different is not the right way to do things.

IMO, of course.

Agreed 100%

Subz
03-18-2010, 09:15 PM
Subz Rocks

IMO, of course.


:-P

lol

Mink99
01-02-2015, 08:18 AM
As this is the most accurate topic on reaper midi internals, but from 2009/2010 , is there anything to happen in v5 ?

ELP
01-02-2015, 09:10 AM
Nö, eigentlich unglaublich aber wahr und wenn man ehrlich sein würde, ist´s auch nur ein Spiegelbild von dem was in Dingen Midi bei der Reaper DAW passiert......
denn fast 5 Jahre später, gibt es immer noch keinen Standard Midi-True Modus.
Oder sollte man besser schreiben.. noch nicht einmal einen MIDI True Modus?

EvilDragon
01-02-2015, 09:18 AM
OK, now in English, since this is in English part of the forum. :) Google Translate does it relatively fine, but it's still nice to be on the same page with each other. :)

xpander
01-02-2015, 10:04 AM
ED is right. What is a Standard MIDI True Mode? Are you talking about MIDI Modes, ie. the generic Channel Mode messages (All Sound Off, Reset All Controllers, Local Control, All Notes Off) and/or the actual voice assignment Channel Modes (Omni Off, Omni On, Mono On, Poly On)?

EvilDragon
01-02-2015, 10:06 AM
I think he wanted to say MIDI Thru mode. Schwa was talking about how Reaper should have it (FIVE YEARS AGO) and then nothing happened. Like so many other things in Reaper. :/

xpander
01-02-2015, 11:04 AM
Ah, MIDI Thru, thanks ED.

ELP
01-02-2015, 03:16 PM
Of course, MIDI Thru instead of true was meant.
But I have also written deliberately MIDI True instead of (Thru), as a kind of allusion pun. ;)

And SRY
this is of course the English -language forum, but I had to grade to the topic Reaper and MIDI
no desire for English ... :(

But Evil Dragon has correctly written what I in coarse said.
Thank you ED . :)

And now maybe for the next possible10 years nothing else but video
with a little bit different transitions and or effects in a DAW for musicans. :D

But I am getting happy to surprise a better.... ;)

Mink99
01-03-2015, 06:28 PM
The beginning of this thread is interesting, because it explains the coupling of the audio and midi timing, and why certain things therefore cannot work as expected, eg an early clock or manual compensation of hardware-midi latency larger than the audio latency.

Now, 5 years after this design-decision was made, to have the coupling , maybe this would be the perfect moment to think of an alternative approach.

But still (hardware)midi seems to be not in the focus of the devs and the majority of the users.

ELP
01-04-2015, 07:31 PM
#############################
FIVE YEARS AGO:

schwa:
if you want no MIDI latency while playing live, the MIDI signal from your controller to the hardware synth has to go around Reaper,
by routing the MIDI cables either physically or virtually.
When we add MIDI thru, everyone will be happy.
#############################
Until today nothing is happen...

What is reaper if i have to go around reaper? :D :D

MIDI Thru is extremely important for live playing in sync with that what do you hear from Reaper.
Especially when local is off or slave rack synths are triggered and extremely,extremely,extremely important if also the midihardware audio out is routing to reaper Audio In > DAW Mix >Audio out
Without it is nearly impossible to hear your "sync live playing" in sync.

By the way I go around reaper in fact and use for fast midi routing loopMIDI and sometimes RTPMidi | both Tobias Erichsen
and the genius little MidiTrix of Hermann Seib for routing/patchbay/transform/filter and many other live important things.
But the good intention/way is it certainly not to (must)go around reaper.......

Love developer please, please, please it´s time now to add a MIDI Thru option!
As in any other DAWs holding something up..............

Thank you

EvilDragon
01-05-2015, 12:35 AM
Yeah, schwa. Don't promise something you can't keep. :D 5 years is really too long a wait - and we know you can do it in like 5 minutes. Or hours, tops. :D

Evan
01-05-2015, 04:46 AM
No, please, DO promise stuff you can't keep. Just make sure you keep the promise. :D

alextone
01-07-2015, 05:26 AM
As a suggestion to the devs, jackaudio and jackmidi comes in 3 OS flavours, win, mac, and linux.

The midi is sample accurate.

Maybe have this as an additional audio and midi interface?

Alex.

Mink99
01-10-2015, 04:47 PM
No jack please .

Keep this with linux and that will be ok.
Both Windows (to some extend) and OS X already have an Infrastructure that is able to handle the required features. So there is no need to put something completely overengineered on top of these (as the win and OS X implementations of jack are just wrappers) when there is no real use for the enhanced features, and the core remains.




Just a provide proper implementation based on the os-specific features. There was obviously a design decision some 5 or 8 years ago that has proven to be not fully adequate to the requirements.

Icchan
08-08-2015, 11:15 PM
I ran into this problem just recently with more exotic piece of hardware and routing. I have external piano module that I want to record midi and audio of at the same time, and give myself a possibility to edit the midi afterwards.

All the midi notes that I record are ahead of time no matter how much I try to twiddle with the adjustments of latency compensations. It doesn't matter if just audio is in line with the grid, but I want to see the midi notes in their proper places too.

Right now it's like this:

Follow metronome and play some notes -> audio is recorded Where it lands. MIDI is recorded consistently early.

Play it back -> same result what you played. Quantize it and move it to the grid -> audio is now late if recorded from MIDI track.

Delay MIDI output appropriate amount -> recorded notes are still early if not quantized after recording and now the Audio is early too since it's latency compensated.

Could you make it so that MIDI is put where it's supposed to be after recording (considering all the delays in MIDI separately from AUDIO delay), and when played back, it's delay compensated to earlier time automatically to keep the audio in synch? (like it's currently possible to do)

Mink99
08-08-2015, 11:27 PM
There are things to happen in v5. Let's wait for v14b.

esosotericmetal
08-09-2015, 10:24 AM
Super helpful thread. Always sensed there was something off with MIDI timing in Reaper but just settled on it being one it's weaknesses or the flakiness of midi timing in general. Plus, I usually do most of my midi heavy projects in other DAWs (looking forward to improvements in Reaper that change that though!).

For OSX there is a great piece of free software I use that will let you route midi outside of Reaper: http://notahat.com/midi_patchbay/

Subz
08-09-2015, 10:39 AM
RC14b and midi out clock is still only in sync when starting from very start of project! starting anywhere else is hit and miss (different offset every time)

MPD/MPC external device.

Subz

ELP
09-06-2015, 10:59 PM
use v5.02rc3 or stable 5.01 .
These include the SPP & START M-Clock option for AKAI and other devices.

EDIT:
or greater.
For various reasons, MIDI user should use >=V5.1x

Subz
10-30-2015, 09:15 AM
use v5.02rc3 or stable 5.01.
These include the SPP & START M-Clock option for AKAI and other devices.

YES!! (just tested the new (no SPP) option today!

My MPD26 is as tight as in Logic now!!

Thank You and well done to the team!!!

now to dig up my bug report and mark as solved

Subz

EvilDragon
03-22-2016, 10:08 AM
Time to bump this thread asking schwa for MIDI Thru again. :)

"When we add MIDI thru, everyone will be happy."

What seems to be the problem in implementing this to Reaper? :(

Soli Deo Gloria
03-24-2016, 07:42 PM
Time to bump this thread asking schwa for MIDI Thru again. :)

+1000. Definitely a must.

ivansc
03-25-2016, 04:19 AM
Maybe if we bump this every eight hours?

:D



Just about given up on ever seeing this, to be honest.
And of course our boy is a trifle busy with all that "spider writing" stuff at present.

NextLevel
03-25-2016, 03:38 PM
MIDI timing, when it comes to rendering the output(MIDI data, not audio) of an arp., or sequencer type plugin is a total joke, sad to say. :(

You end up with not only f'ed up timing, but also notes that get cut short, or zero length notes. Most of the time no two renders are even the same.
It's been like this for at least the 7 years that I've been using REAPER.

So.., come on devs, please give us a solution, be it a seperate(optional) mode that does'nt rely on the audio engine timing or whatever.., just please fix this, it's absolutely maddening!!!

markyboard
03-26-2016, 03:16 AM
Yes PLEASE!

snooks
03-26-2016, 06:07 AM
MIDI timing, when it comes to rendering the output(MIDI data, not audio) of an arp., or sequencer type plugin is a total joke, sad to say. :(

You end up with not only f'ed up timing, but also notes that get cut short, or zero length notes. Most of the time no two renders are even the same.
It's been like this for at least the 7 years that I've been using REAPER.

So.., come on devs, please give us a solution, be it a seperate(optional) mode that does'nt rely on the audio engine timing or whatever.., just please fix this, it's absolutely maddening!!!
I agree that block size should not affect render timing, but if you set your render block size to 32 samples or something (Preferences->Rendering), timing is tight as a gnat's chuff.

snooks
03-27-2016, 04:51 PM
Although that will work, I was distracted by the JS Arp and BlueARP having the same bug of sending all MIDI at the beginning of a block. It looks like Kirnu Cream also misbehaves at buffer sizes greater than 4096, but is fine apart from that.

So there is no issue with timing of arps/sequencers in Reaper other than the bug in JS MIDI Arpeggiator.

Thepinkfreud
09-13-2016, 02:52 PM
So I've been evaluating reaper for a while now and honestly it's a great DAW. I've been lurking in these forums for a while and I gotta say the Reaper community is great. All the answers to my reaper related questions have been answered with the search engine so I never felt the need to register,hence my first post here.
I had to chime in and keep this thread alive. The main factor that keeps me from purchasing a license in reaper are these glaring MIDI Issues.
I bought a midi controller to input midi vst drums etc a while back and recently tried to integrate into my workflow and it's unusable with Reaper. The midi offset just simply doesn't work. I'm able to get low latency with my soundcard, down to 64 samples with a little tweaking yet still even after the latest update the midi that appears in the editor is not to the grid following the metronome as I played the notes. I've tried everything.

This is extremely disappointing considering these issues were present over 5 years ago in reaper according to these comments here. Having the ability to use MIDI in my workflow is important and it's not happening here.. As much as I love reaper I've lately started looking into the possibility of using other DAW's instead strictly because of these issues the Cockos team somehow continues to ignore. Yes, working MIDI IS important.
MIDI is reaper weakest link. Why would it not be a priority? What's more important at this point? Everything else works without a hitch. Users aren't asking for something spectacular, just something that works. I've spent waaay more time trying to make this work than the actual writing and playing. Half my away from playing time is spent researching ways around these issues, it's a shame. Not sure if this will ever get addressed at this point. Ruins a truly great program. Anyways, I want to say thanks to the community here for all your knowledge. I've learned a ton from this forum!! Joel

ivansc
09-14-2016, 01:17 AM
Got to ask: What hardware setup are you using?
I have both a Korg Nanopad and a Roland TD8 e-kit running into an RME HDSP9652 pci interface. Computer is an older i7 4 core with 16gb of ram.
I run several different drum romplers from this setup and no longer have a significant difference between what I play and what gets recorded in MIDI.
Mind you I am running 32 to 44 ASIO buffer most of the time.
Reaper is reporting round-trip latency at about 2ms typically and when I actually play in time, the MIDI is recorded as near as dammit right on the grid.

What sort of numbers in ms are you talking about, that makes Reapers MIDI recording unusable for you? There may well be other factors at work here.

Thepinkfreud
09-14-2016, 02:39 PM
It's just a focusite interface, nothing too spectacular but I suspect the issue might not be hardware related. I don't have any issues with audio. MIDI is a different story. Like I posted above my soundcard's latency is down to 2-3ms when I perform MIDI drums with my korg padkontrol. I manually change the buffer for this, as low as 64 samples if the project will allow it and set it higher for mixing. Now, although I'm not 100% positive of this and appreciate any input for a possible fix, the issue seems to stem from reapers inability to correct for latency after the fact. I can do a simple 1/8 note 4 on the floor bass drum kick that nails the metronome click and when I open the MIDI editor, some notes are on the beats but they gradually taper off incrementally. I then have to marque select them and shift then in time. Defeats the whole purpose of the controller. I might as well input to grid permanently. I've tried manually correcting by inputting the latency amounts but the problem persists unfortunately!

mccrabney
09-14-2016, 03:10 PM
is your midi item in project or source timebase? i think that reaper defaults to the latter, which seems backwards to me. might be the cause of your problems.

Jack Winter
09-14-2016, 03:13 PM
I can do a simple 1/8 note 4 on the floor bass drum kick that nails the metronome click and when I open the MIDI editor, some notes are on the beats but they gradually taper off incrementally. I then have to marque select them and shift then in time.

Sounds like a clock drifting. Windows has several midi timers and this has been a problem for ages.. Have you tried the different advanced midi event timestamp options available for each midi input?

Thepinkfreud
09-14-2016, 03:34 PM
I didn't know about the MIDI timestamp advanced options honestly. This is good news because I'm chomping at the bit to either try and adjust something or throw the padkontrol out in traffic. I'd rather try the former first.
Where should I start? Preferences>

Dstruct
09-14-2016, 03:42 PM
Options/Preferences/Audio/MIDI Devices - rightlick device - configure ...

Thepinkfreud
09-14-2016, 04:56 PM
Thanks for everyone's help. So in the settings for MIDI configure input on my device "let reaper timestamp events" was selected. Now, I'm a bit out of my element here because I'm not sure what impact this has on my issue at hand. I've heard that some users have had success with the QPC option. Can anyone shed some light on the differences?

Thepinkfreud
09-14-2016, 05:12 PM
is your midi item in project or source timebase? i think that reaper defaults to the latter, which seems backwards to me. might be the cause of your problems.
I'm using the Padkontrol to send MIDI messages through the track MIDI input port controlling drum VST's. I would assume that's considered "in project"?

EvilDragon
06-24-2020, 04:47 AM
4 years necrobump.

11 years passed since the thread was created. Basically when I joined this forum! :)

schwa/Justin - is it really that difficult to add a MIDI-thru mode, adjusted per MIDI device? :(

beingmf
06-24-2020, 05:10 AM
@Thepinkfreud: Have you tried to un-tick Master/Parent send in the track channel routing window? Then send midi to a different track?

EvilDragon
06-24-2020, 05:12 AM
He last posted 3 years ago, don't think he's around still. (Also shame that @ on this forum doesn't really notify the user...)

beingmf
06-24-2020, 05:42 AM
(Also shame that @ on this forum doesn't really notify the user...)

Absolutely - also the thread that you've just replied to (and you want to edit) won't show up under "New Posts". Just sayin'.

EvilDragon
06-24-2020, 05:44 AM
True but it's back on page 1 in pre-release discussion subforum, which is good enough ;)

Kundalinguist
06-24-2020, 03:26 PM
The older this thread gets, the closer we are to the solution.

[ :) Hey Evil. ]

Reno.thestraws
06-29-2020, 04:04 AM
True but it's back on page 1 in pre-release discussion subforum, which is good enough ;)

Bump for maintain on PAGE 1 :)

Kejnel
08-11-2022, 03:23 PM
4 years necrobump.

11 years passed since the thread was created. Basically when I joined this forum! :)

schwa/Justin - is it really that difficult to add a MIDI-thru mode, adjusted per MIDI device? :(

2022 bump.

A very annoying issue that currently requires complicated workarounds.

Kundalinguist
08-11-2022, 05:30 PM
Please note: When replying to the post of a forum member in this thread, it is best to check the obituaries in case that person is no longer with us. May they RIP.

:) [Sorry, couldn't resist. 2009 and all...]

However, I think that MIDI timing in Reaper is pretty reliable these days. For me, one of the things that made a difference was switching from my MIDI cables going into my Focusrite interface and using a USB connection instead via a Roland UM-ONE MkII. Cheap. But it made a huge difference when I was recently tracking an external hardware synth with a song I had written. Prior to the USB connector, I was getting jitter so bad that I couldn't even use the tracks; who wants to do that much wave form editing? Not me. Now, it's tight as a nun's ...um, well you get the idea.

Kejnel
08-11-2022, 05:34 PM
To me it is unacceptable that the audio buffer still influences the midi timing even when attempting a mere midi thru with a midi controller.

I currently have to bypass Reaper with virtual midi cables in combination with Midi Ox to hear no midi delay with an external synth and also pass midi *to* Reaper in order record the midi performance... awful.

I need to use higher buffer settings because Reaper starts to pop and crackle on anything lower than 128 samples (while 128 and higher cause already an unacceptable midi delay for me).

sockmonkey72
08-12-2022, 01:27 AM
To me it is unacceptable that the audio buffer still influences the midi timing even when attempting a mere midi thru with a midi controller.

I currently have to bypass Reaper with virtual midi cables in combination with Midi Ox to hear no midi delay with an external synth and also pass midi *to* Reaper in order record the midi performance... awful.

I need to use higher buffer settings because Reaper starts to pop and crackle on anything lower than 128 samples (while 128 and higher cause already an unacceptable midi delay for me).

I don't think you'll find many DAWs which do this "acceptably". Imagine what happens behind the scenes:

- OS callback that MIDI events are available
- MIDI events collected for processing
- audio thread(s) is/are serviced, MIDI events dequeued and passed to output for each track

The only way to do this the way you're suggesting is for the sequencer to publish ports and channels which might be subject to additional processing, so that the OS MIDI callback can collect them, and pass everything else on directly. That would be annoying, especially considering the "normal" case of a MIDI input for all ports/channels. But not impossible.

But then there's the question of MIDI remote control of actions and parameters, which would also need to be collected and accounted for (and in the case of parameter remote control, executed at the correct sample time for the audio). As well as the new MIDI RR.

As well as the fact that if _some_ MIDI ports are processed, and others not, you'll get timing inconsistencies between different devices/ channels. Which would also be unacceptable.

All in all, I'd say that the REAPER solution is totally acceptable, and I think it's no different than any of the other DAWs I've used over the years. I use almost exclusively external MIDI in my studio, at least while tracking, and I have rarely noticed any severe problems.

Which isn't to say that you are imagining things, but maybe it's a configuration issue rather than a systemic problem if you are getting really high latency -- ~2-3ms latency (128 samples at 44.1kHz) is less than what many MIDI interfaces introduce, before the MIDI even gets to REAPER, and I don't consider that high.

The typical solution (and what I often do if I have these sorts of problems [almost never]) is to patch the external hardware into your mixer, or turn on your audio interface's no-latency monitoring mode so that you can monitor directly from the instrument, while letting the software do its thing.

ReinerZ
12-31-2022, 02:30 AM
To me it is unacceptable that the audio buffer still influences the midi timing even when attempting a mere midi thru with a midi controller.

I currently have to bypass Reaper with virtual midi cables in combination with Midi Ox to hear no midi delay with an external synth and also pass midi *to* Reaper in order record the midi performance... awful.

I need to use higher buffer settings because Reaper starts to pop and crackle on anything lower than 128 samples (while 128 and higher cause already an unacceptable midi delay for me).

I was not aware that there is a discussion going on for a long time, so I already prepared a post in the editor. Just to make sure that it is the same issue referenced by Kejnel:

The actual situation is as follows: I wrote a VST3 plugin using Cabbage which for a certain preset simply sends a midi note on for every quarter note. At 120bpm the note-on events should be at exactly 0, 0.5, 1.0, 1.5… seconds. Checking with the JS MIDI logger I get 0.4985, 0.9977… 5.9900, 6.5009… seconds. That would be consistent with the spacing of the MIDI note-on events being reduced to 0.49923 seconds which is 43*512/44100 (in the audio device settings I have buffers: 4x512). It does not lead to a drift because from time to time (here between 5.9900 and 6.5009) intervals of 44*512/44100 are inserted.

Although this only leads to a jitter of max. 11.6 ms I agree with Kejnel that there should be no limitation to the timing precision of MIDI routing by the audio buffer length. (It took me three weeks to find this out because I would have never expected.) Is there any possibility to 'upvote' this request somewhere?

As a workaround, what would be a reasonable setting for the buffer without getting the pop/crackling issue? I tried 4x256 but even that did not work properly.

Finally, I saw that JS plugins (e.g. the MIDI transposer) are perfect with the MIDI timings. So why does it work for those and not for VST3? I would prefer to stay with VST3 to keep the plugin portable to other DAWs.

Tale
01-02-2023, 12:19 AM
Finally, I saw that JS plugins (e.g. the MIDI transposer) are perfect with the MIDI timings. So why does it work for those and not for VST3? I would prefer to stay with VST3 to keep the plugin portable to other DAWs.
A wild guess, but: I would expect that MIDI effects like a transposer don't touch the MIDI event offset, so if the timing is correct going in, then it will also come out correct.