add optional modulators to synth/voices

This commit is contained in:
2025-05-16 13:44:15 +02:00
parent 2b077a13a2
commit 8f69b4fcf8
4 changed files with 8 additions and 6 deletions

View File

@@ -61,14 +61,14 @@ public:
});
}
void process_samples(t_sample** _outputs, int _start_index, int _block_size)
void process_samples(t_sample** _outputs, int _start_index, int _block_size, std::span<std::span<t_sample>> _modulators = {})
{
for (int b = _start_index; b < _start_index + _block_size; b += internal_block_size) {
// process all events in the block (introduces potential inaccuracy of up to 16 samples)
process_events(b, internal_block_size);
for (const auto& v : voicePtrs) { v->process_samples(_outputs, b, internal_block_size); }
for (const auto& v : voicePtrs) { v->process_samples(_outputs, b, internal_block_size, _modulators); }
}
}