Old 03-23-2016, 02:09 PM   #1
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default midi timing issues and offset

I've been having a lot of issues with midi timing when triggering external hardware. After adjusting some settings it seems to be pretty good now but I'm still not able to get the output offset to function to compensate for round trip latency. I set the value of the midi interface offset output to "-30ms" which I'm assuming would play any midi data going to that device 30ms earlier than where the data actually occurs on the timeline. I've tried setting the value to very high numbers like -350ms just to make sure and it just doesn't seem to have any effect.

Is there a better way to do this? I read the offset value could be negative but now I'm wondering if that's the case.
thanks
Tycho is offline   Reply With Quote
Old 03-23-2016, 10:17 PM   #2
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

I'm not sure that I understand what you're doing. When you say that you are setting a MIDI offset value, where is that happening? Maybe you mean the audio interface latency offset in Preferences > Audio > Recording?
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 03-24-2016, 02:03 AM   #3
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

in the midi devices dialog. if you double click any of the output ports you get another dialog where you can set an output offset value in miliseconds

https://i.imgur.com/BrijYDK.png
Tycho is offline   Reply With Quote
Old 03-24-2016, 02:17 AM   #4
snooks
Banned
 
Join Date: Sep 2015
Posts: 1,650
Default

The negative offset value for direct MIDI outputs is limited to the buffer size you are using. You can use ReaInsert for bigger delays though.
snooks is offline   Reply With Quote
Old 03-24-2016, 09:58 AM   #5
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,672
Default

sorry this is very off topic

i know you've asked about "entering the midi editor without a pre-existing midi item" in the past so i thought i'd post this here:

http://forum.cockos.com/showthread.php?t=160008

this is a script that checks for an existing midi item, and if one is NOT there, it creates on and opens it. i follow this up with an action that extends the new midi item to the time selection bounds. this allows for a more hardware-sequencer style workflow.

you're one of my favorite musicians. keep up the great work.
mccrabney is offline   Reply With Quote
Old 03-24-2016, 10:12 AM   #6
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,595
Default

are you triggering the MIDI through ReaInsert or routing from MIDI track to output to new track?
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 03-24-2016, 03:24 PM   #7
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Quote:
Originally Posted by Tycho View Post
in the midi devices dialog. if you double click any of the output ports you get another dialog where you can set an output offset value in miliseconds

https://i.imgur.com/BrijYDK.png
That is a new one to me. I don't use any external MIDI devices.

Assuming that the concern is recording the audio back from the external MIDI device, what snooks said about using Reainsert should work for delaying the timeline to the incoming audio without messing with the MIDI offset settings. (Sorry, I don't mean to be pedantic, but maybe someone else reads this thread who doesn't understand what snooks meant by using Reainsert for this.)

Btw, I have come across some of your tunes on youtube. Good stuff.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 03-24-2016, 05:43 PM   #8
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

thanks!

Quote:
Originally Posted by mccrabney View Post
sorry this is very off topic

i know you've asked about "entering the midi editor without a pre-existing midi item" in the past so i thought i'd post this here:

http://forum.cockos.com/showthread.php?t=160008

this is a script that checks for an existing midi item, and if one is NOT there, it creates on and opens it. i follow this up with an action that extends the new midi item to the time selection bounds. this allows for a more hardware-sequencer style workflow.

you're one of my favorite musicians. keep up the great work.
Tycho is offline   Reply With Quote
Old 03-24-2016, 05:45 PM   #9
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

Quote:
Originally Posted by EpicSounds View Post
are you triggering the MIDI through ReaInsert or routing from MIDI track to output to new track?
I'm playing midi notes from the timeline which are routed via the track's output config to an external midi port which is in turn connected to a hardware synthesizer. in the case of the minilogue it's just a direct USB/midi connection.
Tycho is offline   Reply With Quote
Old 03-24-2016, 05:47 PM   #10
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

Quote:
Originally Posted by brainwreck View Post
That is a new one to me. I don't use any external MIDI devices.

Assuming that the concern is recording the audio back from the external MIDI device, what snooks said about using Reainsert should work for delaying the timeline to the incoming audio without messing with the MIDI offset settings. (Sorry, I don't mean to be pedantic, but maybe someone else reads this thread who doesn't understand what snooks meant by using Reainsert for this.)

Btw, I have come across some of your tunes on youtube. Good stuff.
I actually need a negative delay though, it's too delayed as it is. And this isn't due to the round-trip latency of the interface. The midi is noticeably delayed / out of time even when hardware monitoring. There just seems to be a consdierable lag on all outgoing midi data (around 1/32 - 1/16 beat in a song around 120bpm). this seems to be consistent across various midi interfaces.

Will keep working on it, thanks for all the input
Tycho is offline   Reply With Quote
Old 03-24-2016, 06:10 PM   #11
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,746
Default

Quote:
Originally Posted by snooks View Post
The negative offset value for direct MIDI outputs is limited to the buffer size you are using. You can use ReaInsert for bigger delays though.
This is correct! Well, rather than "buffer size" it would be more like the difference between audio device output latency and MIDI device output latency, which would be approximately one buffer.
Justin is online now   Reply With Quote
Old 03-24-2016, 06:13 PM   #12
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,746
Default

Quote:
Originally Posted by Tycho View Post
There just seems to be a consdierable lag on all outgoing midi data (around 1/32 - 1/16 beat in a song around 120bpm). this seems to be consistent across various midi interfaces.
What MIDI interfaces? If USB and there's a USB hub, try it without.

If you're sending MIDI clock to those interfaces, might be worth disabling (so your events aren't competing with the clock). There shouldn't be that much latency on MIDI outputs, usually it is considerably less than the audio device's output latency. If you're running with very small buffer sizes, try the low precision/low output latency mode and see if that helps too.
Justin is online now   Reply With Quote
Old 03-24-2016, 06:24 PM   #13
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

awesome thanks justin. I'm using a korg minilogue via usb and an iconnectmidi 2 which is also usb. tried with and without hubs. will try disabling the clock and precision modes.
thanks
Tycho is offline   Reply With Quote
Old 03-24-2016, 06:39 PM   #14
snooks
Banned
 
Join Date: Sep 2015
Posts: 1,650
Default

In case you still have issues, the "delay" I mentioned with ReaInsert was a negative delay. If you don't have the track with ReaInsert on it rec-armed you'll notice playback start delayed by the PDC amount and during this time MIDI is being sent.

If the track is rec-armed then playback starts on time, but any notes within the PDC time are not played because when you press play the MIDI after that time is sent. So if the first few notes are the same it might seem like they are delayed instead of skipped.
snooks is offline   Reply With Quote
Old 03-24-2016, 06:58 PM   #15
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Maybe I'm misunderstanding what is going on, but I think that Reainsert should work for this. I'm playing around with a digital guitar processor to see how well Reaper compensates for the delay, and it is working as it should.

So what has to happen (I think you know this already) is that playback of other tracks need to be delayed by the amount of latency being introduced by the Reainsert path. So, let's say that your MIDI output connection is introducing some delay, and the audio return is introducing some delay. After adding Reainsert to the MIDI output track, if there is still some delay, then you will need to add a positive value to the 'Additional Latency Compensation' box in Reainsert, which will delay the other tracks by that value.

Edit: This is a little confusing, considering pdc and all.
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 03-24-2016 at 07:03 PM.
brainwreck is offline   Reply With Quote
Old 03-24-2016, 07:55 PM   #16
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

ahhh, got it. by putting an audio effect in the path of the midi you are forcing all other tracks to play back in accordance with the negative offset of that track?
thanks for the insight, makes a lot of sense.
Tycho is offline   Reply With Quote
Old 03-24-2016, 09:22 PM   #17
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,595
Default

This is how I use ReaInsert with my Meeblip.

My keyboard is USB only so I have to route through my control surface's MIDI out port to the synth.

https://www.youtube.com/watch?v=MKEc0bYwJe8

__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 03-24-2016, 10:12 PM   #18
Tycho
Human being with feelings
 
Tycho's Avatar
 
Join Date: Jan 2011
Location: San Francisco
Posts: 461
Default

Quote:
Originally Posted by EpicSounds View Post
This is how I use ReaInsert with my Meeblip.

