Mema
Memory Matrix — multi-channel audio matrix monitor and router
Loading...
Searching...
No Matches
Mema::PluginParameterInfosMessage Class Reference

Carries the plugin name and complete parameter descriptor list from Mema to Mema.Re clients. More...

#include <MemaMessages.h>

+ Inheritance diagram for Mema::PluginParameterInfosMessage:
+ Collaboration diagram for Mema::PluginParameterInfosMessage:

Public Member Functions

 PluginParameterInfosMessage ()=default
 
 PluginParameterInfosMessage (const std::string &pluginName, const std::vector< PluginParameterInfo > &parameterInfos)
 
 PluginParameterInfosMessage (const juce::MemoryBlock &blob)
 
 ~PluginParameterInfosMessage ()=default
 
const juce::String & getPluginName () const
 Returns the display name of the currently loaded plugin.
 
const std::vector< PluginParameterInfo > & getParameterInfos () const
 Returns the ordered list of parameter descriptors for the loaded plugin.
 
- Public Member Functions inherited from Mema::SerializableMessage
 SerializableMessage ()=default
 
virtual ~SerializableMessage ()=default
 
void setId (int id)
 Tags the message with a connection-id used for echo-suppression on the server.
 
int getId () const
 Returns the connection-id tag, or -1 if not set.
 
bool hasUserId () const
 Returns true when a non-default connection-id has been assigned.
 
const SerializableMessageType getType () const
 Returns the concrete message type discriminator.
 
juce::MemoryBlock getSerializedMessage () const
 Serialises the message to a MemoryBlock ready to send over the socket.
 

Protected Member Functions

juce::MemoryBlock createSerializedContent (size_t &contentSize) const override
 Subclass hook — produces the type-specific payload bytes (everything after the type discriminator).
 
- Protected Member Functions inherited from Mema::SerializableMessage
std::uint32_t ReadUint32 (const char *buffer)
 Reads a big-endian uint32 from buffer.
 
std::uint16_t ReadUint16 (const char *buffer)
 Reads a big-endian uint16 from buffer.
 

Additional Inherited Members

- Public Types inherited from Mema::SerializableMessage
enum  SerializableMessageType {
  None = 0 ,
  EnvironmentParameters ,
  AnalyzerParameters ,
  ReinitIOCount ,
  AudioInputBuffer ,
  AudioOutputBuffer ,
  DataTrafficTypeSelection ,
  ControlParameters ,
  PluginParameterInfos ,
  PluginParameterValue
}
 
- Static Public Member Functions inherited from Mema::SerializableMessage
static SerializableMessageinitFromMemoryBlock (const juce::MemoryBlock &blob)
 Deserialises a raw TCP frame into the correct concrete SerializableMessage subclass.
 
static void freeMessageData (SerializableMessage *message)
 Type-correctly destroys a SerializableMessage* returned by initFromMemoryBlock().
 
- Protected Attributes inherited from Mema::SerializableMessage
SerializableMessageType m_type = SerializableMessageType::None
 Type discriminator stored in the first 4 bytes of every serialised frame.
 
int m_userId = -1
 Optional connection-id tag for echo-suppression (-1 = not set).
 

Detailed Description

Carries the plugin name and complete parameter descriptor list from Mema to Mema.Re clients.

Sent by MemaProcessor to all connected Mema.Re clients whenever a plugin is loaded, unloaded, or its remote-controllability settings change. On receipt, MemaReComponent passes the descriptors to PluginControlComponent, which dynamically builds a control widget (slider, combo box, or toggle button) for each PluginParameterInfo whose isRemoteControllable flag is set.

Wire payload per parameter: index (int32) + id (uint16 len + UTF-8) + name (uint16 len + UTF-8)

  • defaultValue (float) + currentValue (float) + label (uint16 len + UTF-8)
  • isAutomatable (bool) + isRemoteControllable (bool) + category (int32)
  • minValue (float) + maxValue (float) + stepSize (float) + isDiscrete (bool)
  • type (ParameterControlType) + stepCount (int32) + stepCount × stepName strings.
See also
PluginParameterInfo — the per-parameter descriptor struct.
MemaReComponent::handleMessage() — unpacks this message and forwards to PluginControlComponent.

Definition at line 835 of file MemaMessages.h.

Constructor & Destructor Documentation

◆ PluginParameterInfosMessage() [1/3]

Mema::PluginParameterInfosMessage::PluginParameterInfosMessage ( )
default

◆ PluginParameterInfosMessage() [2/3]

Mema::PluginParameterInfosMessage::PluginParameterInfosMessage ( const std::string &  pluginName,
const std::vector< PluginParameterInfo > &  parameterInfos 
)
inline

◆ PluginParameterInfosMessage() [3/3]

◆ ~PluginParameterInfosMessage()

Mema::PluginParameterInfosMessage::~PluginParameterInfosMessage ( )
default

Member Function Documentation

◆ createSerializedContent()

juce::MemoryBlock Mema::PluginParameterInfosMessage::createSerializedContent ( size_t &  contentSize) const
inlineoverrideprotectedvirtual

Subclass hook — produces the type-specific payload bytes (everything after the type discriminator).

Parameters
contentSizeSet by the implementation to the byte count of the returned block.
Returns
A MemoryBlock containing only the payload (no type prefix).

Implements Mema::SerializableMessage.

Definition at line 960 of file MemaMessages.h.

◆ getParameterInfos()

const std::vector< PluginParameterInfo > & Mema::PluginParameterInfosMessage::getParameterInfos ( ) const
inline

Returns the ordered list of parameter descriptors for the loaded plugin.

Definition at line 957 of file MemaMessages.h.

◆ getPluginName()

const juce::String & Mema::PluginParameterInfosMessage::getPluginName ( ) const
inline

Returns the display name of the currently loaded plugin.

Returns
An empty string if no plugin is loaded.

Definition at line 955 of file MemaMessages.h.


The documentation for this class was generated from the following file: