103{
104 const uint32_t bits = std::clamp(
m_plane_bits, uint32_t { 1 }, uint32_t { 24 });
105
108 for (uint32_t plane = 0; plane < bits; ++plane) {
110 }
112 }
113
115
119 m_slots.assign(key_count + 1, 0.0);
120
121 const size_t available = input_data.size();
123
124 for (size_t i = 0; i < num_samples; ++i) {
128 m_key_words[k] = (key && i < key->get_data().size())
130 : silence;
131 }
132
133 uint32_t word = 0;
134 for (uint32_t plane = 0; plane < bits; ++plane) {
135 const auto bit_of = [plane](uint32_t w) { return static_cast<double>((w >> plane) & 1U); };
136
138 if (parallel) {
141 }
144 } else {
146 }
147 word |= (
out > 0.5 ? 1U : 0
U) << plane;
148 }
149
151 }
152}
std::vector< float > * out
std::vector< double > m_slots
Input slots handed to the node.
std::vector< std::shared_ptr< Nodes::Generator::Logic > > m_plane_nodes
One clone of the node per bit plane.
std::vector< double > m_logic_data
Stored logic processing results.
std::vector< uint32_t > m_key_words
Words of the keys at the current sample.
uint32_t m_plane_bits
Word width when processing bit planes, 0 when off.
std::shared_ptr< Nodes::Generator::Logic > m_logic
Logic node for processing.
std::shared_ptr< Nodes::Generator::Logic > m_plane_template
The node the plane clones were taken from.
std::vector< std::shared_ptr< AudioBuffer > > m_live_keys
Keys locked for the current block.
size_t key_count() noexcept
Returns the total number of keys.
double from_word(uint32_t word, uint32_t bits) noexcept
The value of an offset binary word; bits above the width are ignored.
uint32_t to_word(double value, uint32_t bits) noexcept
The offset binary word of a value, clamped to [-1, 1].
@ MULTI_INPUT
Parallel evaluation of multiple input signals.