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

◆ step_sequence_state()

MAYAFLUX_API std::vector< double > MayaFlux::Kinesis::Discrete::step_sequence_state ( std::span< const double >  values,
double  threshold = 0.5 
)

Builds the array step_sequence reads and writes.

Parameters
valuesThe sequence, which sets the length
thresholdLevel the trigger must rise through

Layout: [threshold, cursor, latched, N, values]. It starts latched, so an input that begins high does not advance until it has fallen and risen.

Definition at line 616 of file Kernels.cpp.

617{
618 std::vector<double> state(4 + values.size(), 0.0);
619 state.at(0) = threshold;
620 state.at(1) = 0.0;
621 state.at(2) = 1.0;
622 state.at(3) = static_cast<double>(values.size());
623
624 for (size_t i = 0; i < values.size(); ++i)
625 state.at(4 + i) = values[i];
626 return state;
627}
std::vector< std::byte > values
Definition VDBWriter.cpp:26
float threshold

References threshold, and values.