Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2   Go Down

Author Topic: Audio recording precision  (Read 11138 times)

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Audio recording precision
« on: January 14, 2024, 10:04:28 AM »

One reason for me to move back to the old Mac G4 was that i expected it to be more precise when recording midi events to audio. How i figured out so far it also has it´s own imperfections.

As i did not want to rely on the jitter of my midi hardware i started to record the direct midi signal as audio.
I created a looped section of some notes and recorded several takes from that midi track.
This does not look so bad in the beginning, note on and off´s are quite aligned in the first screenshot.

But as you can see in the second screenshot, the further i scroll on in the timeline there are obvious deviations on some of the tracks. The larger gaps you can see there are about 4mS.

I can conform that this issue is on the recording side, as i also recorded midi out back to in with several takes and it worked flawlessly.

I played around with ASIO buffer sizes, the buffer settings in SVP, process ahead and offset parameters, i cannot get this to be properly aligned.

How are others dealing with this? Basically every take you record from a midi track steering a synth can be off in timing/have jitter. Is this a SVP specific issue?



Logged

smilesdavis

  • Moderator
  • 512 MB
  • *****
  • Posts: 990
  • ...
Re: Audio recording precision
« Reply #1 on: January 14, 2024, 10:10:07 AM »

Steinberg has some tight g4 era midi with their midi interfaces
Logged
...

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #2 on: January 14, 2024, 10:11:19 AM »

This is tight, running a Opcode Studio 4. The audio recording part is what creates the issue.
Logged

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1596
  • active member
Re: Audio recording precision
« Reply #3 on: January 14, 2024, 02:43:56 PM »

One reason for me to move back to the old Mac G4 was that i expected it to be more precise when recording midi events to audio. How i figured out so far it also has it´s own imperfections.

As i did not want to rely on the jitter of my midi hardware i started to record the direct midi signal as audio.
I created a looped section of some notes and recorded several takes from that midi track.
This does not look so bad in the beginning, note on and off´s are quite aligned in the first screenshot.

But as you can see in the second screenshot, the further i scroll on in the timeline there are obvious deviations on some of the tracks. The larger gaps you can see there are about 4mS.

I can conform that this issue is on the recording side, as i also recorded midi out back to in with several takes and it worked flawlessly.

I played around with ASIO buffer sizes, the buffer settings in SVP, process ahead and offset parameters, i cannot get this to be properly aligned.

How are others dealing with this? Basically every take you record from a midi track steering a synth can be off in timing/have jitter. Is this a SVP specific issue?

This is amazing. I've been using SVP since before it was even called that and I'll be damned if I can figure out what I'm looking at here!
The screenshots are absolutely incomprehensible to me.

Perhaps you can go into some detail as to how you created this. The audio tracks are unrecognizable. Are they pulses of some kind? Do you mean you converted MIDI data directly to audio somehow? How did you "record midi out back to in"?

Without some detailed info about exactly how you set this up, what you used as a test "note", how you recorded it - 4 tracks? one at a time? separately? and any other details that can effect the result, no one will be able to offer any constructive remarks on this or even if it's a valid methodology.

You're attempting to conduct a precision test of both MIDI and Audio capabilities simultaneously and you're using the very hardware and software under test to display the results. THEN, according to you, you're looping/running repeated iterations of that and seeing increasing inaccuracies as it progresses. Even without knowing exactly what it consists of, my very first thought is that any small, insignificant errors in the beginning will inevitably be cumulative and so increase with each loop as it progresses.

But, again, I'd feel more confident about that statement if I had a real understanding of what the heck I'm actually looking at.

As Desi used to say… "Please to 'splain, Lucy".
« Last Edit: January 14, 2024, 05:50:31 PM by GaryN »
Logged

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #4 on: January 15, 2024, 01:10:16 AM »

First i created a midi track with 16th notes which can be seen on top, this track has been looped using the ":" markers left and right of "Len 1". I hope repeating a part does not intruduce additional latency or jitter. But i can repeat the test without the loop function and a longer track playing the notes. Although I don't think the loop function makes the issue.

Then i took a midi cable and identified the wire that carries the midi out signal, this wire + shield i hooked up to the input of my soundcard. This is to bypass any latency or jitter of midi devices, just directly record the midi signal. This is why you see two pulses, one for note on, one for note off.

Then i recorded several takes of that signal, always only one track at a time.

In the end i figured out that there is always a random offset between the recordings, i was hoping they would be all aligned.

I am using a M-audio Delta 44 and Acadia 603_G3_(G4) file.
« Last Edit: January 15, 2024, 03:31:02 AM by gert79 »
Logged

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #5 on: January 15, 2024, 05:48:05 AM »

