Old 09-18-2018, 05:58 PM   #1
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default An observation about MIDI timing

I do an enormous amount of MIDI in Reaper, and I must say that it has marginal timing,
but I did discover that, if there are a lot of audio tracks in your project, and you mute all the ITEMS (NOT tracks!), MIDI timing improves quite alot.

SONAR 8.5 and Logic 5.5 do not have this problem AT ALL

Last edited by woogish; 09-18-2018 at 06:26 PM.
woogish is offline   Reply With Quote
Old 09-20-2018, 08:52 AM   #2
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,201
Default

Do you have any measurements showing the amount of improvement?
I'm not casting doubt on what you hear, but without latency and/or jitter numbers, it's all opinion.

Here's one 'opinion' I have come up with: MIDI latency in Reaper is directly related to the amount of audio latency, on my system.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is offline   Reply With Quote
Old 09-20-2018, 06:59 PM   #3
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default

Yeh the measuring system is this - if it's in the pocket, and doesn't sound like
a drum set being thrown down a church stairway, then it's good for me.
woogish is offline   Reply With Quote
Old 09-20-2018, 07:09 PM   #4
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

I haven't looked into this yet, but according to what you're saying there should be a timing difference between recording the audio output of a drum sampler during performance vs. recording the MIDI input and letting it trigger the sampler at each playback.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 09-20-2018, 08:04 PM   #5
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

woogish, how many audio files are we talking before MIDI timing begins to be affected?
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 09-20-2018, 08:53 PM   #6
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by woogish View Post
but I did discover that, if there are a lot of audio tracks in your project, and you mute all the ITEMS (NOT tracks!), MIDI timing improves quite alot.
Humm, that's interesting, I'd like to see this tested out under some controlled tests to see if it's true. I don't think I've ever had a situation where the timing was messed up because of multiple audio tracks.

I do play nearly all my midi, about 95% of it, and my timing kind of sucks sometimes, especially with drums. I use a midi keyboard and I think my biggest problem, mainly with drums, is the distance the key has to travel to get the sound. I don't have near as much problem with piano or keyboard sounds.
Tod is offline   Reply With Quote
Old 09-20-2018, 09:29 PM   #7
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default

Quote:
Originally Posted by brainwreck View Post
woogish, how many audio files are we talking before MIDI timing begins to be affected?
About 15-20

I haven't tried organizing my tracks so the most important rhythmic elements (MIDI) are on top (drums, bass, piano rhythms, etc.) and the audio on the bottom. Will try this, and dutifully report back.......
woogish is offline   Reply With Quote
Old 09-21-2018, 06:48 PM   #8
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,668
Default

i cannot reproduce this but want to know if it's a problem that i haven't detected
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is offline   Reply With Quote
Old 09-21-2018, 07:06 PM   #9
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

I wonder what is meant by "MIDI timing"... MIDI sent from tracks to VSTi? from tracks to external hardware via track MIDI output? sent via ReaInsert? If to hardware, what MIDI devices?

If hardware, and is USB -- is the media stored on USB too?

Also quantitative tests would be a good idea rather than "not in the pocket"... surely the audio being muted would affect how things sound directly, nevermind the MIDI timing...
Justin is offline   Reply With Quote
Old 09-21-2018, 07:22 PM   #10
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 326
Default

Quote:
Originally Posted by Justin View Post
I wonder what is meant by "MIDI timing"... MIDI sent from tracks to VSTi? from tracks to external hardware via track MIDI output? sent via ReaInsert? If to hardware, what MIDI devices?

If hardware, and is USB -- is the media stored on USB too?

Also quantitative tests would be a good idea rather than "not in the pocket"... surely the audio being muted would affect how things sound directly, nevermind the MIDI timing...
And that is, with no other way around, the mindset of a programmer... and one capable of crafting the software you are using. I think it's a good idea to explore the options and think about them, before jump to conclusions...
__________________
Living la vida loca
Pasajeromoronmoreno is offline   Reply With Quote
Old 09-21-2018, 07:47 PM   #11
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 326
Default

