hey, i was messing around with fm synthesis (just one carrier, one modulator) to achieve some squeaking sounds and discovered that i have to put either the cRatio really high or the mRatio really low and ajusting index & iScale to achieve this kind of sound which made me suspicious if it could be achieved maybe with an additional frequency envelope for the modulator / carrier or something else to set mRatio and cRatio to moderate amounts. atm mRatio at 0.32 and cRatio at 32 feels kind of odd to me. and i dont want to set the frequency for the modualator to another variable then freq.
Im also not sure if it makes any difference to have an array of detuned frequencies for the modulator. it seems that the modulator is just higher in amplitude then and its not so much or nothing at all changing the sound when you adjust the other parameters accordingly. any ideas?
EDIT: should it be always the same for freq and mul. i mean freqs * mRatio for the frequency and freqs * mRatio * iEnv for mul? or whats about freqs * mRatio for freq and freq * mRatio * iEnv for mul when you deal with an array of detuned frequencies?
(
{
var trig = \trig.tr(1);
var freq = \freq.kr(20);
var index = \index.kr(3);
var iScale = \iScale.kr(6);
var mRatio = \mRatio.kr(0.32);
var cRatio = \cRatio.kr(32);
var sig, fmod, freqs, gainEnv, iEnv;
iEnv = EnvGen.ar(Env([index, index * iScale, index], [\iAtk.kr(0.34), \iRel.kr(0.01)], [\cAtk.kr(0), \cRel.kr(0)]), trig);
gainEnv = EnvGen.ar(Env([0, 1, 1, 0], [\atk.kr(0.075), \dec.kr(0.25), \rel.kr(0.025)]), trig, doneAction: Done.freeSelf);
freqs = freq * Array.fill(6, { \detun.kr(1.008) ** Rand(-1.0, 1.0) });
fmod = SinOsc.ar(freqs * mRatio, mul: (freqs * mRatio * iEnv)).sum;
sig = Saw.ar(freqs * cRatio + fmod);
sig = sig * gainEnv * \amp.kr(0.1);
sig = Splay.ar(sig);
sig = LeakDC.ar(sig);
}.play;
)