I will try again without the monitoring (thru), maybe that improves it.
Logged

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #6 on: January 15, 2024, 12:13:40 PM »

I removed the loop and draw the notes over 8 bars, also i disabled "thru" direct monitoring in SVP and used the soundcard monitoring.

I tried all kinds of buffer settings, with and without process ahead, largest buffer, smallest buffer, medium settings.

For now i turned off "process ahead" and defined an offset for recording, 2x256k recording buffer, 64 samples ASIO buffer.

I really made a lot of recordings in SVP, the multiple takes look "quite good" with some deviations.
However if i load the aiff files to a wave editor and compare the earliest played and last played note at the beginning (4th note on) of the recording i have a 2.64 mS deviation, in the end of the recording (1st note on last bar) 2.42 mS.

I don´t know how much precision is even possible here (to me personally less than 0.5mS always would be nice), i already had these issues on my windows DAW but back then i could not figure out if it is midi jitter or issue with recording.

In my understanding it is the same signal and should be aligned in the same way always?
Logged

IIO

  • Staff Member
  • 4096 MB
  • *******
  • Posts: 4680
  • just a number
Re: Audio recording precision
« Reply #7 on: January 15, 2024, 01:22:50 PM »

as others have correctly pointed out, delay and the length of the delay can depend on many things, which one would have to know.

and you can not expect perfect synchronisation between a track played live via midi and the recording of it.
and normally this should not be a big deal, because you would just measure the delay and predelay the audio and or midi tracks, be it while recording, be it later when everything went audio.

the main issue here seems to be that the delay is different every time. this should not happen and is probably not related to the program used.
Logged
insert arbitrary signature here

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1596
  • active member
Re: Audio recording precision
« Reply #8 on: January 15, 2024, 05:09:21 PM »

AAARRRGH!!! I typed out this entire thing and it all somehow vaporized when I previewed it!!!

Calming down…… Repeat to oneself: "I SHALL save to a text editor regularly when pontificating on the Forum"……… OK

OK…  This is where the AHA!! goes→ → → → → AHA!!    Things quickly become clear when you know what you're looking at.

You are not seeing "jitter". You're seeing audio latency.

It's the sum of all of the processes that generated the results, both MIDI and audio. The good thing is that it's correctable.
You hacked on every adjustment you could find but you missed: Play and Record Offsets

All digital audio systems have latency both when recording and when playing back (but you already know that (?)). Some, more than others. Our 20-odd-year-old ones certainly have a fair amount compared to today's stuff. Opcode realized this immediately when they tried to run early versions of SVP on barely–PPC powered Macs and the MIDI and audio wouldn't sync.

The consistent "lagging behind" of the audio relative to the MIDI "notes" in your display is the clue – the additional lag on tracks 4 and 5 in the second shot are possibly due to something you did differently.

I have a narrow perspective on "jitter". From early Sequencer on my Mac Plus, thru using Vision for MIDI while syncing audio on my 8-track R2R, to being positively thrilled with StudioVision adding real DAW functions… I have never had an issue with it…period. Nor do I know any other SVP users who do. The Opcode MIDI System was developed to both integrate all of the users MIDI devices with the sequencer (before audio) and also to maintain accurate MIDI data timing. Everybody I've ever heard complain about "jitter" has had that issue with other software (and especially PC software)…or more often mistaken MIDI "clog" and such from an inadequately setup system, MIDI–over–USB with inadequate MIDI clocking and too much other shit on the USB bus or just plain too much unnecessary controller data and the like.

I'm not saying there's absolutely no such thing as jitter. MIDI has a finite resolution and hardware has limitations that can and do cause inaccuracies. What I am saying is it gets a lot more culpability than it deserves and a properly setup system shouldn't have an unacceptable, audible amount of it.

Anyway, this is addressed in the SVP Audio Manual Part 3, Chapter 11: "Acadia: Optimizing for Digital Audio"
Give this stuff a try and run your test again. See if you get acceptable results.

I've attached the relevant pages here just in case.
Logged

IIO

  • Staff Member
  • 4096 MB
  • *******
  • Posts: 4680
  • just a number
Re: Audio recording precision
« Reply #9 on: January 16, 2024, 01:00:54 PM »

i think so, too. he probably changed some settings when trying again.

so he should repeat testing it for another two rounds.

once it is always the same amount of shift, it can easily be corrected.

even to find out which settings are responsible (so that one might change them) requires to first do a correct measure.
Logged
insert arbitrary signature here

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #10 on: January 16, 2024, 02:01:05 PM »

All takes are done with the same settings.