Example, maybe stupid example, but a week ago, i come back to music... so, i open reaper, and start making music. Load some vsti's and start recording. All superb until i wanna do midi overdubs. I can't even remember my own tool bars and shortcuts, so, i press record again, and try to do it without thinking. All the notes choping, a fucking disaster. So i go to the forum to refresh my memory. Lots of bug reports, lots of shit, until i remember again the real meaning of overdub, latch, and touch, and where to set that, and where is it my reaper at. I had timing problems too, until i understand pdc and, where i want it, and where it was it. But that was me not understanding, the options are there.
__________________
Living la vida loca
Pasajeromoronmoreno is offline   Reply With Quote
Old 09-21-2018, 07:59 PM   #12
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 326
Default

And maybe you had timing problems, i never used external hardware, if that is your case, in the sense of reaper sending midi to a synth, always for me was external things sending midi to reaper-midi keyboards and controllers-, and, with that in mind, always, and always, was a mishap on my part if some of that was off. So, explain your self, beyond the muted items make it sound tight.

Edit: Sorry if i sound harsh, English it's not my language, and i speak it like a cave man.
__________________
Living la vida loca

Last edited by Pasajeromoronmoreno; 09-21-2018 at 08:21 PM.
Pasajeromoronmoreno is offline   Reply With Quote
Old 09-21-2018, 10:17 PM   #13
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

How I understand it is that there is some jitter involved with MIDI transmission in the first place (over MIDI cables). I haven't done any tests on this, but I have read that 1 ms jitter for transmission isn't abnormal. And there is much more jitter for MIDI over USB. But once MIDI is recorded into a daw, or is generated from within a daw, it plays back true in time to what was recorded.

So to know what jitter is involved in transmission and playback, we can test it to see what we get.

For transmission, we can test MIDI against audio. I did this years ago by putting a microphone very close to a key on a keyboard, holding the key down to just before it fully closed, striking the key fully closed with my nail, and looking at the time difference between the recorded audio peak and recorded MIDI note. Honestly, I forget what the results were. But my point is that anyone can do this for looking at transmission jitter.

On the playback side, if it is suspected that there is some jitter going, we can 'Save live output to disk' during playback under conditions where it seems that there is no noticeable jitter and again under conditions where it seems that this is jitter going on. Then the two files can be imported, sample aligned, and compared for any time differences.

Maybe someone else knows of better ways to go about testing for MIDI jitter.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 09-21-2018, 11:03 PM   #14
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,201
Default

Jitter is a tricky thing, best measured by statistical means, such as a histogram of latency over time. It is often simplifield into a single peak jitter or RMS jitter number, but that is an oversimplification. And for USB midi there are variants in the USB bus loading, the device drivers, the PC abilities and the operating system that come into play before Reaper ever gets the midi event. Not to say it can't be quantified, but it does point to the need for apples-to-apples comparisons. One cannot with any assurance say "it works fine on Win10 for me, you must be doing something wrong if you have problems" - there are just too many other variables involved.

That said, I have never experienced any perceptible (audible) issues due to midi jitter.

Latency is another thing altogether. There are a number of different latencies that come into play, depending on the hardware in use:
- MIDI input delay - time between a external instrument event like a key press until the midi data reaches Reaper

- MIDI output delay - time between Reaper outputting a Midi event until the USB (or 5 pin MIDI jack) shows a measurable electrical response. This matters when triggering an external synth from Reaper.

- Audio input latency - Comes into play when recording audio from an external synth

- Audio output latency - Matters when monitoring a VSTi instrument that is being played realtime

Many of these are internally compensated for by Reaper. Some scenarios cannot be; especially those due to USB loading, driver variability, and operating system foibles.

It's challenging to just measure these accurately, short of connecting an oscilloscope and logic analyser to the PC in question. It's not impossible, just difficult and time consuming, and leaves you with numbers that may not even be repeatable if Win10 updates itself on the next reboot.

It's a moving target in Windows especially, somewhat like trying to throw a dart out an airplane window and hit an ant each time.

