|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Buffers::LogicProcessor::set_neighbourhood | ( | size_t | radius, |
| size_t | generations = 1, |
||
| bool | wrap = true, |
||
| bool | memory = false |
||
| ) |
Treats the samples of a block as cells of an automaton.
| radius | Cells on each side that feed a cell |
| generations | Steps per block; 0 turns it off |
| wrap | Whether the block's ends meet, otherwise cells beyond them are 0 |
| memory | Whether the block perturbs the previous result instead of replacing it |
Needs a parallel node. A cell is 1 when its sample is above zero, and the node is evaluated for every cell with 2 * radius + 1 slots, slot 0 the cell furthest to the right and the last slot the furthest to the left, so Wolfram's rule numbers work with input_truth_table_state(3, rule). With memory the block's cells are XORed into the previous block's final generation, so the pattern evolves across blocks; use one processor per channel (clone) for that. The logic data is the final generation, 0 or 1.
Definition at line 221 of file LogicProcessor.cpp.
References m_generations, m_memory, m_previous_cells, m_radius, m_wrap, and radius.