Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::MultiChannelBallistics Struct Reference

Configurable ballistics for multi-channel meter display (UI thread). More...

#include <multi_channel_meter.hpp>

Classes

struct  Channel

Public Member Functions

bool update (const MultiChannelMeterData &data, float dt)
 Update ballistics from new meter data.
void clear_clips ()
 Reset all clip indicators immediately.

Public Attributes

std::array< Channel, kMaxMeterChannels > channels {}
int num_channels = 0
float attack_time = 0.001f
float release_time = 0.3f
float peak_hold_time = 1.5f
float clip_hold_time = 3.0f

Detailed Description

Configurable ballistics for multi-channel meter display (UI thread).

Member Function Documentation

◆ clear_clips()

void pulp::signal::MultiChannelBallistics::clear_clips ( )
inline

Reset all clip indicators immediately.

◆ update()

bool pulp::signal::MultiChannelBallistics::update ( const MultiChannelMeterData & data,
float dt )
inlinenodiscard

Update ballistics from new meter data.

Call once per UI frame.

Returns true when a displayed value actually moved. A UI thread polls this every frame for as long as it is bound, silence included, so the return value is what lets a still meter ask for nothing: repaint on true, and a settled meter costs zero composites instead of one per frame forever. Only the fields that reach the screen count — the hold counters tick down invisibly. MeterBallistics::update reports movement the same way. If you are only advancing the ballistics and will never paint, say so with (void).

Member Data Documentation

◆ attack_time

float pulp::signal::MultiChannelBallistics::attack_time = 0.001f

◆ channels

std::array<Channel, kMaxMeterChannels> pulp::signal::MultiChannelBallistics::channels {}

◆ clip_hold_time

float pulp::signal::MultiChannelBallistics::clip_hold_time = 3.0f

◆ num_channels

int pulp::signal::MultiChannelBallistics::num_channels = 0

◆ peak_hold_time

float pulp::signal::MultiChannelBallistics::peak_hold_time = 1.5f

◆ release_time

float pulp::signal::MultiChannelBallistics::release_time = 0.3f

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