Skip to main content
Topic: VST Visualisation - FLAC decoding in bursts, not realtime (like WAV)? (Read 344 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

VST Visualisation - FLAC decoding in bursts, not realtime (like WAV)?

I've written a VST plugin to do visualisation with foo_vst (a sound -> light plugin I also use with DAWs).  It works essentially like an audio meter.

When decoding CD rips (44K/16) WAV files, the decoded data blocks come into the VST plugin in real-time, so the visualisation is correct.

When decoding the same files encoded as FLAC, it seems the audio is decoded in bursts of large chunks, with large gaps between.  This means that the visualisation only gets occasional values to work with, as it works in real-time but the all the data comes in (more or less) all at once, so is mostly missed by the real-time code.

The in-built visualisations (eg. Spectrum Analyser)  don't have this problem with FLAC files, so they most be getting 'real-time' spaced data.  So can this also be delivered to the DSP pipeline?  At least an option to enable this for VST visualisation would be handy.

You can see this issue clearly with VST plugin UIs that have audio meters - they have responsive animations with WAV files, but very slow animations with FLAC files.
Author of -Wavpack4Wavelab- and -CheckWavpackFiles-

Re: VST Visualisation - FLAC decoding in bursts, not realtime (like WAV)?

Reply #1
Or you can write a VST visualization frontend that uses the visualization interface. DSP pipeline is to be considered neither real-time nor low latency. Inputs are free to emit as much or as little audio as they want at a time, as are all DSPs.

Re: VST Visualisation - FLAC decoding in bursts, not realtime (like WAV)?

Reply #2
That makes sense for general DSP sure, but it's not great with any that have visualisations, such as meters.  VST plugins are typically run in real-time for real-time audio playback in their intended hosts (mainly DAWs and audio editors).  Their meters won't work correctly otherwise.

My plugin is for use in DAWs as well, so makes more sense to me to keep it VST.  A workaround would be to buffer and timestamp the incoming audio samples, which I'll implement.  However as foobar is already (presumably) serving the audio in real-time chunks to it's visualisation pipeline, it would be great if that could be enabled for the DSP pipeline with (say) an Advanced option.  There are many cool metering plugins that would also benefit from that.

Note that the only issue (it seems) is the FLAC decoder here (maybe others too, have only tested FLAC and WAV).
Author of -Wavpack4Wavelab- and -CheckWavpackFiles-

Re: VST Visualisation - FLAC decoding in bursts, not realtime (like WAV)?

Reply #3
Cool, then tell your VST wrapper's author to rework their VST wrapping to support "real time" processing. Because the foobar2000 DSP SDK doesn't really have that in mind.

You could also, you know, use the actual visualization API, which also lets you pick whatever latency you want when requesting data.

 

Re: VST Visualisation - FLAC decoding in bursts, not realtime (like WAV)?

Reply #4
You could also, you know, use the actual visualization API, which also lets you pick whatever latency you want when requesting data.

Unfortunately not an option, as the VST is complex and already has an extensive UI based on a VST framework (SynthEdit) - rewriting all of that wouldn't be worth it.

VST plugins are essentially real-time DSP and visualisation (UI) in one unit.  No worries, I'll work around it, thanks.
Author of -Wavpack4Wavelab- and -CheckWavpackFiles-

 
SimplePortal 1.0.0 RC1 © 2008-2020