Ability to change audioPlugin reported latency dynamically?

2 visualizaciones (últimos 30 días)
James
James el 11 de Oct. de 2024
Comentada: Jimmy Lapierre el 11 de Oct. de 2024
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!

Respuestas (1)

Jimmy Lapierre
Jimmy Lapierre el 11 de Oct. de 2024
Editada: Jimmy Lapierre el 11 de Oct. de 2024
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 comentarios
James
James el 11 de Oct. de 2024
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 el 11 de Oct. de 2024
I'll let you know if I need reproduction code, but for now I'll do some investigation with what I have.

Iniciar sesión para comentar.

Categorías

Más información sobre Audio Plugin Creation and Hosting en Help Center y File Exchange.

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by