I will try with another soundcard soon.
Logged

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1596
  • active member
Re: Audio recording precision
« Reply #11 on: January 16, 2024, 06:02:39 PM »

All takes are done with the same settings.

I will try with another soundcard soon.
That's all well and good but did you attempt the Offset adjustments I so painstakingly described??
Logged

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #12 on: January 16, 2024, 10:32:21 PM »

Yes I tried the recording offset as described in post #6, thank you.

Offset is a good parameter to fix the lag from audio to midi, but the remaining differences are still there.
Logged

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1596
  • active member
Re: Audio recording precision
« Reply #13 on: January 17, 2024, 01:59:38 AM »

Yes I tried the recording offset as described in post #6, thank you.

Offset is a good parameter to fix the lag from audio to midi, but the remaining differences are still there.
Dammit… You've dragged me into this and my head hurts from scratching it to long…

I noticed one thing and not being there with you or in some kind of real-time communication, I'll just keep typing.
* @ 120 BPM in your test, the maximum displayableresolution in SVP is:

120BPM @ 4/4 = 2sec/measure (2 beats/sec)  so
1 beat = 0.5 sec
SVP resolves 480 ppq (pulses per quarter-note)
0.5 sec / by 480 = .0010416666…… sec  OR
a tiny bit over 1ms

I'm pretty sure that value is accurate and will show both start times and durations
The List Window can display those in clear, readable columns.
I would love to see the List display of those tracks and their events.
Because…
I noticed something that should have occurred to me sooner (you may have discovered this already):
The Tracks Window has varying resolution. It has 3 waveform display settings: Off, Fast and High Resolution
What you may not know is that display gets finer and finer up to its absolute max when you zoom it as far as possible and even more if you increase the tempo temporarily. I'm saying all of this because I noticed an anomaly in the windows you posted.
If you screengrab one and then zoom in far enough, you'll notice a "shadow just under each track where the green selection bar sort of extends further to the right. Even at the top in the bar scale there is what appears to be more accuracy.
There are screen AND display driver inaccuracies at work here at this resolution that will likely improve when zoomed in to finer res.
Correlating that with an actual numerical display in the List Window would be informative.

All of that said…… I must return to my previous observation:

While chasing after teeny, tiny little anomalies you call "jitter"…

You're attempting to conduct a precision test of both MIDI and Audio capabilities simultaneously and you're using the very hardware and software under test to display the results.

I honestly do NOT think this is a valid testing methodology. THAT said, I don't have a brilliant alternative that doesn't require a lab bench and precision testing analysis hardware.

BUT I'm pretty sure you're chasing a ghost here. THAT said, please keep us informed of your progress because unbelievably enough, I've been wrong before.

* PS.  It occurs to me that you're unlikely to find a "faster"(?) processing audio interface than the Delta(s) due to them being PCI.



Logged

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #14 on: January 17, 2024, 03:20:15 AM »

Thank you for your always very detailed replies.

What i have not mentioned yet is that my system is as lean as possible, i removed all un-needed extensions and also removed buffering for HDD. System itself is running a SSD with Sata adapter.

So far i have assumed that SVP+Opcode Studio 4 Midi timing is very precise, so far i only recored the midi out back to the in and it worked flawless with a small (Natural to midi) deviation that never changed.

Also my midisizer.com midigal confirms that the midi timing is steady.

So i am assuming midi is ok, i am going after the varying recording offset for audio.
I don't know if recording audio and midi at the same time is possible, this would probably make most sense to confirm the deviation is only on the audio track. So far i have exported my audio tracks to windows and measured the deviation by hand using goldwave, which allows byte precise marking of events.

I have tried using the list view window but with the digital midi to audio signal it is too imprecise, the "remove silence" command does not work properly. I will look to use some real midi device that produces a more conform output to generate a list view.

Increasing BPM temporarily for a better zoom view is a good hint, i will try that.

And i don't think i am chasing a ghost here, if you are layering analogue synth sounds and you have a certain sound, a few mS can totally change the phasing and resulting sound.

So far i have used the Delta 44 but today evening i will upgrade to the Delta 1010.
Logged

IIO

  • Staff Member
  • 4096 MB
  • *******
  • Posts: 4680
  • just a number
Re: Audio recording precision
« Reply #15 on: January 17, 2024, 11:20:15 AM »


120BPM @ 4/4 = 2sec/measure (2 beats/sec)  so
1 beat = 0.5 sec
SVP resolves 480 ppq (pulses per quarter-note)
0.5 sec / by 480 = .0010416666…… sec  OR
a tiny bit over 1ms