My point in all this is that I think Justin and the Devs have done an astonishing job on dealing with latency compensation. It's better and more comprehensive than any other DAW I have used. But the target won't stop moving until realtime Linux is the OS of choice.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is offline   Reply With Quote
Old 09-21-2018, 11:41 PM   #15
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 326
Default

Quote:
Originally Posted by Philbo King View Post
One cannot with any assurance say "it works fine on Win10 for me, you must be doing something wrong if you have problems" - there are just too many other variables involved.

That said, I have never experienced any perceptible (audible) issues due to midi jitter.
That it's the main point of what i with my horrible english i was trying to say, thanks Philbo. Too many variables, it's not fair throwing the blame on reaper, or the solution in delete a bunch of audio items, without checking a ton of other things, and more so with so a subtle thing like midi timing and all the variables involved.
__________________
Living la vida loca
Pasajeromoronmoreno is offline   Reply With Quote
Old 09-22-2018, 07:07 AM   #16
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

I am ignorant on MIDI specifications. What is the time precision of MIDI performance interfaces (keyboards, electronic drums, etc.)? For a keyboard for example, there is scanning of key switches for changes. What is the precision of that process? What is the precision of MIDI timestamps? Without knowing these things, it seems pointless to look further upstream for time precision issues. Can anyone point me to some specification links on this topic?

Also, it is often said that Atari and Amiga had the best time precision for MIDI. What was the difference between those old machines and software vs. modern machines and software?

I have brought this up before, but I'll repeat it here. Would it make sense for elliminating so much of the 'moving target' to record MIDI signals as digital audio? I mean: MIDI output of performance interface ---> voltage attenuator ---> audio interface input ---> decode in software.

But before even thinking about any of that, we should know something about the time precision of the process of performed notes to creation of MIDI messages, before any transmission takes place.
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 09-22-2018 at 07:21 AM.
brainwreck is offline   Reply With Quote
Old 09-22-2018, 07:31 AM   #17
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by Philbo King View Post
Here's one 'opinion' I have come up with: MIDI latency in Reaper is directly related to the amount of audio latency, on my system.
That isn't an opinion (for MIDI input at least), if the buffer size changes, the latency from playing the key to hearing it follows. Otherwise, I agree with Justin and others, without specifics, we don't really even know what the OP is talking about - looks like they already have the audio and midi in reaper and I've never run into timing issues there that I can remember, IOW if I record the correct output of the MIDI track, it's sample accurate IIRC and if I don't it isn't out of the pocket.

If they have a higher buffer setting and doing very time-sensitive automation, the automation timing will be affected FYI.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-22-2018, 08:20 AM   #18
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Quote:
Originally Posted by karbomusic View Post
That isn't an opinion (for MIDI input at least), if the buffer size changes, the latency from playing the key to hearing it follows.
What you are describing is not a change in MIDI latency. It is a change in audio latency. Just to be clear, so that we arent' lumping everything together as being one thing.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 09-22-2018, 09:48 AM   #19
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by brainwreck View Post
What you are describing is not a change in MIDI latency. It is a change in audio latency. Just to be clear, so that we arent' lumping everything together as being one thing.
I'm good with that. Let's say when I set the audio latency low enough so that the latent audio is fast enough to not bother my playing, and record myself playing, the midi notes generally fall and playback where I expect them to.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-22-2018, 10:40 AM   #20
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Many of these are internally compensated for by Reaper.
True but I've never used a perfect system, meaning I've never owned a DAW where everything possible was sample accurate until I did various calibrations and adjusted the sample offsets for IO in the DAWs settings. I've done this in ever DAW I've ever owned.

With some light testing I was able to find somewhere between 1/4 and 1/2 millisecond of disparity (10-14 samples) between recording the output of a midi track (both audio and midi), applying FX as new take etc. but all of those I was able to get to sample accurate using the offsets in prefs. The only thing I didn't confirm is if there could be a condition where fixing one latency breaks another but beyond that, I can usually get it calibrated sample accurate. I can only do so much testing though.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-22-2018, 01:56 PM   #21
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,201
Default

