9  For plugin developers

FxmeNet runs any VST3 effect. A plugin can also be made FxmeNet-aware, and then it gets tier T2 (chapter 8): its editor on the client shows the live meters, spectra and values of the copy that runs on the server. This chapter summarises what that takes. The reference is the file fxmenet-howto.md of FxmeTools, with the demonstration plugin Examples/GainPan in the FxmeNet source.

9.1  The idea
9.2  What to do
9.3  Checking
9.4  The FxmeNet compatible mark

9.1  The idea

The plugin is loaded twice: a source on the server, which processes audio, and a mirror on the client, which never processes and shows the editor. What the editor reads that is not a parameter (a meter, a spectrum, a computed value) is sent from the source to the mirror as telemetry and written into the mirror’s own objects, so the editor itself does not change. Outside FxmeNet the plugin behaves exactly as before.

9.2  What to do

1.
Add an fxme::net::NetBridge to the processor, and return it from getVST3ClientExtensions().
2.
Register everything the editor reads that is not a parameter, with a stable name each: meters, taps, atomics, computed scalars.
3.
In the few getters that compute from the DSP, return the telemetry value when the plugin is a mirror.
4.
Skip the work that only feeds the DSP when the plugin is a mirror.
5.
Call notifyStateChanged() when state that is not a parameter changes (a loaded file, for example).
#include <FxmeTools/net/NetBridge.h> 
 
class MyProcessor : public juce::AudioProcessor 
{ 
public: 
    juce::VST3ClientExtensions* getVST3ClientExtensions() override { return &net; } 
private: 
    Compressor compressor; 
    fxme::net::NetBridge net;   // after everything it registers 
}; 
 
MyProcessor::MyProcessor() 
{ 
    net.telemetry().addMeter ("gr", compressor.getGrMeter()); 
}

The editor reads

Register

a level meter

addMeter (name, meter)

a spectrum or waveform tap

addTap (name, tap)

a std::atomic<float>

addValue (name, atomic)

a function that computes a value

addScalar (name, getter)

a read-and-reset function

addPeak (name, function)

9.3  Checking

The FxmeNet source includes a test tool, FxmeNetLoopback, which loads your plugin twice in one process, as source and mirror, and pumps the telemetry between them. Both editors appear side by side; the mirror’s meters must follow the source’s.

FxmeNetLoopback path/to/MyPlugin.vst3

9.4  The FxmeNet compatible mark

Plugins that support FxmeNet may carry the FxmeNet mark, so that users know the plugin gives a tier T2 experience.

FxmeNet logo FxmeNet icon

[TODO: The two marks above are drafts (a connector-shaped logo and a small icon). Decide the final design and supply it as SVG and as transparent PNG in several sizes. Write the conditions of use: what a plugin must do to carry it (for example, that it passes the Loopback check and that its editor works as a mirror), where to show it (website, manual, plugin’s information panel), and the licence of the artwork.]