ryukau / VSTPlugins

Uhhyou Plugins VST 3 repository.

Home Page:https://ryukau.github.io/VSTPlugins/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LatticeReverb Not Working in Audacity 3.X Win64

ElijahHamilton opened this issue · comments

The plugin enables fine, loads up, but outputs no audio.

commented

Hi, @ElijahHamilton.

My plugins do nothing, if:

  1. Input or output channel count is less than 2.
  2. floating point precision is set to double or 64 bit.

Could you confirm that one of above is the case or not? To check 1, create stereo track and try applying LatticeReverb to there. If this is the case, I'll provide more information about it. On 2, I'm not planning to support double precision processing.

Following is the code relevant to this reply.

if (data.numInputs == 0) return kResultOk;
if (data.numOutputs == 0) return kResultOk;
if (data.numSamples <= 0) return kResultOk;
if (data.inputs[0].numChannels < 2) return kResultOk;
if (data.outputs[0].numChannels < 2) return kResultOk;
if (data.symbolicSampleSize == Vst::kSample64) return kResultOk;

I tried it on a stereo track, still no output. It makes a repetitive clicking noise in preview mode.
The precision is not set to double/64 bit.

commented

I confirmed that my plugins aren't working on Audacity 3.2.3. I'll look into it.

commented

The root cause seems like that Audacity doesn't provide Vst::ProcessData::processContext.

LatticeReverb started processing when commenting out following part of code.

if (data.processContext == nullptr) return kResultOk;
uint64_t state = data.processContext->state;
if (
(lastState & Vst::ProcessContext::kPlaying) == 0
&& (state & Vst::ProcessContext::kPlaying) != 0)
{
dsp.startup();
}
lastState = state;

I'll work on it, but it will take some time.


The stutter on stereo track is likely caused by following:

  1. Audacity pass input buffer to my plugin.
  2. Plugin find that processContext is null.
  3. Plugin returns early without any processing. It means bypassing is also not done.
  4. Audacity plays output buffer that is not updated.
  5. Go back to 1.

I was expecting that processContext would be provided for any host which primary purpose is audio editing.

LatticeReverb is only using transport state, which is if the host is started playing or not. It resets internal random number generator for each time host starts playing, to trying to output same signal for each play.

commented

@ElijahHamilton I made fixed version that works on my environment. Please let me know if it also works on yours.

LatticeReverb_20230127.zip

@ryukau I have tested it, and can confirm it now works!

And now, the plugin works in mono mode too.

commented

@ElijahHamilton Thank you for reporting and testing! The fix is now released as 0.52.0.

If something is still now working correctly, feel free to add comment, or open another issue.