VAC resampler instability at startup

Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

VAC resampler instability at startup

Postby Joe » Sun Sep 13, 2020 2:58 pm

I just upgraded to a new sound interface that allowed me to use an ASIO driver. During the setup came across something that I’m trying to figure out. I set up at sampling rate - 192,000 and buffer 128. All locked in great with smooth audio but when I power off and back on - no lock in at all very erratic. I can select another sampling rate say 48,00 or anything else and go back to the original 192,000 after power on and good lock in very stable with great audio and low latency. I have repeated this very often with same results. Both 96,000 and 192,000 act alike. I am trying to figure out how to make the software reset the sampling at power up, no luck so far. It’s almost as if we could make the sampling rate reset at power up it will lock in stable. Any suggestions greatly appreciated.

73’s
Joe
WD5Y
Last edited by Joe on Mon Sep 14, 2020 12:49 am, edited 1 time in total.
NC3Z
Posts: 464
Joined: Sun Oct 29, 2017 8:57 pm
Location: Merritt, NC

Re: Sampling rate reset

Postby NC3Z » Sun Sep 13, 2020 3:51 pm

What version of Thetis? Firmware?
Gary NC3Z
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: Sampling rate reset

Postby Joe » Sun Sep 13, 2020 5:30 pm

Thetis 2.71 and version 2.0 firmware, should be the latest versions.

Thanks,
Joe
WD5Y
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Sampling rate reset

Postby w-u-2-o » Sun Sep 13, 2020 10:36 pm

Joe,

This is a known issue that happens to some people. It happens to me. It has nothing to do with sampling rate. It has something to do with instability in the resampler control loop at VAC startup. It seems more prevalent for people who are using ASIO, very small buffer sizes and very low latency settings.

I've found that the best way to reset this is to open the VAC setup page and then check and uncheck one of the buffer latency manual checkboxes. That way you don't mess with mismatched sampling rates between app's. It's worth having the setup page open so you can watch the under and overflow counters become stable, although it is often easy to hear the problem by ear as well.

You should probably edit your first post to change the title to "VAC resampler instability at startup".

73,

Scott
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: Sampling rate reset

Postby Joe » Mon Sep 14, 2020 12:47 am

Thanks Scott,
Yes, I found that in my case that if I start Thetis one step of sample rate below - 96,000, then after a few seconds select 192,000 then all is very stable. This also is only the case from cold start, if I don't power off everything just shut programs down and restart all is stable again. Sorry about the mis-post will try to correct.

Thanks,
Joe
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: VAC resampler instability at startup

Postby w-u-2-o » Mon Sep 14, 2020 10:51 am

I also leave my radio running all the time. Quite often I will come back to the radio after a few hours to find either a) the resampler running wild again, or b) very high under and overflow counts indicating the resampler went through am unstable period while I was away.

Do you see any evidence of that, Joe?
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: VAC resampler instability at startup

Postby Joe » Mon Sep 14, 2020 5:24 pm

No, everything has been solid but I only have operated over a two to three hour period. I may not have had it on long enough. I power up at 96,000 and after a few seconds go to the 192,000 set point and all looks good. It’s as if it is synchronizing the sampling rate. It would be good to figure out a way for the software to periodically do this or at startup handle it.

Thanks,
Joe
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: VAC resampler instability at startup

Postby w-u-2-o » Mon Sep 14, 2020 5:55 pm

Joe,

Again, it has nothing to do with the sample rate. All you are doing by changing the sample rate is re-initializing the VAC and resampler. You can do that by changing ANY setting in the VAC setup window. It's the re-initialization that is important.

And, again again, I'd recommend using a setting other than the sample rate just so that any other software you might be using doesn't have to thrash to match up with the sample rate changes.

73,

Scott
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC resampler instability at startup

Postby K1LSB » Mon Sep 14, 2020 6:30 pm

Joe,

I was using 128 buffer size for several months and everything was always fine for the first few hours of operation, but after a few hours the transmitted audio would quite suddenly start sounding like I was talking thru an outboard motor (fast choppy breakup). There was no indication of any problem on the underflow/overflow indicators (they both stayed on zero), the only way I was made aware of the problem is that the operator on the other end of the QSO would tell me that my audio was breaking up.

