Answered[SOLVED] MIDI Recording Latency Compensation

Author
rogeriodec
Max Output Level: -75 dBFS
  • Total Posts : 753
  • Joined: 2004/04/09 13:55:04
  • Location: Brazil
  • Status: offline
2016/09/22 09:38:00 (permalink)

[SOLVED] MIDI Recording Latency Compensation

I have an Axion 61 controller for midi and a Focusrite Scarlett Solo for audio.
While recording a midi track, hitting the notes on the keyboard, they always appear some ticks advanced in relation to the metronome, as we can see in the image below.
 

 
I believe this happens because of the metronome audio latency, creating an hearing illusion, that forces me to hit the keys just before the start of each real beat.
 
So every time I record a midi track, I am required to manually move all the notes, some ticks forward.
 
I wonder if the Sonar some parameter that allows me to compensate this failure, that is, something like an automatic adjustment in ticks after recording midi notes, which allows moving the notes recorded a few more ticks ahead, thus correcting this problem.
 
post edited by rogeriodec - 2016/09/22 17:23:55

rogeriodec.com.br


* Cakewalk By Bandlabs (always lastest versions), Window 10 x64
* Focusrite Scarlett Solo Audio Interface
* Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
* 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
* Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
* 3 LCD Monitors
* Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
#1
Musikus
Max Output Level: -89 dBFS
  • Total Posts : 79
  • Joined: 2007/10/16 07:31:37
  • Location: Germany
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 09:56:13 (permalink)
Your computer should handle this task without too much latency.
If you are using the ASIO-drivers of your scarlett solo, what buffersize (ms) have you set?

Intel i7 4790K, 16 GB, Win10 64 bit
Sonar Platinum, Focusrite Scarlett 18i20, Avid Eleven Rack, Pro Tools 12, NI Maschine
#2
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 12:40:53 (permalink)
rogeriodec
I wonder if the Sonar some parameter that allows me to compensate this failure, that is, something like an automatic adjustment in ticks after recording midi notes, which allows moving the notes recorded a few more ticks ahead, thus correcting this problem.
 


I use the Nudge feature to deal with this issue. I looked under driver settings and took the reported ASIO roundtrip latency number, entered that same number under absolute time (in samples) into my Nudge 1 settings and after recording a midi clip, I highlight it and hit Nudge Right and everything lines up perfectly. I use the Nudge Right 1 keyboard shortcut, so it's very simple- kinda like hitting quantize. Hope this helps.

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#3
Musikus
Max Output Level: -89 dBFS
  • Total Posts : 79
  • Joined: 2007/10/16 07:31:37
  • Location: Germany
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 14:52:09 (permalink)
Why not use quantize? Maybe not 100% to keep some natural feel.

Intel i7 4790K, 16 GB, Win10 64 bit
Sonar Platinum, Focusrite Scarlett 18i20, Avid Eleven Rack, Pro Tools 12, NI Maschine
#4
tlw
Max Output Level: -49.5 dBFS
  • Total Posts : 2567
  • Joined: 2008/10/11 22:06:32
  • Location: West Midlands, UK
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 15:31:04 (permalink)
Is the offset a consistent number of samples/milliseconds?

Sonar Platinum 64bit, Windows 8.1 Pro 64bit, I7 3770K Ivybridge, 16GB Ram, Gigabyte Z77-D3H m/board,
ATI 7750 graphics+ 1GB RAM, 2xIntel 520 series 220GB SSDs, 1 TB Samsung F3 + 1 TB WD HDDs, Seasonic fanless 460W psu, RME Fireface UFX, Focusrite Octopre.
Assorted real synths, guitars, mandolins, diatonic accordions, percussion, fx and other stuff.
#5
rogeriodec
Max Output Level: -75 dBFS
  • Total Posts : 753
  • Joined: 2004/04/09 13:55:04
  • Location: Brazil
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 15:55:32 (permalink)
I always use nudge and quantize, but both are manual actions, which I have to constantly repeat them each recording.
The correct is that every hit on keyboard controller must be always correctly aligned in all bars, neither before nor after.
I think that if there is an obvious latency between the metronome and the keyboard response time, there should be some parameters that make this adjustment automatically.


 

rogeriodec.com.br


* Cakewalk By Bandlabs (always lastest versions), Window 10 x64
* Focusrite Scarlett Solo Audio Interface
* Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
* 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
* Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
* 3 LCD Monitors
* Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
#6
Base 57
Max Output Level: -86 dBFS
  • Total Posts : 249
  • Joined: 2014/12/26 16:30:14
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 16:01:04 (permalink) ☼ Best Answerby rogeriodec 2016/09/22 17:21:55
If you set the forum filter to "from the beginning" you will find an old thread (or a dozen) regarding this issue.
 
The short answer is the "Timing Offset" in the "Sync and Caching" page of "Preferences" can be adjusted to offset midi recording in the manner you are looking for.
#7
Musikus
Max Output Level: -89 dBFS
  • Total Posts : 79
  • Joined: 2007/10/16 07:31:37
  • Location: Germany
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 16:42:17 (permalink) ☄ Helpfulby siordanescu 2016/09/22 17:58:12
Maybe using input quantize is a good way? You can enable it in the track inspector controls.

Intel i7 4790K, 16 GB, Win10 64 bit
Sonar Platinum, Focusrite Scarlett 18i20, Avid Eleven Rack, Pro Tools 12, NI Maschine
#8
rogeriodec
Max Output Level: -75 dBFS
  • Total Posts : 753
  • Joined: 2004/04/09 13:55:04
  • Location: Brazil
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 17:02:21 (permalink) ☄ Helpfulby siordanescu 2016/09/22 17:58:17
Base 57
The short answer is the "Timing Offset" in the "Sync and Caching" page of "Preferences" can be adjusted to offset midi recording in the manner you are looking for.


Here is the answer! 
Thank you Base 57!

rogeriodec.com.br


* Cakewalk By Bandlabs (always lastest versions), Window 10 x64
* Focusrite Scarlett Solo Audio Interface
* Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
* 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
* Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
* 3 LCD Monitors
* Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
#9
Base 57
Max Output Level: -86 dBFS
  • Total Posts : 249
  • Joined: 2014/12/26 16:30:14
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 18:38:32 (permalink)
   I am glad to help. Just be aware that the offset is applied to midi out ports also. So if you have any hardware synths you can end up chasing your tail.
  I eventually reset the offset to 0.00 and went back to using nudge.
#10
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 18:39:42 (permalink)
rogeriodec
Base 57
The short answer is the "Timing Offset" in the "Sync and Caching" page of "Preferences" can be adjusted to offset midi recording in the manner you are looking for.


Here is the answer! 
Thank you Base 57!

My understanding is that this setting deals only with audio not midi. So I believe that this is not the correct answer. It seems there is no answer to prevent this from happening. It has to be corrected after the fact.

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#11
rogeriodec
Max Output Level: -75 dBFS
  • Total Posts : 753
  • Joined: 2004/04/09 13:55:04
  • Location: Brazil
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 18:58:00 (permalink)
pinguinotuerto
My understanding is that this setting deals only with audio not midi. So I believe that this is not the correct answer. It seems there is no answer to prevent this from happening. It has to be corrected after the fact.



It worked for me. See the help: http://www.cakewalk.com/Documentation?product=SONAR&language=3&help=0x22B1A
 
Timing Offset (msec). With this option, used for making very fine adjustments to the audio/MIDI synchronization of your project, you can offset the audio in your project by a number of milliseconds. A positive value delays audio by that amount. A negative value delays MIDI by that amount.
 


rogeriodec.com.br


* Cakewalk By Bandlabs (always lastest versions), Window 10 x64
* Focusrite Scarlett Solo Audio Interface
* Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
* 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
* Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
* 3 LCD Monitors
* Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
#12
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 19:03:33 (permalink)
rogeriodec
pinguinotuerto
My understanding is that this setting deals only with audio not midi. So I believe that this is not the correct answer. It seems there is no answer to prevent this from happening. It has to be corrected after the fact.



It worked for me. See the help: http://www.cakewalk.com/Documentation?product=SONAR&language=3&help=0x22B1A
 Timing Offset (msec). With this option, used for making very fine adjustments to the audio/MIDI synchronization of your project, you can offset the audio in your project by a number of milliseconds. A positive value delays audio by that amount. A negative value delays MIDI by that amount.
 



