INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: NEW: VST Latency Compensation  (Read 2205 times)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 70045
  • where the buffalo roam
NEW: VST Latency Compensation
« on: June 07, 2023, 03:04:56 pm »

Thanks to user mitchco for suggesting and helping Matt implement it.  Read from the bottom up.  It's in MC31.0.18.

Mitch's site is:  https://accuratesound.ca/

-------------

Way to go Matt! Works like a charm! Thank you!

Initial testing on two computers is all good. Give me a day to try various latencies and I will report back.

Thanks again!

Mitch

From: Mitch Barnett
Sent: Monday, June 5, 2023 8:46 AM
To: 'Matt Ashland' <>; Jim Hillegass <>
Subject: RE: Possible feature request?

Hi Matt,

Awesome!! Thanks so much!

Yes, I am happy to test. Will keep an eye out.

Mitch

From: Matt Ashland
Sent: Monday, June 5, 2023 6:29 AM
To: Mitch Barnett <accuratesound.ca>; Jim Hillegass <>
Subject: Re: Possible feature request?

Hi again Mitch,

Instead of sending me a plugin, I'll just put a build out later today with support.  Hopefully you can test and provide feedback sometime.

Thanks,

-Matt

On 6/4/2023 6:21 PM, Matt Ashland wrote:

Hi Mitch,

Good idea!

I'll hook this up in the coming days.

Do you have a plugin you could provide that returns a non-zero latency?  It would allow me to test a little bit.

Thanks,

-Matt

On 6/2/2023 11:56 PM, Mitch Barnett wrote:

Hi Matt and Jim,
Just wanted to thank you again for all the help getting my plugin to work perfectly with JRiver. I have very happy customers. Including myself as JRiver is my “daily driver.”

While my plugin is a 0ms convolver, I also report the FIR filter latency to hosts. In DAW’s on the pro audio side, the host provides latency compensation based on the plugins reported latency. One example is for audio for video post-production. So if the plugin reports 1000 samples latency, then the host delays the video by 1000 samples so everything syncs up.

There is a VST3 interface for both the plugin side and host side. On the plugin side, I call setLatencySamples() and pass in the number of samples of a FIR filter, typically 32,768 samples for a 65,536 sample linear phase FIR filter.

On the host side, there is an interface called getLatencySamples() The interface is here:

https://steinbergmedia.github.io/vst3_dev_portal/pages/FAQ/Processing.html#q-how-report-to-the-host-that-the-plug-in-latency-has-changed

Specifically: https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IAudioProcessor.html#af8884671ccefe68e0a86e72413a0fcf8

The idea is that JRiver would call getLatencySamples() from the plugin and delay the video by the number of samples reported. I believe JRiver’s internal convolution engine already does this or something similar.

Is this a possibility to implement in JRiver MC 31?

I hope you guys have a great weekend!

Kind regards,

Mitch

Logged

stewart_pk

  • Citizen of the Universe
  • *****
  • Posts: 639
Re: NEW: VST Latency Compensation
« Reply #1 on: June 07, 2023, 06:47:11 pm »

Nice.
Logged

saltanar

  • Recent member
  • *
  • Posts: 21
Re: NEW: VST Latency Compensation
« Reply #2 on: June 09, 2023, 01:46:33 am »

is this working also for Dirac plugin?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3608
Re: NEW: VST Latency Compensation
« Reply #3 on: June 09, 2023, 02:11:59 am »

is this working also for Dirac plugin?
given the description of the feature, that would be a question to ask Dirac (as the plugin has to report its latency)
Logged

dziemian

  • Recent member
  • *
  • Posts: 33
Re: NEW: VST Latency Compensation
« Reply #4 on: June 09, 2023, 07:42:04 am »

Hopefully, it will work with Dirac plugin as well
Logged

Flak

  • Recent member
  • *
  • Posts: 12
Re: NEW: VST Latency Compensation
« Reply #5 on: June 09, 2023, 11:36:20 am »

Interesting!!

Is it possible to manually enter in JRiver the desired VST latency compensation?
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 519
Re: NEW: VST Latency Compensation
« Reply #6 on: June 10, 2023, 12:43:28 pm »

Holy smokes.

Thank you!!!! This is actually a huge deal
Logged

Flak

  • Recent member
  • *
  • Posts: 12
Re: NEW: VST Latency Compensation
« Reply #7 on: June 14, 2023, 09:24:46 am »

