`juce7` technical preview branch

Thanks, I’ve debugged Monique LV2 a bit. I’m pretty sure that both of the issues you mentioned are on the hosting side.

For the Ardour issue: JUCE plugins need to know their maximum processing block size, so JUCE LV2 plugins declare bufs:boundedBlockSize as an lv2:requiredFeature. If a plugin requires features that cannot be supplied by the host, the host should not attempt to instantiate the plugin. If the host does supply the feature, then it should include the feature in the array of features passed to the plugin during instantiation. For that assertion to fire, one of the following must be true:

  • The host cannot supply the boundedBlockLength feature, but attempts to instantiate the plugin anyway. The host should not attempt to instantiate the plugin in this case.
  • The host can supply the boundedBlockLength feature, but does not include it in the features data array. In this case, the host should be updated to include boundedBlockLength in its features array.

For the Carla issue: JUCE LV2 UIs support opts:interface to allow the scaleFactor option to be updated dynamically after creating a UI instance. This is an optional feature, and is declared as such in the manifest. The host is free to ignore this feature, but then UIs may not resize properly when they are dragged between screens with different DPIs.

While debugging Monique LV2 in Carla, I also noticed that the behaviour is a bit different to the Monique VST3. Specifically, the LV2 didn’t produce any sound unless I started playback from Carla’s transport options; the VST3 produces sound even when playback has not been started. Monique will only process when it receives valid CurrentPositionInfo. JUCE’s VST3 wrapper will always return true from getCurrentPosition, whether or not the host passes a Vst::ProcessContext, but the LV2 wrapper will return false from getCurrentPosition if the host has not provided time info for the current callback. From the docs for AudioPlayHead, I think the LV2 implementation is more correct, but updating the VST3 implementation to match would be a breaking change. I’m still considering the best way forward here.

2 Likes