I thought this setting was for when Sonar is being used as a slave chasing time code from another source. I will mess with it and report back. If this solves the problem, then you've solved an issue nagging many of us for a long time.

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#13
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/22 19:31:19 (permalink)
Didn't do anything for me.

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#14
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/23 01:47:09 (permalink) ☄ Helpfulby rogeriodec 2016/09/23 09:02:25
Timing Offset may look like it's only applicable to the Chase Lock setting, but it's active regardless of whether Trigger and Freewheel or Chase Lock is selected. Its original intent was to allow syncing audio to MIDI-driven hardware synths on playback. But since it works by shifting the M:B:T grid against the audio clock, it will alter where MIDI lands on the grid when recording to the audio metronome.
 
If you only ever use soft synths, it might makes sense to solve a MIDI record timing problem with this setting because soft synths are handled like audio. But if you use hardware synths, having a large positive offset to make MIDI land later on the grid while recording will conversely cause it to be sent early vs. audio on playback. The bigger the offset, the more it will work against you on playback. But, again, this will only be a problem if you use hardware synths.

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#15
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/23 10:33:32 (permalink)
brundlefly
Timing Offset may look like it's only applicable to the Chase Lock setting, but it's active regardless of whether Trigger and Freewheel or Chase Lock is selected. Its original intent was to allow syncing audio to MIDI-driven hardware synths on playback. But since it works by shifting the M:B:T grid against the audio clock, it will alter where MIDI lands on the grid when recording to the audio metronome.
 
If you only ever use soft synths, it might makes sense to solve a MIDI record timing problem with this setting because soft synths are handled like audio. But if you use hardware synths, having a large positive offset to make MIDI land later on the grid while recording will conversely cause it to be sent early vs. audio on playback. The bigger the offset, the more it will work against you on playback. But, again, this will only be a problem if you use hardware synths.


Then I need to experiment with it more to see if I can resolve this issue. I'll try again and post my results. Thanks for clarifying that. Perhaps Cakewalk should separate or differentiate that setting visually from the Chase and Lock setting so that users can be aware that it isn't only active when Sonar is in slave mode.

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#16
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/23 11:47:30 (permalink)
Yes, the preferences layout has had Timing Offset indented like that forever - not sure why. Just one of those endearing little quirks of which SONAR has so many. 
 
Personally, I prefer to just run audio latency as low as possible, get audio record latency compensation dialed in, and ignore MIDI latencies that are typically an order of magnitude lower than my sloppy expressive performances. Timing Offset introduces more potential complications than its worth if you're correcting more than a few milliseconds. And on my system, MIDI record timing is (and has always been) just as expected - a few milliseconds later than perfectly-compensated audio due to uncompensated MIDI transmission latency.

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#17
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/23 18:29:20 (permalink) ☄ Helpfulby rogeriodec 2016/09/23 19:25:07
So, it solves the problem, but not if you follow Cakewalk's instructions on what this setting does (unless I'm understanding it backwards). The documentation says, " A positive value delays audio by that amount. A negative value delays MIDI by that amount."
If I enter a negative value to delay MIDI, my MIDI lands even earlier in relation to the Audio. Conversely, if I enter a positive value (which I noticed rogeriodec did- probably unwittingly) my MIDI does line up with my audio and the metronome.
The value I entered was the exact same value I was entering before into my nudge settings, but I converted it into milliseconds, instead of using samples. So the value has to be whatever your Roundtrip Audio Reported Latency is. which appears in the same preferences window (Synch and Caching) all the way at the bottom. To convert from samples to milliseconds, take whatever sampling rate you're using (44.1 or 48) divide it by 1,000 (result will be 44.1 or 48) and then divide your Audio Reported Latency by that number (44.1 or 48) to get the milliseconds you need. This will all line up and work as long as you have the Use Audio Reported Latency box checked.
 
 

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#18
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/23 19:03:41 (permalink)
The documentation is correct. A positive value delays audio (including the audio metronome) relative to the MBT grid. That means you'll hear the metronome click after the Now time crosses the grid beat, causing you to play late relative the grid so your MIDI lands later than it otherwise would.

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#19
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/24 00:18:54 (permalink)
brundlefly
The documentation is correct. A positive value delays audio (including the audio metronome) relative to the MBT grid. That means you'll hear the metronome click after the Now time crosses the grid beat, causing you to play late relative the grid so your MIDI lands later than it otherwise would.


