MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ process_sample()

double MayaFlux::Nodes::Generator::Random::process_sample ( double  input = 0.)
overridevirtual

Generates a single stochastic value.

Parameters
inputInput value (can be used for distribution modulation)
Returns
Generated stochastic value

This method generates a single value according to the current distribution settings. The input parameter can be used to modulate or influence the distribution in advanced applications.

Implements MayaFlux::Nodes::Node.

Definition at line 19 of file Nodes/Generators/Random.cpp.

20{
22
24 && !m_networked_node) {
26 }
27
28 return m_last_output;
29}
double m_amplitude
Base amplitude of the generator.
void notify_tick(double value) override
Notifies all registered callbacks about a new value.
Kinesis::Stochastic::Stochastic m_generator
Core stochastic generator instance.
double m_current_start
Lower bound of the current output range.
double m_current_end
Upper bound of the current output range.
bool m_state_saved
tracks if the node's state has been saved by a snapshot operation
Definition Node.hpp:429
bool m_networked_node
Flag indicating if the node is part of a NodeNetwork This flag is used to disable event firing when t...
Definition Node.hpp:424
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:377
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
Definition Node.hpp:453

References MayaFlux::Nodes::Generator::Generator::m_amplitude, m_current_end, m_current_start, MayaFlux::Nodes::Node::m_fire_events_during_snapshot, m_generator, MayaFlux::Nodes::Node::m_last_output, MayaFlux::Nodes::Node::m_networked_node, MayaFlux::Nodes::Node::m_state_saved, and notify_tick().

+ Here is the call graph for this function: