Skip to content

Planning: Detune Effect

Colin Wallace edited this page Feb 27, 2015 · 4 revisions

Part of the detune effect includes (pseudo)randomized detuning as a function of partial index.

There are two parameters for this: seed and depth. However, when adjusting the seed, changes should be smooth. This can be accomplished by mixing the weighted output from two different seeds. But if we have only one seed at each end of the spectrum, that's not much control. If we have multiple seeds and linearly interpolate them, then we have a more difficult time looking up the 2 seeds we should be interpolating.

Maybe we can have 2 seeds and then our function that specifies the weight to interpolate is a function of partial index and seed value that appears very random, but isn't really. For example, inter(idx, seed) = idx*seed + (idx*seed)^2 - (idx*seed)^3 ...

Perhaps the best solution is detune(idx, seed) = (1-seed^2)*seed1(x) + (1-(seed-1)^2)*seed2(x) or detune(idx, seed) = (1-seed^2)*seed1(x) + (1-(seed-1/2)^2)*seed2(x) + (1-(seed-1)^2)*seed3(x) and so-forth. The question is: how many seeds do we need to make a sweep through the detune sound nice while also given the user enough variability in manual adjustment? My guess is that just 4 seeds would be alright.

Order to apply randomness

Detune has both an envelope and a random value. For non-random detunes, detune(t) = 1*envelope(t) for fully random detune, detune(t) = rand*envelope(t). This leads to a function where the amount of randomness can be controlled: detune(t) = (1 + (rand-1)*randDepth)*envelope(t). Should detune be centered around 0 or 1 in the random case? If 1, it's more consistent with the non-random version. But if 0, then we can detune without causing an overal frequency shift. 0 seems more desirable.