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

@@ -5,6 +5,7 @@
#include "tx_operator.h"
#include "tx_sineosc.h"
#include "tx_parameter_mapping.h"
#include <span>
namespace trnr {
@@ -48,7 +49,7 @@ public:
// modulates the pitch in semitones
void modulate_pitch(float _pitch) override { this->pitch_mod = _pitch; }
void process_samples(t_sample** _outputs, int _start_index, int _block_size) override
void process_samples(t_sample** _outputs, int _start_index, int _block_size, std::span<std::span<t_sample>> _modulators = {}) override
{
float frequency = midi_to_frequency(midi_note + pitch_mod + additional_pitch_mod);