After jacking with all sorts of settings (to no avail) I finally decided to bump the buffer size up to 256 and that seems to have fixed the problem.

You may be pushing the limits of your particular computer with the 128-buffer setting, so perhaps you should try 256 and see if that fixes the problem. If you're striving for minimal latency it's my understanding that buffer size doesn't really matter (at least not perceptibly, perhaps a few microseconds but nothing on the order of milliseconds) ... it's sample size that's the direct contributor to latency - increasing buffer size merely increases system workload, not latency.

Mark
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: VAC resampler instability at startup

Postby Joe » Mon Sep 14, 2020 8:31 pm

Thanks Scott and Mark,
For some reason the only thing that will reset the run-away is starting at 96,000 then choosing 192,000 sampling rate after a few seconds, not sure why, probably something particular here. What’s crazy is I am seeing this extreme start-up run-away even at lower settings. I may have something else going on with a driver as well. I am running an amd 3900x with latest Thetis firmware and Thetis 2.71. When I stabilize everything I can definitely see a difference in latency, so that’s good. I will definitely look at going to the 256 buffer setting. Thanks very much for the help.

73’s
Joe
WD5Y
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC resampler instability at startup

Postby Tony EI7BMB » Tue Sep 15, 2020 2:34 pm

Using a Ryzen 1700 x processor and I have seen this happen sometimes, resetting the Buffer latency Manual checkbox and sometimes re starting the audio engine in voicemeeter clears it up . Usually happens when I switch TX profiles from DIGU to SSB.

Thanks for the suggestion to set at 256 rather than 128 . I'll see how that goes
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: VAC resampler instability at startup

Postby Joe » Thu Oct 08, 2020 4:57 pm

Scott,
I have been doing a lot of troubleshooting/work with the issue of sampling instability. I know you told me that it has nothing to do with the sample rate setting but for some reason in my case at either 96,000 or 192,000 it does. I am running a motu m4 unit and have it’s driver selected for use in vac which allows more stability or the highest rate setting. If I start from all powered down the sampling is racing out of control, I then go from my setting (192,000) to (96,000) and back to (192,000) the sampling zeros out and is completely stabile. After this is done I can shut Thetis down but not shut my power supply off and restart Thetis everything comes up with a little bit of instability but shortly stabilizes. If I use a sampling rate of (48,000) the buffer checkboxes will help stabilize sampling but not at the higher rates. I know you use a very good audio interface, is there any way you could try the highest sampling rate with this procedure to see if it is just something here on my setup. I also am able to use the lowest (128) buffer setting with this as well. I have gone to the trouble of coding this procedure into my Thetis program, I have a manual button on the “setup” form as well as automatically running at Thetis startup, all works very well, sampling rate at 192,000 and buffer at 128 stabile. I know that some may have issues with slower cpu setups but if this is something that might help others I wanted to share through getting this to Doug. I also added slider values to be displayed on power, agc, and other scrolling sliders in the tooltip view as I like the “collapsed” screen view and wanted these values visible, helps mainly to see power, agc, etc. values while operating or moving the sliders.

Thanks and 73’s,
Joe
WD5Y
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: VAC resampler instability at startup

Postby w-u-2-o » Thu Oct 08, 2020 6:52 pm

Joe,

Honestly I'm afraid to mess with my setup! As you have noted yourself, all this Windows audio stuff can be a bit delicate and fussy. I've got my Presonus Studio 192 Mobile set to 96KHz. I'm "sample rate clean": all Windows settings, Presonus driver settings, Voicemeeter settings and Thetis settings are set to 96KHz. Same for buffer settings where they are available: the Presonus is at 128, Voicemeeter follows that automagically, and Thetis is manually set to 128.

Under those conditions it is pretty stable, although I too see the startup instability from time to time. I really don't want to be randomly changing things. I was testing non-ASIO VAC driver performance for the Thetis 2.8.6 release and it totally borked my system, it took me a couple of hours to find the problem, I don't want to have to go through that again!

73,

Scott
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: VAC resampler instability at startup

Postby Joe » Thu Oct 08, 2020 6:59 pm

