## How to calculate modulation matrix with "feedback" parameters

DSP, Plug-in and Host development discussion.
xhy3
KVRist
36 posts since 19 Jan, 2014
I know there are already a lot modulation matrix posts, but i could not find an answer. I wonder if there is a way to calculate a mod matrix that contains feedback dependencies. For example an LFO that modulates its own LFO rate (like on some FM synths where a sine can modulate itself).
I'm not sure what the best way is to implement something like this. Is it possible to solve this in one step or is it required to use a sample delay to achieve this?

xhy3
KVRist
36 posts since 19 Jan, 2014
Ok, i just saw this post and think it's the same:

viewtopic.php?t=255107

Any additional input is welcome. Maybe an elegant way to implement this?

edit: i think about something dynamic without hardwire things in the code.

jussi3001
KVRist
47 posts since 25 Apr, 2007 from Helsinki, Finland
xhy3 wrote:I know there are already a lot modulation matrix posts, but i could not find an answer. I wonder if there is a way to calculate a mod matrix that contains feedback dependencies. For example an LFO that modulates its own LFO rate (like on some FM synths where a sine can modulate itself).
I'm not sure what the best way is to implement something like this. Is it possible to solve this in one step or is it required to use a sample delay to achieve this?
If you want audio rate modulations (FM) with feedback then all calculations must be done with single samples not with buffers.

But if you're talking only about modulation (rate) feedback then it's much simpler. But you must then take into account that fed back signal will be one update behind (LFO output in your case).

Pseudo code (run at modulation rate, usually integer subdivision of audio sample rate)

lfoRate = 2 + LFO.output * 0.5;
LFO.setRate(lfoRate);
LFO.process();
lfoOutput = LFO.output;
Jussi Saarelainen

https://repeto.net
MIDI looping and sequencing software