In most DAWs, if mute a track, the DAW will silence the Instrument plug-in even if it generates sound, but in Studio One, it seems that it only stops MIDI transmission and does not silence the track on the DAW side.
Therefore, plug-ins that generate sounds independent of MIDI input need to know if the track is muted, and if so, the plug-in needs to explicitly stop sound generation.
The PreSonus Plug-In Extensions added in JUCE7 include track mute information definitions, so it seems possible to acquire this information.
However, I do not know how exactly to implement it to get the information.
Is it something that can be obtained using juce::ExtensionsVisitor or something similar?
It would be very helpful if you could provide an example implementation.
Thank you in advance.
In v7.0.8 of JUCE, I implemented a Processor that inherits from JUCE::AudioProcessor and VST3ClientExtensions. (code excerpt below)
in “PluginProcessor.h”
class PluginProcessor : public AudioProcessor, public VST3ClientExtensions{
public:
VST3ClientExtensions* getVST3ClientExtensions() override { return this; }
void setIComponentHandler(Steinberg::FUnknown* handler) override {
handler_ = handler;
}
private:
Steinberg::FUnknown* handler_ = nullptr;
};
in “PluginProcessor.cpp”
#include "PluginProcessor.h"
#include "juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivsteditcontroller.h"
#include "juce_audio_processors/format_types/pslextensions/ipslcontextinfo.h"
DEF_CLASS_IID(Presonus::IContextInfoProvider)
void SingerPluginProcessor::processBlock(AudioBuffer<float>& buffer, MidiBuffer& midiMessages) {
if (handler_ != nullptr) {
Steinberg::FUnknownPtr<Presonus::IContextInfoProvider> context_info_provider(handler_);
if (context_info_provider != nullptr) {
Steinberg::int32 value;
if (Steinberg::kResultTrue ==
context_info_provider->getContextInfoValue(value, Presonus::ContextInfo::kMute)) {
if (value == 1) {
buffer.clear();
return;
}
}
}
}
// normal process below(omit)
}
I tried running it on Studio One 6 on Windows,
VST3ClientExtensions::setIComponentHandler() was called once from JuceVST3EditController::installAudioProcessor() but nullptr was specified.
After that, Steinberg::Vst::setComponentHandler() is called and the handler is set, but VST3ClientExtensions::setIComponentHandler() is not called at that time, so that the plug-in Information cannot be retrieved via the handler.
Is there any solution to this?