Ability to change audioPlugin reported latency dynamically?

조회 수: 2 (최근 30일)
James
James 2024년 10월 11일
댓글: Jimmy Lapierre 2024년 10월 11일
I am developing an stft based audioPlugin which allows the user to set the size of the window applied to incoming data. When the window size is changed (from 512 to 1024 for example), the algorithm's latency changes.
I have setLatencyInSamples being called in reset. When I build and run the plugin in Ableton, the initial reported latency Ableton shows is correct based on the window length's default parameter.
However, I can't seem to get the plugin to dynamically update the reported latency Ableton sees if the user changes the window length in real time. In my callback for changing the window length parameter, set.windowLength, I am calling reset (which is calling setLatencyInSamples providing the latest window length value). It doesn't seem that this is updating the latency Ableton sees.
Is there something I am doing wrong? Is there maybe a workaround? Or does dynamically changing the reported latency with setLatencyInSamples while the plugin is running not supported?
Thanks in advance!

답변 (1개)

Jimmy Lapierre
Jimmy Lapierre 2024년 10월 11일
편집: Jimmy Lapierre 2024년 10월 11일
There are some limitations, for example latency cannot be changed during playback is active. But I'm not sure that's the case here.
- Are you able to change the latency before playing any audio in the DAW?
- Does it make a difference if you try VST, VST3, etc.?
- Could you have a look at the FastConvolver example? You might need to use resetImpl if you plugin is a system object (or you might want to try as a system object, like in that example).
edit audiopluginexample.FastConvolver
  댓글 수: 2
James
James 2024년 10월 11일
Thanks for the quick response!
- Are you able to change the latency before playing any audio in the DAW?
No, it doesn't seem to update the reported latency if I switch the window size before or during playback.
- Does it make a difference if you try VST, VST3, etc.?
My initial attempt was with VST. Just tried with VST, VST3, and AU and got the same results.
- Could you have a look at the FastConvolver example? You might need to use resetImpl if you plugin is a system object (or you might want to try as a system object, like in that example).
I was actually looking over this example recently as I was trying to find examples of calling setLatencyInSamples. I updated my code to inherit matlab.System and changed process to stepImpl and reset to resetImpl, but the reported latency didn't change across VST, VST3, and AU before/during playback when altering the window size.
I believe JUCE has the ability to dynamically update reported plugin latency: https://forum.juce.com/t/how-to-report-plugin-latency/55869/6. I have a few plugins which have a configurable buffer which DO update the reported latency dynamically based on a plugin parameter.
I'm hesitant to share my code since the class is pretty big, but I could likely simplify it into a version that is passthrough but has user configured latency if that's helpful.
Jimmy Lapierre
Jimmy Lapierre 2024년 10월 11일
I'll let you know if I need reproduction code, but for now I'll do some investigation with what I have.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio Plugin Creation and Hosting에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by