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

Central monitoring panel of the Mema.Mo application. More...

#include <MemaMoComponent.h>

+ Inheritance diagram for MemaMoComponent:
+ Collaboration diagram for MemaMoComponent:

Public Types

enum  RunningStatus {
  Inactive ,
  Standby ,
  Active
}
 Lifecycle state of the monitor panel driven by the network connection status. More...
 

Public Member Functions

 MemaMoComponent ()
 
 ~MemaMoComponent () override
 
void setOutputMeteringVisuActive ()
 Switches to the meterbridge (level-bar) visualisation mode.
 
void setOutputFieldVisuActive (const juce::AudioChannelSet &channelConfiguration)
 Switches to the 2-D spatial field visualisation for the given speaker layout.
 
void setWaveformVisuActive ()
 Switches to the scrolling waveform visualisation mode.
 
void setSpectrumVisuActive ()
 Switches to the FFT spectrum visualisation mode.
 
std::optional< std::uint16_t > getNumVisibleChannels ()
 Returns the number of channels currently shown, or empty if no active visualiser.
 
void setNumVisibleChannels (std::uint16_t count)
 Propagates a channel-count change to the active visualisation component.
 
void resized () override
 Lays out visualisation components to fill the available area.
 
void paint (juce::Graphics &g) override
 Paints the background when no visualisation is active.
 
void handleMessage (const Message &message) override
 Dispatches inbound network messages to the appropriate analyzer or state handler.
 

Public Attributes

std::function< void()> onExitClick
 Invoked when the user triggers a disconnection.
 

Detailed Description

Central monitoring panel of the Mema.Mo application.

MemaMoComponent is the active-state UI of the Mema.Mo tool — the monitoring companion in the Mema tool suite. When a TCP connection to a Mema server has been established, this component owns a pair of ProcessorDataAnalyzer instances (one for input audio, one for output audio) that process the streamed AudioOutputBufferMessage / AudioInputBufferMessage payloads received over the network and broadcast level/spectrum data to the pluggable visualisation components.

Visualisation modes (mutually exclusive, switched from MainComponent settings):

  • Meterbridge — horizontal or vertical peak/RMS/hold level bars for every channel.
  • 2-D spatial field — positional level indicators for speaker layouts from LRS up to 9.1.6 ATMOS, rendered by TwoDFieldOutputComponent.
  • Waveform — scrolling audio waveform plots per channel.
  • Spectrum — frequency-domain FFT magnitude display per channel.

The component communicates back to MainComponent via the onExitClick callback when the user requests a disconnection.

See also
MainComponent — owns this component and drives the Discovering/Connecting/Monitoring state machine.
Mema::ProcessorDataAnalyzer — performs peak/RMS/hold metering and FFT analysis on received buffers.

Definition at line 56 of file MemaMoComponent.h.

Member Enumeration Documentation

◆ RunningStatus

Lifecycle state of the monitor panel driven by the network connection status.

Enumerator
Inactive 

No TCP connection; component renders a placeholder.

Standby 

Connection established but no audio data received yet.

Active 

Actively receiving and visualising audio data from Mema.

Definition at line 60 of file MemaMoComponent.h.

Constructor & Destructor Documentation

◆ MemaMoComponent()

MemaMoComponent::MemaMoComponent ( )

◆ ~MemaMoComponent()

MemaMoComponent::~MemaMoComponent ( )
override

Definition at line 43 of file MemaMoComponent.cpp.

Member Function Documentation

◆ getNumVisibleChannels()

std::optional< std::uint16_t > MemaMoComponent::getNumVisibleChannels ( )

Returns the number of channels currently shown, or empty if no active visualiser.

Definition at line 304 of file MemaMoComponent.cpp.

◆ handleMessage()

void MemaMoComponent::handleMessage ( const Message &  message)
override

Dispatches inbound network messages to the appropriate analyzer or state handler.

Definition at line 404 of file MemaMoComponent.cpp.

References Active, Mema::AudioBufferMessage::Input, Mema::AudioBufferMessage::Output, and resized().

◆ paint()

void MemaMoComponent::paint ( juce::Graphics &  g)
override

Paints the background when no visualisation is active.

Definition at line 318 of file MemaMoComponent.cpp.

◆ resized()

void MemaMoComponent::resized ( )
override

Lays out visualisation components to fill the available area.

Definition at line 323 of file MemaMoComponent.cpp.

Referenced by handleMessage(), setOutputFieldVisuActive(), setOutputMeteringVisuActive(), setSpectrumVisuActive(), and setWaveformVisuActive().

◆ setNumVisibleChannels()

void MemaMoComponent::setNumVisibleChannels ( std::uint16_t  count)

Propagates a channel-count change to the active visualisation component.

Definition at line 312 of file MemaMoComponent.cpp.

◆ setOutputFieldVisuActive()

void MemaMoComponent::setOutputFieldVisuActive ( const juce::AudioChannelSet &  channelConfiguration)

Switches to the 2-D spatial field visualisation for the given speaker layout.

Definition at line 111 of file MemaMoComponent.cpp.

References Mema::MeterbridgeComponent::Horizontal, and resized().

◆ setOutputMeteringVisuActive()

void MemaMoComponent::setOutputMeteringVisuActive ( )

Switches to the meterbridge (level-bar) visualisation mode.

Definition at line 47 of file MemaMoComponent.cpp.

References Mema::MeterbridgeComponent::Horizontal, and resized().

Referenced by MemaMoComponent().

◆ setSpectrumVisuActive()

void MemaMoComponent::setSpectrumVisuActive ( )

Switches to the FFT spectrum visualisation mode.

Definition at line 240 of file MemaMoComponent.cpp.

References resized().

◆ setWaveformVisuActive()

void MemaMoComponent::setWaveformVisuActive ( )

Switches to the scrolling waveform visualisation mode.

Definition at line 176 of file MemaMoComponent.cpp.

References resized().

Member Data Documentation

◆ onExitClick

std::function<void()> MemaMoComponent::onExitClick

Invoked when the user triggers a disconnection.

Definition at line 96 of file MemaMoComponent.h.


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