I have done a lengthy refactor of the library and added UnitUSR and Disperser.
You can grab the latest release here:
The UnitUSR (Universal Shift Register) replaces the former ShiftRegister Ugen.
Now the shift register is clocked by a ramp signal as the input instead of a trigger and you have additional interpolation available. The Universal Shift Register could also be transformed into a Rungler by feeding back into itself, will experiment more with that and maybe release UnitRungler then.
(
{
var phase, register;
RandSeed.kr(\seedtrg.kr(1), \seed.kr(500));
phase = Phasor.ar(DC.ar(0), 1000 * SampleDur.ir);
register = UnitUSR.ar(
phase: phase,
chance: 0.5,
length: 8,
rotate: 1,
interp: 0
);
[
register[\bit3],
register[\bit8]
];
}.plot(0.02);
)
(
{
var phase, register;
RandSeed.kr(\seedtrg.kr(1), \seed.kr(500));
phase = Phasor.ar(DC.ar(0), 1000 * SampleDur.ir);
register = UnitUSR.ar(
phase: phase,
chance: 0.5,
length: 8,
rotate: 1,
interp: 1
);
[
register[\bit3],
register[\bit8]
];
}.plot(0.02);
)
The Disperser Ugen is based on an Allpass Cascade of 2nd order biquad allpass filters with control over filter q to change the steepness of the phase response and carefully calculated coefficients (often times phaser plugins are based on 1st order allpass filters where this option is not available, if you setup your cascade with Allpass2 from SC Plugins modulating the resonance will blow up the filter because of the coefficient calculation, not the case here!).
For some configurations it is similiar to a phaser with feedback for others its more similiar to the kilohertz disperser plugin which decorates your input with a chirp by a frequency dependent delay (spectral delay filter). Currently only possible to use control rate to modulate the params, will change that soon.
(
{
var sig = Saw.ar(32.midicps * (2 ** TIRand.ar(-1, 1, Dust.ar(2))));
Disperser.ar(
input: sig,
freq: 500,
resonance: SinOsc.kr(0.3).linlin(-1, 1, 0, 1),
mix: 1.0,
feedback: 0.85,
)!2 * 0.1
}.play;
)