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

◆ set_bit_planes()

void MayaFlux::Buffers::LogicProcessor::set_bit_planes ( uint32_t  bits)

Processes every sample as a word of bit streams, one node per bit.

Parameters
bitsWord width, 1 to 24; 0 turns it off

Each sample becomes an offset binary word (Kinesis::Discrete::to_word) and every bit position runs through its own clone of the node, so each plane keeps its own state. Planes are presented to the node as 0.0 or 1.0 and the output bits are recombined into the sample, so the logic data is a value in [-1, 1] rather than a bit. With a parallel node and keys, plane j sees plane j of every key and of this buffer: bitwise word operations across channels. The clones are taken at the next block and again when the node is replaced or this is called.

Definition at line 214 of file LogicProcessor.cpp.

215{
216 m_plane_bits = bits == 0 ? 0 : std::clamp(bits, uint32_t { 1 }, uint32_t { 24 });
217 m_plane_nodes.clear();
218 m_plane_template.reset();
219}
std::vector< std::shared_ptr< Nodes::Generator::Logic > > m_plane_nodes
One clone of the node per bit plane.
uint32_t m_plane_bits
Word width when processing bit planes, 0 when off.
std::shared_ptr< Nodes::Generator::Logic > m_plane_template
The node the plane clones were taken from.

References m_plane_bits, m_plane_nodes, and m_plane_template.