Hi,
I am experimenting with FM-synthesis and slowly starting to understand how it works. When playing around with it I wondered whether there was a way to change cmRatio and Index, while the oscillator continued to run:
carrier = 220;
cmRatio = 0.001; // deviation speed
index = 1; // deviation size
amp = 0.5;
s = Sine(carrier,amp);
s.mod(“freq”, Sine(cmRatio*carrier,index*carrier), “+”)
Thanks in advance
.p.
Sorry it’s taken me so long to respond!! Not sure how I went so long without visiting the forum.
You can mod cmRatio and index just like anything else I think. This definitely works in new Gibber:
a = FM("glockenspiel");
a.mod("cmRatio", LFO(1, 1));
a.mod("index", LFO(3, 2), "*");
a.note("A4");
Also, it’s worth pointing out that a lot of FM synthesis algorithms use multiple “operators”… I’m really doing the simplest algorithm possible in Gibber. But if you look at the patches for the DX7 there were actually 6 operators (sine oscillators) that could be chained together in different ways. The code example above is basically sort of a four operator patch… the carrier, the modulator, the LFO for the cmRatio and the LFO for the index, but if I remember correctly the operators in “traditional” FM synthesis were really just wired into to the frequency components of other oscillators, as opposed to being able to control parameters like cmRatio directly.