Additive Synthesis

You can modulate every parameter in the padSynthDistribution function though, including the width of the distribution - this gives enough control imo. Again, I did it this way so I could use it with your additive synthesis functions, if you look at the refactor above it is actually written using a similar method to what you were doing, I am simply assigning the indices for the do loops in the ‘constructor’ - sounds great with the comb filter :wink:

Adding bwi = 1 / (chain[\harmonicIdx]) * bwScale; could be a better way to parameterise the amplitude of the sidebands too

I guess there are three ways of thinking:

1.) initialise an array of harmonics (integer ratios) based on a number of partials
2.) pass an array of predefined harmonics from the language to the server
3.) create sidebands with the formant attempt using singleSideband modulation or modFM

i guess the padSynthDistribution attempt is inbetween those three things.

1 Like

do you have screenshots of the reaktor patches of razor (i hope we dont need a single-sample feedback loop, fingers crossed) ? Then we could work together on the reverb implementations. thats a cool idea!

Ive reworked the linear comb filter, now combDensity = 1 will filter out every other partial resulting in a square wave and the combWarp param will warp the comb response, so that the nodges are more dense in the lower register (like neck pickup) or more dense in the higher register (like bridge pickup). if you open the freqscope and choose linear mode you can see that quite nicely. When combWarp = 0 (logarithmic), its more or less equal to the exponential comb filter based on log2 but with the morphing capability. The former addHarmonicClustering function is now directly imbedded in the comb filter.

combWarp = 0.5 (linear)

combWarp = 0 (logarithmic)

combWarp = 1 (exponential)

var coreQuintic = { |x|
	x * x * x * x * x;
};

var outQuintic = { |x|
	1 - coreQuintic.(1 - x);
};

var quinticOutToLinear = { |x, shape|
	var mix = shape * 2;
	var easeOut = outQuintic.(x);
	easeOut * (1 - mix) + (x * mix);
};

var linearToQuinticIn = { |x, shape|
	var mix = (shape - 0.5) * 2;
	var easeIn = coreQuintic.(x);
	x * (1 - mix) + (easeIn * mix);
};

var expToLinearMorph = { |x, shape|
	Select.kr(shape > 0.5, [
		quinticOutToLinear.(x, shape),
		linearToQuinticIn.(x, shape)
	]);
};

var addCombFilter = { |chain, combDensity, combWarp, combPeak|
    var ratios = chain[\freqs] / chain[\freq];  // get harmonic ratios
    var normalizedRatios = (ratios / ratios[chain[\numPartials] - 1]).clip(0, 1);
    var warpedRatios = expToLinearMorph.(normalizedRatios, combWarp);  // apply warping
    var rescaledRatios = warpedRatios * ratios[chain[\numPartials] - 1];  // rescale to original range
	var phase = (rescaledRatios * (combDensity * 0.5)).wrap(0, 1);
    chain[\amps] = chain[\amps] * raisedCos.(phase, combPeak);
    chain;
};
3 Likes

to save some ugens you can implement the raisedCosine window with:

var raisedCos = { |phase, index|
    var cosine = cos(phase * 2pi);
    var raised = exp(index.abs * (cosine - 1));
	var hanning = 0.5 * (cosine + 1);
    raised * hanning;
};

instead of:

    var raisedCos = { |phase, index|
        var cosine = cos(phase * 2pi);
        var raised = exp(index.abs * (cosine - 1));
        var hanning = 0.5 * (1 + cos(phase * 2pi));
        raised * hanning;
    };

There are also some sin/cos approximations which would probably be well suited here in terms of CPU.

1 Like

The former transfer function to skew the comb nodges themselves will find its way in an additional spectral granulation function im currently working on.

2 Likes

Cant remember the additive comb filter approach ive used for this test recording, but i still love the sounds:

5 Likes

hi. can you share the examples of them? I wonder how they’re implemented by you

This is super hawt sounding. Please post more hawt clips.

1 Like

These implementations have been developed by @nathan during some lessons i took with him about 2-3 years ago. I made the comment to say that im not interested in other additive filters which you could find in razor, because i already have these covered.
This thread is already packed with stuff i have developed or refined over the last years. Im normally more then generous in sharing stuff i have been working on for countless hours, but i would rather keep these for myself.
But would be happy to discuss some of your attempts.

I got what you meant in the comment right away. It’s ok if you don’t want to share