for most of these things it is important to understand that "too late" or "not in sync" is always a relative thing - and that latency it is sometimes present but you just dont notice it since it is compensated in the one or other way.

if you play a track of audio and a track of midi using a computerprogram, the physical midi output and the physical audio output might be automatically in sync or not. this is the first thing one has to find out about any system.

otoh, the data output is not where it stops.

when you send a midi event to a waldorf microwave synthesizer while 7 of its 8 voices are already running, the note-on for voice #8 will be delayed for about 5-8(!) milliseconds by the receiving device itself, simply because it processes incoming midi data that slow. (others might show a maximum of 1ms, but there is always some delay.)

and then recording, which once again takes time depending on IO device and its settings. which can, again, either be taken into account by a software automatically or not, which can be difficult to find out because of so many involved steps.

(of course that all does not explain what he sees here)
Logged
insert arbitrary signature here

gert79

  • 32 MB
  • ***
  • Posts: 60
  • New Member
Re: Audio recording precision
« Reply #16 on: January 17, 2024, 12:18:17 PM »

So it seems i made it out of the rabbit hole.

The Delta 1010 performed better after i played a bit with the settings.

I did not generate a list view window as the "remove silence" command still has issues recognizing the initial attack, but what i saw (with 480BPM zoomed) is really close enough. This makes me very happy, so the whole setup and SVP will be what i go for, now i can start to build my setup and focus on making music.

(I may have mentioned it before but i abandoned working with windows DAWs as it was impossible to get the recordings properly aligned. For the last 1,5 years i was working with midi sequencer standalone or synced to digital multitracker, all DAWless.)

Thank you to GaryN and IIO for the guidance!
Logged

ssp3

  • 512 MB
  • *****
  • Posts: 927
Re: Audio recording precision
« Reply #17 on: January 17, 2024, 01:25:08 PM »

Let's see if I got it right - you're recording MIDI data stream that comes out of DIN socket as audio thru your audio interface into a separate track in DAW? What are you going to use that recorded signal for and how?
Logged
If you're not part of the solution, you're part of the problem.

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1596
  • active member
Re: Audio recording precision
« Reply #18 on: January 17, 2024, 02:31:58 PM »

And i don't think i am chasing a ghost here, if you are layering analogue synth sounds and you have a certain sound, a few mS can totally change the phasing and resulting sound.
Hmmm… I think that's the missing bit of info I've been confused about. I now see exactly what you're "obsessing" over and why and it makes sense.
What you are doing however, is basically pushing the entire DAW + MIDI protocols and processes to their absolute precision limit and almost certainly beyond the expectations of the originators of same. I seriously doubt they expected to have users wanting "phase accurate alignment" between parallel tracks on "home computer level" gear 20 years ago.

The only real downside I see (and this is just a feeling - I may be totally wrong) is that you're constructing and will be depending upon an sort of electronic applecart that will be very prone to tip over, causing a lot of frustration for you as you have to repeatedly check, recheck, adjust and compensate for every unavoidable random variation in things like:

Supply voltage variations causing tiny clock issues.
Temperature changes causing tiny clock issues.
Component aging causing tiny clock issues.
Unpredictable tiny timing issues in different synths and/or even just different voices.
Other stuff I can't even imagine at the moment.

I'm definitely NOT, repeat, NOT trying to be some kind of pessimistic doomsayer here, but you will be undoubtedly living on the edge… that edge being caused by your own demanding precision standards imposed upon decades–old hardware and software and your determination to make it perform on the bleeding edge of it's capabilities.

What it boils down to is that I'm sure you're going to get it to work as you want… the only question is will it stay there/can you keep it there without having to constantly fuss over it to the detriment of the music you're wanting to create with it.

Please keep us informed. I'm sure we'll all learn something… especially the G4 with Delta 1010 SVP users…… oops, that's ME

I hope it goes well for you. Without those who push the limits, the limits never expand.
Logged

IIO

  • Staff Member
  • 4096 MB
  • *******
  • Posts: 4680
  • just a number
Re: Audio recording precision
« Reply #19 on: January 17, 2024, 03:20:01 PM »


Hmmm… I think that's the missing bit of info I've been confused about. I now see exactly what you're "obsessing" over and why and it makes sense.

yep, he records stuff track by track, then when you listen to everything together, the two groups of tracks are "split".

in cubase you would move the audio tracks into a "folder track", add 12 ms predelay to them and you´re done. in max i am delaying the midi vs the audio if required.

your story about clock problems because of temperature changes is somehow interesting, but seems a bit odd.^^
Logged
insert arbitrary signature here
Pages: [1] 2   Go Up

Recent Topics