Generating unique saw wave

im normally going for this basic formula with the inharmonic parameter for spreading the individual partials to get an inharmonic spectrum and some random phases. The spectrum is multiplied by an 3dB per oct tilt instead of the static division formula. This could then be adjusted by different additive filters like formant, comb, bpf, lpf etc.
thanks to @nathan

(
{
	
	var numPartials = 64;
	var spectrum = (1..numPartials);
	
	var tension = (1 + (spectrum * spectrum * \inharmonic.kr(0.005))).sqrt;
	var tilt = (log2(spectrum) * \tilt.kr(-3)).dbamp;
	
	var freqs = \freq.kr(110) * spectrum * tension;
	
	var sig = SinOsc.ar(freqs, { Rand(0, 2pi) } ! numPartials);
	
	sig = (sig * tilt).sum;
	
	sig ! 2 * 0.05;
	
}.play;
)
4 Likes