I've added some functions similar to dryWetMixer/dryWetMixerConstantPower. Instead of consuming an FX that creates a dry and wet bus, these new functions consume N buses that already exist. The new functions are called:
mixLinearClamp
mixLinearLoop
mixPowerClamp
mixPowerLoop
These are relevant to wavetable blending. Suppose each wavetable has C channels and there are N wavetables. It's common practice to have a wavetable-position index that helps select any two wavetables and blend between them. An index of 0 selects the 0th wavetable. An index of 1.25 blends between the 1st and 2nd, by 0.75 and 0.25, and so on. This is how I can do it with mixLinearLoop:
N = 4;
C = 2;
// Make N buses of C channels. Each bus has higher pitch than the previous.
sounds = par(i, N*C, int(i/C)*7 + 48 : ba.midikey2hz : os.osc : _*.4);
loopingM = os.phasor(S,freq) : it.remap(0, S, 0, N)
with {
freq = hslider("Looping Freq", 0., 0., 1., .001);
S = 1<<15;
};
process = mixLinearLoop(N, C, loopingM, sounds);
What's cool here is that I can seamlessly loop back from the N-1 th wavetable to the 0th. That's why it's called mixLinear*Loop*. In contrast, mixLinearClamp clamps the index so that circular lookups aren't possible.
The other two mixPower* functions use constant-power weights, like dryWetMixerConstantPower already does.
I've added some functions similar to
dryWetMixer
/dryWetMixerConstantPower
. Instead of consuming anFX
that creates a dry and wet bus, these new functions consume N buses that already exist. The new functions are called:mixLinearClamp
mixLinearLoop
mixPowerClamp
mixPowerLoop
These are relevant to wavetable blending. Suppose each wavetable has C channels and there are N wavetables. It's common practice to have a wavetable-position index that helps select any two wavetables and blend between them. An index of 0 selects the 0th wavetable. An index of 1.25 blends between the 1st and 2nd, by 0.75 and 0.25, and so on. This is how I can do it with
mixLinearLoop
:What's cool here is that I can seamlessly loop back from the N-1 th wavetable to the 0th. That's why it's called
mixLinear*Loop*
. In contrast,mixLinearClamp
clamps the index so that circular lookups aren't possible.The other two mixPower* functions use constant-power weights, like dryWetMixerConstantPower already does.
To see this demo, copy this code into the Faust IDE: https://gist.github.com/DBraun/92c1ee2c0c6262c5585f163b5ca75718
I will keep this as a draft PR for a bit in case I missed something. Feedback is very welcome :)