I'm still a little confused. If that were the case, wouldn't the pre-existing audio tracks be delayed also causing them to fall behind the newly delayed MIDI anyway, therefore leaving everything out of synch still?
What seems to be happening is that the MIDI is now landing where the audio was landing originally and they are in synch. The original audio was recorded to the metronome before the change was made to the settings, so if the metronome were now playing later than it did before, things wouldn't line up like they are. The metronome seems to be playing just like it did before, but the MIDI lands now where it is supposed to in relation to the audio.  My head is spinning. Although I'm glad the problem is solved.

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#20
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/24 03:40:26 (permalink)
As mentioned earlier, MIDI driven soft synth output is buffered up in advance and handled like audio. It will be delayed along with all the other audio content on playback. Only 'real' MIDI messages going in and out of physical MIDI ports (or a virtual ports with drivers operating at the O//S level like LoopBE) are affected by the offset of the MBT grid.
post edited by brundlefly - 2016/09/24 04:02:03

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#21
tlw
Max Output Level: -49.5 dBFS
  • Total Posts : 2567
  • Joined: 2008/10/11 22:06:32
  • Location: West Midlands, UK
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/24 10:33:17 (permalink)
Maybe an example of what the setting is designed to do might help.
 
I have a Waldorf microQ rack, which for anyone not familiar with it is a digital hardware synth designed quite a few years ago.
 
Let's say I sequence a MIDI part for it, with each note lying dead on the beat. I then send the MIDI out through a Motu USB MIDI interface which hands the MIDI on to the synth via 5-pin MIDI cables. I have an audio track that records the audio the synth produces.
 
Now, the process of sending the MIDI out through the interface takes a millisecond or two. The synth itself takes a few milliseconds to process the data and convert it to audio. Which means that Sonar receives the incoming audio at some time after the MIDI was placed in the timeline. The overall audio latency as adjusted by the ASIO buffer setting is irrelevant here, what matters is just the time it takes that MIDI signal to get converted to audio, which in the case of the synth in question is usually around 4-5 milliseconds.
 
That means that the audio in the track recording it will be delayed by 4-5 milliseconds compared to the MIDI. The preferences setting allows me to tell Sonar to automatically compensate for that by adjusting the relative timeline location of the MIDI and audio. Which is more convenient than shifting the audio to where it should be by hand.
 
The catch is that the preferences setting is a global one, and will therefore affect all audio resulting from MIDI in the same way. So if I also have my MS20mini hooked up, or a soft-synth running they too will have their audio tracks adjusted by the preference settings. Only they take a different amount of time to respond to MIDI, so the automated correction is wrong for them. So in that case I end up correcting any noticeable discrepancy by hand anyway.
 
The setting really dates from the time people often had a single synth, often a multi-timbral one, which they used for all synth-related purposes so a single automated correction factor made sense. And it is still useful if for some reason all MIDI and resulting audio is "out" by a fixed amount. Experimenting with it a bit is the best way to understand what it does.
 
I suggest running the experimental testing using MIDI drawn in the PRV or step sequencer or otherwise strictly quantified, because otherwise any timing discrepancies in the playing will mask the MIDI timing issue. We are talking about tiny amounts of time here, generally less than a human's level of accuracy especially if playing other than like a robot with perfect timing.
 
Personally I nudge audio if I feel it needs it, otherwise I generally leave it alone. A slight time difference can be useful to make quantified sequenced parts sound a bit less sequenced, and can help getting separation between different instruments at the mixing stage.

Sonar Platinum 64bit, Windows 8.1 Pro 64bit, I7 3770K Ivybridge, 16GB Ram, Gigabyte Z77-D3H m/board,
ATI 7750 graphics+ 1GB RAM, 2xIntel 520 series 220GB SSDs, 1 TB Samsung F3 + 1 TB WD HDDs, Seasonic fanless 460W psu, RME Fireface UFX, Focusrite Octopre.
Assorted real synths, guitars, mandolins, diatonic accordions, percussion, fx and other stuff.
#22
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/24 12:14:34 (permalink)
 
Hey tlw, thanks for your answer. There's also another step that you didn't mention that also adds a delay to the signal- when the output of your Hardware synth gets converted by your interface's A/D converters to bring it back into SONAR.  I understand all these concepts pretty well (I think ). What I am confused about is Cakewalk's explanation of these settings as I was telling Brundlefly.
 
Brundlefly, when you say, "The documentation is correct. A positive value delays audio (including the audio metronome) relative to the MBT grid. That means you'll hear the metronome click after the Now time crosses the grid beat, causing you to play late relative the grid so your MIDI lands later than it otherwise would." That is incorrect. This setting has no effect as to when the metronome is heard. I just tested it by changing the setting dramatically 3 times and recording the audio output of the metronome onto a track. The metronome plays in synch with the pre-recorded metronome audio tracks and lands perfectly in synch after recording so the audio isn't being shifted in any way by this setting. I also recorded 3 different MIDI drum takes using the same procedure and the MIDI landed on the timeline according to the settings I set in the timing offset box. In other words, the drum tracks were out of synch with the metronome and each other, landing early or late depending on which offset I set.
So when you say, "Only 'real' MIDI messages going in and out of physical MIDI ports (or a virtual ports with drivers operating at the O//S level like LoopBE) are affected by the offset of the MBT grid." that is not accurate. What is being affected is where the MIDI information lands on the timeline which also affects when soft synths play. 
 
I still think that according to what Cakewalk is saying, one would have to enter a negative value in that box in order to delay where the actual MIDI information lands in SONAR, but it's the opposite. A positive value delays the MIDI and makes it land later in the timeline and a negative value "accelerates the MIDI and makes it land early.  
 
Anyhow, I thank you both for your explanations and your time, and also the OP, rogeriodec and Base 57 who suggested adjusting this setting. It solved my issue.
 

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#23
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/24 14:21:00 (permalink)
No, I'm not wrong. Trust me, I know this functionality inside and out. Positive values delay the audio relative to the MBT grid. 'Audio' includes .WAV files, pre-buffered soft synths rendered in real time from existing MIDI, and the audio metronome.
 
You can confirm this by setting  a large offset (e.g. 200ms) in a project with no content, and just listening to the playback metronome while watching the Now time. Disable 'Stop at Project End' to allow playback with no content. You'll see and hear that the click is late vs. the Now time.
 
Now add identical MIDI tracks, one driving a hardware synth (either direct-monitored or input monitored with the lowest RTL your system allows), and one driving a soft synth.
 
Start playback, and note that the soft synth syncs with the metronome and both are late vs. the timeline while the hardware synth is in sync with the timeline, unaffected by the offset.
 
As an aside, you'll also note that the timing of the hardware synth is wonky for the first beat or so of the first measure, this is another reason to avoid large Timing Offsets.
 
 

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#24
pinguinotuerto
Max Output Level: -71 dBFS
  • Total Posts : 976
  • Joined: 2009/12/01 18:46:41
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/24 15:12:42 (permalink)
I trust you. I know you're one of the most knowledgeable members of this forum, but when was the last time that you tried this? Could it be that it used to work in the manner you describe in previous versions and now it works differently? Like I said, I just tried this this morning 6 times (3 recording the metronome's audio output and 3 recording MIDI drums via VDrums/Addictive drums with the metronome on on record and playback and the only thing that changes is where the MIDI notes land on my timeline. I could see all 3 MIDI clips landing according to my offset. The metronome's audio always landed on the same spot regardless of the offset. BTW, 200ms is exactly the offset I used (-200, 0, +200) to run my tests.
post edited by pinguinotuerto - 2016/09/24 15:33:59

HP DV7-3085 Laptop (Intel Core i7 720 1.6 GHZ, 6 GB RAM, 1333 MHZ FSB, 2 500GB 7200 RPM Internal HDs, 17" screen), HP 2009m Monitor, 2TB Ext Drive
Line 6 UX8 with PodFarm 2 Platinum

2 Joe Meek VC6Q British Channels
Sonar Platinum & X3e Producer (64 Bit)

AD2 w Roland V-Drums (TD4KX2)
Windows 7 Home Premium (64 bit)

KRK VXT 8 Monitors
Frontier Alphatrack, Razer Naga Mouse, nanoKontrol2
 

#25
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/25 01:37:37 (permalink)
pinguinotuerto
Like I said, I just tried this this morning 6 times (3 recording the metronome's audio output and 3 recording MIDI drums via VDrums/Addictive drums with the metronome on on record and playback and the only thing that changes is where the MIDI notes land on my timeline. I could see all 3 MIDI clips landing according to my offset.



Yes, that's right. Only Hardware MIDI input and and output are shifted. Metronome playback and re-recording are against the audio clock not the MIDI clock so the timing of the recorded metronome is not affected. Only hardware MIDI in and out will shift vs. the audio clock.
 
Just do the test I described; you'll see. I did verify nothing had changed before I posted just to be sure; it works the same as it did a decade or more ago when I first checked it out.
 
 

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#26
tlw
Max Output Level: -49.5 dBFS
  • Total Posts : 2567
  • Joined: 2008/10/11 22:06:32
  • Location: West Midlands, UK
  • Status: offline
Re: MIDI Recording Latency Compensation 2016/09/25 12:25:12 (permalink)
A quick note on the latency introduced by the ADC in the interface - this doesn't affect the MIDI/audio timing relationship (as in put the recorded audio behind the MIDI) because Sonar can correct for audoi inpit latency as it usually does based on the latency the ASIO driver is reporting (and anunadjustment to that made in preferences).

What Sonar can't so easily detect is latency between a MIDI track and a hardware synth because Sonar can't be sure that what comes back isn't a result of the synth's patch - e.g. the MIDI note might trigger a VCA envelope that deliberately includes a delay before the attack phase of the envelope.

In fact, Sonar doesn't even know that the hardware synth the audio is coming from is the one a particular MIDI track is controlling.

Hence the need for a manual adjustment.

Sonar Platinum 64bit, Windows 8.1 Pro 64bit, I7 3770K Ivybridge, 16GB Ram, Gigabyte Z77-D3H m/board,
ATI 7750 graphics+ 1GB RAM, 2xIntel 520 series 220GB SSDs, 1 TB Samsung F3 + 1 TB WD HDDs, Seasonic fanless 460W psu, RME Fireface UFX, Focusrite Octopre.
Assorted real synths, guitars, mandolins, diatonic accordions, percussion, fx and other stuff.
#27
steplander
Max Output Level: -90 dBFS
  • Total Posts : 42
  • Joined: 2005/08/29 09:22:36
  • Status: offline
Re: MIDI Recording Latency Compensation 2018/11/04 01:33:27 (permalink)
Been experiencing this problem for the last few versions of Sonar. I believe they changed the Metronome engine at some point and that's when the problem started to occur.
My work-around has been to either NUDGE to the right after recording a midi track or lay down an old-fashioned click track to follow while recording.
Using Cakewalk's metronome seems to screw things up. My midi always Plants too early on the track.
Hoping Bandlab will be able to finally fix this issue.
 
#28
brundlefly
Max Output Level: 0 dBFS
  • Total Posts : 14250
  • Joined: 2007/09/14 14:57:59
  • Location: Manitou Spgs, Colorado
  • Status: offline
Re: MIDI Recording Latency Compensation 2018/11/05 17:31:47 (permalink)
There's nothing inherently wrong with CbB that affects all installations. My MIDI-Audio timing remains spot-on in recent releases as it has always been. This happens with some combinations of hardware/firmware/drivers, or may be project-specific or due to misconfiguration  I suggest you see my post #4 in this thread from a few days ago for steps to determine exactly what's going on in your particular case:
 
http://forum.cakewalk.com/FindPost/3794091
 
And if you want to continue discussion, you should start a new thread.

SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
#29
Jump to:
© 2024 APG vNext Commercial Version 5.1