diff --git a/release-packaging/Classes/FluidSTFTPass.sc b/release-packaging/Classes/FluidSTFTPass.sc index e36fb44..dc7fd49 100644 --- a/release-packaging/Classes/FluidSTFTPass.sc +++ b/release-packaging/Classes/FluidSTFTPass.sc @@ -1,5 +1,5 @@ FluidSTFTPass : UGen { - *ar { arg in = 0, windowSize= 1024, hopSize= 256, fftSize= -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput(this),windowSize, hopSize, fftSize, maxFFTSize) + *ar { arg in = 0, winSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384; + ^this.multiNew('audio', in.asAudioRateInput(this), winSize, hopSize, fftSize, maxFFTSize) } } diff --git a/release-packaging/HelpSource/Classes/FluidGain.schelp b/release-packaging/HelpSource/Classes/FluidGain.schelp index b039a81..cb67f39 100644 --- a/release-packaging/HelpSource/Classes/FluidGain.schelp +++ b/release-packaging/HelpSource/Classes/FluidGain.schelp @@ -16,20 +16,17 @@ METHOD:: ar ARGUMENT:: in The input to be processed -ARGUMENT:: frameSize - The size of the real-time i/o buffer, in samples. It will add that much latency to the signal. This is not modulatable. - ARGUMENT:: gain Audio or control rate change of the gain. RETURNS:: - Same as input, delayed by the frameSize, multiplied by the gain factor. + Same as input, multiplied by the gain factor. EXAMPLES:: Summing with the inverse (gain of -1) with a delay of the latency gives us CPU-expensive silence. CODE:: -{ var source = PinkNoise.ar(0.1); DelayN.ar(source,delaytime:1000/s.sampleRate) + FluidGain.ar(source,1000,-1); }.play +{ var source = PinkNoise.ar(0.1); source + FluidGain.ar(source,-1); }.play :: Varying the gain at audio rate. CODE:: diff --git a/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp b/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp index 1bc8260..9ccf7bf 100644 --- a/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp +++ b/release-packaging/HelpSource/Classes/FluidSTFTPass.schelp @@ -17,13 +17,17 @@ ARGUMENT:: in The input to be passed-through ARGUMENT:: winSize - The size of the buffered window to be analysed, in samples. It will add that much latency to the signal. This is not modulatable. + The size of the buffered window to be analysed, in samples. It will add that much latency to the signal. ARGUMENT:: hopSize - How much the buffered window moves forward, in samples. This is not modulatable. + How much the buffered window moves forward, in samples. The -1 default value will default to half of winSize (overlap of 2). ARGUMENT:: fftSize - How large will the FFT be, zero-padding the buffer to the right size, which should be bigger than the windowSize argument, bigger than 4 samples, and should be a power of 2. This is a way to oversample the FFT for extra precision. The -1 default value will default to windowSize. This is not modulatable. + How large will the FFT be, zero-padding the buffer to the right size, which should be bigger than the windowSize argument, bigger than 4 samples, and should be a power of 2. This is a way to oversample the FFT for extra precision. The -1 default value will default to windowSize. + +ARGUMENT:: maxFFTSize + How large can the FFT be, by allocating memory at instantiation time. This is not modulatable. + RETURNS:: Same as input, delayed by the winSize. @@ -33,7 +37,7 @@ EXAMPLES:: Summing with the inverse (gain of -1) with a delay of the latency gives us CPU-expensive silence. CODE:: -{ var source = PinkNoise.ar(0.1); DelayN.ar(source, delaytime:1024/s.sampleRate, mul: -1) + FluidSTFTPass.ar(source, 1024, 256, 1024); }.play +{ var source = PinkNoise.ar(0.1); DelayN.ar(source, delaytime:1024/s.sampleRate, mul: -1) + FluidSTFTPass.ar(source, 1024); }.play :: Larger, oversampled, FFT CODE:: @@ -47,3 +51,11 @@ Stereo Parameter Tests. CODE:: { FluidSTFTPass.ar(SinOsc.ar(222,mul: 0.1), [1024,8192],256,8192)}.play :: +Modulating Window Param Tests. +CODE:: +{ var source = SinOsc.ar(222,mul: 0.1); [source, FluidSTFTPass.ar(source,LFNoise0.kr(1).range(10,10000))] }.play +:: +Very Short FFT test. +CODE:: +{ var source = SinOsc.ar(222,mul: 0.1); [source, FluidSTFTPass.ar(source,10)] }.play +::