SynthDef("a", {
arg ratio=1, base, full_count, amp, tilt=(-3);
base = base*ratio;
full_count = 1/full_count; // sum of osc must be 1
amp = (log2(ratio) * tilt).dbamp*amp;
Out(0, {amp*SinOsc.ar(base)})
}).add
(
var func;
func = {
|harmonics, even_uneven_ratio, freq, tilt|
var a = Array.fill(harmonics, {
|i|
if(i.odd,{ even_uneven_ratio },{ even_uneven_ratio = 1});
Synth("a", [
base: freq,
ratio:i,
full_count: harmonics,
amp: even_uneven_ratio
])
});
};
func.value(64, 0.5, 440, -3)
)
I eval SynthDef then func, but it dont output any sound