My keyboard is USB only so I have to route through my control surface's MIDI out port to the synth.

https://www.youtube.com/watch?v=MKEc0bYwJe8

wow I had no idea reainsert could do all of this. thanks for the info
Tycho is offline   Reply With Quote
Old 08-12-2016, 11:24 AM   #19
lambdoid
Human being with feelings
 
Join Date: Aug 2009
Posts: 129
Default

I've made a kick loop with my Minilogue and I've noticed there's an initial delay when I hit record of ~50ms, but on subsequent passes of my loop, the delay reduces to ~10ms which is still enough to be noticeable but isn't as much of an issue. I never noticed any such delays with my Access Indigo 2 so it's clearly a Korg issue rather than a Reaper issue.

Edit- I think I've solved it. If you add a couple of bars of preroll before recording(in the metronome page), the timing is perfectly in sync when you record. No offsets or Reainsert necessary.

Edit- no I haven't- ignore.
__________________
http://soundcloud.com/lambdoid

Last edited by lambdoid; 08-12-2016 at 12:19 PM. Reason: Update
lambdoid is offline   Reply With Quote
Old 10-27-2020, 06:14 PM   #20
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 79
Default

Hello all, I would like to follow up on this and see if anyone knows how to solve a related problem. I've never been so frustrated in my life, it seems like this is a REAPER problem that so many have talked about going all the way back to 2007...

It seems specifically related to MIDI Clock Output Latency. Which is important, because it's how the patterns on the 303 are triggered to be played. You can't send MIDI notes into the 303 and play it like a normal MIDI Synth. My other external synths have no issues with REPAER on that front when I use ReaInsert.

I am trying to get my Behringer TD-3 to start at exactly 1.0.0 / Project Start, along with my VST drums.

It seems impossible! It appears to be a latency from the MIDI Clock Out signal. No setting anywhere affects the red box I have drawn around the highlighted yellow latency in the Recorded Audio Clip.

- Disable PDC Latency = No Change
- Recording Stereo / Stereo Latency Compensated = No Change
- Adjusting ReaInsert "Additional Delay Compensation" to TENS OF THOUSANDS of positive / negative samples = No Change
- Configure MIDI Output "Offset Output to Device" = No Change
- Playback Time Offset = No Change
- Testing all of the above with an audio interface 1024 Buffer Size vs 64 Buffer Size = No Change
- Resetting all my REAPER settings = No Change

WHAT IS GOING ON HERE?!?! PLEASE HELP JUSTIN I...WE BEG OF YOU. I would literally DO ANYTHING.



The only thing that makes a difference, is disabling the MIDI Clock Out, and using some hacky JS to Generate a Custom MIDI Clock. Even then, that only allows me to delay the start of the recording, and not negatively adjust it to be on time with the very beginning of the project.

I'm aware a solution is delaying ALL OTHER TRACKS EXCEPT THE 303, but when working in a project with 10+ external synths, and tons of other external effects, and lots of other audio and midi tracks, that's like a NIGHTMARE! Agh Why cant we just adjust a single midi port to be negative?!?!

EDIT: So I was able to align the audio by setting the "Output Manual Offset" to 115 ms in the REAPER Recording Preferences. As seen here, and now the audio is at the start of the recording.

What I am afraid of, and what I don't know -- is will this setting affect my other external audio effects, synthesizers, and midi ports? I use the MOTU Micro Lite, which has 5 MIDI Ports. I really only want this +115 ms on PORT #5, or on a specific audio in, and not my whole audio interface. Does anyone know of an effective way to isolate it to my MIDI PORT #5, or just a single audio track?!

EDIT 2 : When I disable Ozone 9 on my Master Chain, then everything gets out of whack and that 115 needs to be recalculated....wtf And, when I added the Ozone 9 Low End Focus VST (which adds a TON of samples to the PDC), everything is permanently out of whack again, even when disabled. It has to be completely removed from the chain. And the PDC settings seemingly dont get me back on time / change anything? Whats going on here? Is this expected, adding VSTS and needing to recalculate this 115 MS offset?!

Last edited by Opcode 7; 10-27-2020 at 08:40 PM.
Opcode 7 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:40 AM.


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