1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
class:: PV_BinWipe
summary:: Combine low and high bins from two inputs.
categories:: UGens>FFT
Description::
Copies low bins from one input and the high bins of the other.
classmethods::
method::new
argument::bufferA
FFT buffer A.
argument::bufferB
FFT buffer B.
argument::wipe
Can range between -1 and +1.
If
code::wipe:: == 0, then the output is the same
as
code::bufferA:: .
If
code::wipe:: > 0, then it begins replacing
with bins from
code::bufferB:: from the bottom up.
If
code::wipe:: < 0, then it begins replacing
with bins from
code::bufferB:: from the top down.
Examples::
code::
s.boot;
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
(
SynthDef("help-binWipe", { arg out=0;
var inA, chainA, inB, chainB, chain;
inA = WhiteNoise.ar(0.2);
inB = LFSaw.ar(100, 0, 0.2);
chainA = FFT(LocalBuf(2048), inA);
chainB = FFT(LocalBuf(2048), inB);
chain = PV_BinWipe(chainA, chainB, MouseX.kr(-1, 1));
Out.ar(out, 0.1 * IFFT(chain).dup);
}).play(s);
)
(
SynthDef("help-binWipe2", { arg out=0, soundBufnum=2;
var inA, chainA, inB, chainB, chain;
inA = WhiteNoise.ar(0.2);
inB = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
chainA = FFT(LocalBuf(2048), inA);
chainB = FFT(LocalBuf(2048), inB);
chain = PV_BinWipe(chainA, chainB, MouseX.kr(-1, 1));
Out.ar(out, 0.1 * IFFT(chain).dup);
}).play(s, [\soundBufnum, b]);
)
::
|