Quote:
Originally Posted by karbomusic View Post
True but I've never used a perfect system, meaning I've never owned a DAW where everything possible was sample accurate until I did various calibrations and adjusted the sample offsets for IO in the DAWs settings. I've done this in ever DAW I've ever owned.

With some light testing I was able to find somewhere between 1/4 and 1/2 millisecond of disparity (10-14 samples) between recording the output of a midi track (both audio and midi), applying FX as new take etc. but all of those I was able to get to sample accurate using the offsets in prefs. The only thing I didn't confirm is if there could be a condition where fixing one latency breaks another but beyond that, I can usually get it calibrated sample accurate. I can only do so much testing though.
Well said.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is offline   Reply With Quote
Old 09-22-2018, 02:22 PM   #22
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default

OK- more specificity-

"MIDI timing" - meaning the playback of sequential notes, quantized, in the
manner in which one intended that they sound rhythmically- for me that means if drum fills are quantized to 8th note triplets, they should be perfect - no late notes, no rushed notes, etc.

I DO NOT use VST intruments, nor USB MIDI. No MIDI cables anywhere. I have a Yamaha SW1000XG sound card that I use for MIDI.

I use WinXP SP3 with Black Viper tweaks, but NO registry tweaks or mitigating software (XPLite, etc. etc.). ASUS P4PE Mobo, P4 2.4

No CD burner.

NO NOTHING!!!!

I KEEP IT SIMPLE.

Again, in SONAR 8.5 and Logic Audio 5.5 these issues have NEVER arisen, even when I DID use MIDI cables of ALL kinds and VST instruments
woogish is offline   Reply With Quote
Old 09-22-2018, 03:56 PM   #23
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by woogish View Post

I DO NOT use VST intruments, nor USB MIDI. No MIDI cables anywhere. I have a Yamaha SW1000XG sound card that I use for MIDI.
Hmm.. if you double-click the SW1000XGs output MIDI device in preferences > audio > midi devices, there are some timing settings. I would think triplets should absolutely sound like triplets. So maybe the high resolution or other settings will help or the problem is somewhere else.

For giggles I programmed 1/4 notes + 1/8 note triplets in reaper then sent out my USB soundcard's hardware MIDI out, then I cut the end off of the MIDI cable and ran the outgoing MIDI signal to my oscilloscope. I'm not saying you aren't having an issue, the gear was here, so I did it for fun. With just MIDI it appears to be fairly dead on. I could possibly figure out how to measure actual jitter but I don't think that's necessary.

The yellow vertical lines are the triplets the blue are the 1/4 notes. I removed the note offs to cut down on the visual confusion.

__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-22-2018, 04:10 PM   #24
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default

Glad to see the results - as I said, this was an observation. By doing what I do about muting audio objects, the problem is resolved. If it helps some folks, that's nice. If not- oh well!
woogish is offline   Reply With Quote
Old 09-22-2018, 06:13 PM   #25
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default

One other thing about your test - that's just one MIDI track. Maybe 10-12 MIDI tracks might make a difference?
woogish is offline   Reply With Quote
Old 09-22-2018, 06:36 PM   #26
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by woogish View Post
One other thing about your test - that's just one MIDI track. Maybe 10-12 MIDI tracks might make a difference?
Maybe? That's why it's mostly just baseline test. I thought about doing a bunch of tracks but that's near impossible to measure on the scope the primitive way I'm doing it, I'd have to record each track on the scope one by one then overlay them in photoshop or similar.

That said, the problem you are having does seem a little strange and abnormal compared to what I'd expect and my general experiences in Reaper. I wouldn't expect it to be a problem with lots of tracks, there are orchestral composers here using reaper with upwards of 1000 MIDI tracks and higher.
__________________
Music is what feelings sound like.

Last edited by karbomusic; 09-22-2018 at 06:41 PM.
karbomusic is offline   Reply With Quote
Old 09-22-2018, 11:41 PM   #27
woogish
Human being with feelings
 
Join Date: Feb 2011
Posts: 693
Default

perhaps in the future I'll dig into this issue, but for now...............
'preciate all the input, tho'
woogish 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 01:54 AM.


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