Jump to content

(Solved - Bug?) Hardware synths audio input recorded early


JoseC

Recommended Posts

What the title says. I have a midi track to an external synth routed to my audio interface through a mixer, hit record and the audio gets recorded a bit early, about the reported output latency of my audio interface, enough to cut the first transient and offset the whole audio track. If I change the latency, the offset changes, but it always records early. Is there a way to compensate for this? Of course the workaround is to start recording a bit ahead and then slide the audio track, but I have been pulling my hair out trying to find other way and I cannot find it.

Link to comment
Share on other sites

Audio from a hardware synth is compensated for record latency just like audio from any other external source, but is not automatically compensated for MIDI transmission delay which is usually greater than audio latency, and will typically make it a bit late rather than early, unless...

Check whether you have a non-Zero 'Timing Offset' (different from Manual Offset) under Preferences > Audio > Sync and Caching. Positive values delay the audio  (including the metronome and playback of existing audio and soft synths) relative to MIDI grid, effectively causing audio from external hardware synths to be laid down earlier to compensate for MIDI transmission delay.

The one other possible wrinkle would be if the synth audio is coming in via digital input, then it would overcompensated because there's no A/D conversion, but that's generally a much smaller delta (on the order of .5ms) than MIDI transmission delay. 

 

Edited by David Baay
Link to comment
Share on other sites

Found the culprit. The audio metronome. If I set a count in, the first beat gets cut and the rest of the track gets recorded early. If I don´t, everything gets recorded with an 8 ms delay, that equals more or less to the input latency of my interface at 256 samples, which should be normal. Funny thing is, this only happens with the count in, if I set the metronome to play while recording, but no count in, everything is normal. The midi metronome is fine. Of course I don`t need a count in to record a hardware synth from a already recorded midi track, but this seems like a bug. 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • JoseC changed the title to (Solved - Bug?) Hardware synths audio input recorded early

What audio interface and driver mode are you using? The difference with count-in enabled is not normal; I'll double-check nothing has changed recently, but I've never seen this in any of my systems, and I use hardware synths in almost every project. You should still verify you have Timing Offset at 0, and maybe  try disabling UseHardwareSamplePosition in Preferences > Audio > Config File (enabled by default). 

If the synth is a keyboard synth, you might also try recording simultaneous MIDI and Audio using Local Control to get another data point for understanding what's going on. 

Link to comment
Share on other sites

Okay, I take it back. I did a quick test, and it seems there is an issue here, and it goes back a long time (reproducible in SONAR 17.10). Guess I never noticed because count-in usually is disabled when recording existing MIDI. And even with it on, I typically run a much smaller buffer (32-64 samples) when tracking so the discrepancy is significantly less than MIDI transmission delay and there's no truncation of the recording, just slightly less delay.

  • Like 1
Link to comment
Share on other sites

 Yes, I tested everything you suggested, with three synths, and the results are the same. I also tried lowering the buffer to 64 and it records only 10 ms early instead of 14 ms  at 256, but it also cuts the first transient if recording starts on the beat. Just out of curiosity to see if midi input is affected, I was even testing with a groovebox synced to Cakewalk, recording its midi and audio outputs simultaneously. Same thing, no count in, at 256 samples both midi and audio line up within 1 or 2 ms, 10 ms after the beat, same results at 64 samples buffer. With a count in audio gets recorded 14ms ahead of the beat, against 10 ms at 64, and midi still 10 ms late in both cases. 

I am using a  Tascam US2x2, latest drivers, ASIO, and a MOTU Midiexpress XT midi interface. I tried with three different synths with the same results. Timing offset is 0. Tried your suggestion of disabling that Config File parameter, but same results. 

Again, not much of an issue because a count in is not really needed, to record a midi track to audio, and if you want to line up everything you´ll need to slide the audio to compensate for the midi delay anyway. 

Link to comment
Share on other sites

  • 7 months later...

JoseC,

   thank you so much for bringing this up.  Wish I had found it much much much earlier.

This issue is still present in the latest version of Sonar by Bandlab as of 25th November 2020.

As soon as I turned that checkbox off, my MIDI tracks are timed with the audio tracks magically.

Along with getting audio glitches when recording, latency adjustments, buffer adjustements and about $3K in trying different audio interfaces, this Record-Count-in Metronome checkbox timing anomaly complicated my near-daily troubleshooting efforts greatly over the past 7 months. 

Finally, today for the first time, I am getting clean, tightly-synchronized playback of MIDI and Audio tracks & a clean recording of the output Busses (from a Yamaha M7CL) into 16 stereo audio tracks. My interface is a brand-new RME Fireface 802 over USB connected to a custom workstation with 20 cores (40 virtual cores) 64GB RAM, SSD scratch disks for audio and video work and a RAIDed setup of 2TB Seagate mechanical drives.

 

RME latency is at 2.9msec/128 samples and is stable.

So thank you Jose and the gentlemen above for looking into this.

 

Edited by Kenz
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...