HISE FX and delay compensation
-
@dustbro Yeah Cubase can detect the latency value, there is no problem about it. You can also see that in the Cubase plugin manager.
But the problem is, wet and dry channels are not in sync. Delay still persists.
-
@Fortune got it.
-
OK, I've committed a fix for a typo that caused crackling when a delayed plugin is bypassed.
I've also made a example project with a latency of 200ms - it's just a simple delay without anything else:
https://github.com/christophhart/hise_tutorial/tree/master/LatencyTest
The sample amount will get calculated on the initialisation and the latency will be changed accordingly (so to eg. 8820 samples on 44,1 kHz).
I've tested these hosts:
- Cubase 9: Latency is reported correctly, both active and bypassed plugins are in sync
- REAPER 5: Latency is reported correctly, both active and bypassed plugins are in sync
- Ableton 9: Latency is reported correctly, both active and bypassed plugins are in sync
Please try your hosts and report back any problems:
- Compile the LatencyTest plugin as FX plugin.
- Load up your DAW and add two audio tracks with the same audio data
- Load the LatencyTest VST plugin into one of them
- Play and check that it's in sync. Bypass the plugin and play again, check that it's still in sync.
-
-
First of all, you did it, well done @Christoph-Hart !
I am pretty impressed. Especially calculating the delay time acording to sample rate and ms conversion multiplying is a clever idea. Yeah it needs some improvements but you did most of the thing. As you can see, you can do it.
My check is that:
Windows:
- It works well on Cubase 10, Reaper 5, Ableton 10, Studio One 4.5, Pro Tools 2019 Ultimate!
- In FL Studio 12 & 20- it fails again. I hear 200 ms latency unfortunately :/
Mac
- Reaper, Ableton, Studio One, Pro Tools did it very good.
- In Logic Pro X, When you insert the plugin in the channel, it takes approximately 2 seconds to sync. You can hear fade of the phase shift before synching, after 2 seconds it is in sync. This fade time can be disturbing to some users. You can improve it.
- FL Studio 20 - fails again. I hear 200 ms latency unfortunately :/
Also I have some questions;
- To calculate the delay time , can we take the delay time of the plugin with "getlatency" and use it on "setLatency"?
- I tried that code in "if / else statement" but it doesn't work properly. I usedin different oversampling modes, delay time changes when OS is on and off. For setLatency, only first statement works. Can that be done?
-
You can improve it
How? I am not the Logic developer.
-
@Christoph-Hart said in HISE FX and delay compensation:
You can improve it
How? I am not the Logic developer.
You are right, it seems like it is a Logic issue.
https://forum.juce.com/t/logic-pro-x-midi-fx-plug-in-latency-compensation-timeshift/23855What about FL Studio?
-
What is the status of this issue ?
Do I need to need to do anything manually to take care of latency or does Hise take care of that ? -
@lalalandsynth nudge topic.
-
@Fortune said in HISE FX and delay compensation:
With this way, plugin reports delay compensation to the DAW in the very begining of the initialization.
Is there a way to adjust delay compensation after a plugin has been initialized? The amount of latency may change depending on the amount/type of modules enabled. It would be nice to be able to compensate for this.
-
@dustbro I wonder if the procedure is not to report the biggest latency, and then compensate IN the plugin for lower latency configuration by adding the difference...
I reckon I've seen that one day but not 100% sure... -
@ustk said in HISE FX and delay compensation:
report the biggest latency, and then compensate IN the plugin
Not a bad idea!
-
Just to be clear , does the plugin not normally compensate for latency unless I do something specific to make it do that ?
-
@lalalandsynth said in HISE FX and delay compensation:
Just to be clear , does the plugin not normally compensate for latency unless I do something specific to make it do that ?
It does not automatically compensate for latency.
-
@lalalandsynth I don't think any plugin can compensate its own latency, it's the DAW's job. Plugins can only tell the DAW how much it needs
-
@ustk yes, that is what i meant does it report the latency without doing anything specific to make that happen? :)
-
@lalalandsynth Yes the report is automatic. you can also set your own with
Engine.setLatencySamples(int latency)
-
@ustk said in HISE FX and delay compensation:
the report is automatic
If I don't set the compensation, my plugins always report a latency of 0. I don't think that's correct, right?
-
@dustbro I might have wrong… I'll test that tomorrow
-
This post is deleted!