I've just got confirmation from our developer of the Dirac plugin that the Dirac Live processor already informs the host of the latency  :)
Logged

mumford

  • Member
  • *
  • Posts: 2
Re: NEW: VST Latency Compensation
« Reply #8 on: August 26, 2023, 03:00:09 pm »

Interesting!!

Is it possible to manually enter in JRiver the desired VST latency compensation?

I like to expand this question with a use case scenario.  JRiver plays a movie and uses HDMI audio out to an external Dolby Atmos decoder, such as Arvus H1-D.  Multi-channels of decoded audio will be routed back to the same PC, with JRiver and Hang Loose Convolver installed, via an AES67 ASIO driver.  These channels can be room-corrected using Dirac Live and maybe active crossovers into even more channels. 

How to tell JRiver to add external decoder latency to the audio chain, to sync video with audio?  IEEE 1588 allows timestamps.  Can VST latency compensation read them?
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 519
Re: NEW: VST Latency Compensation
« Reply #9 on: September 20, 2023, 01:09:11 pm »

I like to expand this question with a use case scenario.  JRiver plays a movie and uses HDMI audio out to an external Dolby Atmos decoder, such as Arvus H1-D.  Multi-channels of decoded audio will be routed back to the same PC, with JRiver and Hang Loose Convolver installed, via an AES67 ASIO driver.  These channels can be room-corrected using Dirac Live and maybe active crossovers into even more channels. 

How to tell JRiver to add external decoder latency to the audio chain, to sync video with audio?  IEEE 1588 allows timestamps.  Can VST latency compensation read them?

You're sort of close here (I use AES67 extensively). I'm sort of confused by your logic though, how would you route your AES67 stream from the Arvus (that you're essentially dumping into an ASIO device) back into JRiver and why?   

The way I'd set this up is JRiver > HDMI > Arvus > AES67 Stream > PC (how you receive the AES67 stream may matter, there's a number of VSC options) > DAW/VST Host and then from there, figure out how much delay you're going to need to add to JRiver (which is playing the video and outputting audio over HDMI).
You need to host Dirac in this case if your goal is Atmos since standalone is capped at 8ch IIRC?

It's definitely a niche use case (and it's frustrating as heck that we're stuck requiring an Arvus to decode Atmos in real time)


Do you have the Arvus in hand? I've been *really* curious what the latency actually is on it.

AES67 on Windows can be a bit of a mixed bag, it's actually comical how bad / hacky some of the commercial VSCs are (they're just outdated IMO, it's gotten easier to work with PTP timestamps on windows in the last few years).

Logged

mumford

  • Member
  • *
  • Posts: 2
Re: NEW: VST Latency Compensation
« Reply #10 on: September 29, 2023, 11:28:42 am »

You're sort of close here (I use AES67 extensively). I'm sort of confused by your logic though, how would you route your AES67 stream from the Arvus (that you're essentially dumping into an ASIO device) back into JRiver and why?   

I am thinking of doing an active crossover.  So, 16 channels from Arvus out, back into a PC and crossover to 26 channels (hybrid 3 ways for the base layer -- passive between tweeter and mid, active for the woofer, just passive for the atmos, and 2 sub channels).  It is not necessary to route audio back to JRiver, can be to a different convolver or even to a separate PC, as long as I have a way to accurately sync them.  But, routing back to JRiver has an advantage, as JRiver can sync audio with video, skip video frames if needed.

Quote
The way I'd set this up is JRiver > HDMI > Arvus > AES67 Stream > PC (how you receive the AES67 stream may matter, there's a number of VSC options) > DAW/VST Host and then from there, figure out how much delay you're going to need to add to JRiver (which is playing the video and outputting audio over HDMI).
You need to host Dirac in this case if your goal is Atmos since standalone is capped at 8ch IIRC?
Planning on doing ART as VST, running on the PC.  Should not have channel limit.

Quote
It's definitely a niche use case (and it's frustrating as heck that we're stuck requiring an Arvus to decode Atmos in real time)


Do you have the Arvus in hand? I've been *really* curious what the latency actually is on it.
No, I don't have one yet. 
Quote
AES67 on Windows can be a bit of a mixed bag, it's actually comical how bad / hacky some of the commercial VSCs are (they're just outdated IMO, it's gotten easier to work with PTP timestamps on windows in the last few years).

Ability to use global PTP timestamps would make things easier.
Logged
Pages: [1]   Go Up