I totally understand on keeping the stability of your setup. If possible without making any changes of the higher sampling rate could you see if the procedure I am doing to reset would stabilize sampling at your cold startup, maybe in the future? I am very excited with the new version that’s out. I will transfer my changes over as soon as I can here and work a bit more with the code.

Thanks and 73’s
Joe
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: VAC resampler instability at startup

Postby w-u-2-o » Thu Oct 08, 2020 8:45 pm

Joe,

On my setup here, changing ANY setting in the VAC setup window will reset VAC. If I see my resampler go unstable, I can literally change anything and then change it back and it will fix the problem.

73,

Scott
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: VAC resampler instability at startup

Postby Joe » Thu Oct 08, 2020 9:01 pm

I wasn’t thinking, you are using 96,000 and it works the same for me until I go up to 192,000. Maybe in the future if someone tries 192,000 they can see if it stabilizes with what I’m doing on their setup.

Thanks
Joe
Dave30019
Posts: 44
Joined: Thu Oct 31, 2019 10:54 am
Location: Dacula GA USA

Re: VAC resampler instability at startup

Postby Dave30019 » Sun Oct 11, 2020 9:45 am

With Thetis 2.7(a3) I also would get startup re-sampler errors (overflows/underflows). To correct these, I un-check 'Buffer latency'/IN/manual, they would reset to zero and I re-checked 'Buffer Latency'/manual. This may last an hour or a couple of hours but they always came back.

I updated yesterday morning to 2.8.7, on power up I received a few errors, less than half what I would normally get. But during the day I received ZERO Underflows/Overflows. That's the first time that has ever happened, I was on FT8 all day (off/on) and never had another error all day. We'll see if that trend holds up, I hope so.

Vac1 Buffer size=128; Sample rate =48k

Dave
k4em
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: VAC resampler instability at startup

Postby w-u-2-o » Sun Oct 11, 2020 11:49 am

Good news, Dave. I've also noticed that the new version seems to work a little better.
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC resampler instability at startup

Postby Tony EI7BMB » Sun Oct 11, 2020 12:52 pm

Noticing the VAC audio seems more stable here too .
User avatar
rbduck
Posts: 327
Joined: Tue Dec 03, 2019 1:49 pm

Re: VAC resampler instability at startup

Postby rbduck » Sun Oct 11, 2020 2:14 pm

Tony EI7BMB wrote:Noticing the VAC audio seems more stable here too .


My VAC is more stable and also my VOX is working more stable. Before the upgrade I could get it adjusted, use it for a period and then it would begin engaging with no sound at all. I started using it after the upgrade with no adjustments. It's been rock solid ever since. I'm using an earlier firmware. Metis_Orion_MkII_Protocol_2_v2.0_pre8 . I may move to a later version firmware and see what happens.
73
Ruben
NB4R
Apache-Labs Anan 7000DLE MKII Black -- Thetis 2.10.3.6 dev_2 -- Windows 11
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC resampler instability at startup

Postby K1LSB » Sun Oct 11, 2020 4:49 pm

VAC1 is stable on v2.8.8 but I'm getting crazy runaway Underflows on VAC2, nothing I change on buffers, sample rates or Force even slows it down.

This wasn't happening before, including in yesterday's v2.8.7, so something has changed in v2.8.8.

Capture.PNG
Capture.PNG (175.31 KiB) Viewed 8576 times
W4WMT
Posts: 325
Joined: Sun Apr 09, 2017 10:12 pm

Re: VAC resampler instability at startup

Postby W4WMT » Sun Oct 11, 2020 11:38 pm

K1LSB wrote:VAC1 is stable on v2.8.8 but I'm getting crazy runaway Underflows on VAC2, nothing I change on buffers, sample rates or Force even slows it down.

This wasn't happening before, including in yesterday's v2.8.7, so something has changed in v2.8.8.



Hi Mark,

Was your RX2 running at the time? If not, I believe it's normal for the audio output buffer to underflow, because the receiver is not supplying samples when it's off.

73, Bryan
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC resampler instability at startup

Postby K1LSB » Mon Oct 12, 2020 12:45 am

Bryan,

Thank you sir, you nailed it! The RX2 receiver was not running. I turned it on and VAC2 is behaving correctly.

73,
Mark

Return to “Thetis”