FFT : MultiOutUGen {
 var fftsize, fftoffset=0, inputWindow, outputWindow, cosTable;
 
 *ar { arg fftsize, fftoffset, cosTable, inputWindow, outputWindow,
    real, imag = 0.0; 
  ^this.multiChannelPerform('ar1', fftsize, fftoffset,
    cosTable, inputWindow, outputWindow, real, imag)
 }
 *ar1 { arg fftsize, fftoffset, cosTable, inputWindow, outputWindow,
    real, imag = 0.0; 
  ^super.ar1.init(fftsize, fftoffset, cosTable, inputWindow, outputWindow,
       real, imag)
 }
 *sr { arg cosTable, inputWindow, outputWindow,
    real, imag = 0.0; 
  ^this.multiChannelPerform('sr1', cosTable, inputWindow, outputWindow,
       real, imag)
 }
 *sr1 { arg cosTable, inputWindow, outputWindow,
    real, imag = 0.0; 
  ^super.sr1.srInit(cosTable, inputWindow, outputWindow,
       real, imag)
 }
 
 *a2sr { arg fftsize, fftoffset, cosTable, inputWindow, outputWindow,
    real, imag = 0.0;
  var in;
  in = A2S.sr(fftsize, fftoffset, real, imag);
  ^this.sr(cosTable, inputWindow, outputWindow, in.real, in.imag)
 }
 
 *s2ar { arg cosTable, inputWindow, outputWindow,
    real, imag = 0.0;
  var out;
  out = this.sr(cosTable, inputWindow, outputWindow, real, imag)
  ^S2A.ar(out.real, out.imag);
 }
 
 // PRIVATE
 init { arg argFFTsize, argFFToffset, argCosTable,
    argInputWindow, argOutputWindow ... theInputs;
  fftsize = argFFTsize;
  fftoffset = argFFToffset;
  cosTable = argCosTable;
  inputWindow = argInputWindow;
  outputWindow = argOutputWindow;
  inputs = theInputs;
  channels = Complex.new( OutputProxy.ar1(this), OutputProxy.ar1(this) );
  ^channels
 }
 srInit { arg argCosTable, argInputWindow, argOutputWindow ... theInputs;
  cosTable = argCosTable;
  inputWindow = argInputWindow;
  outputWindow = argOutputWindow;
  inputs = theInputs;
  channels = Complex.new( OutputProxy.sr1(this), OutputProxy.sr1(this) );
  ^channels
 }
}


IFFT : FFT {
 // inherits everything from FFT
}

A2S : MultiOutUGen {
 var fftsize, fftoffset=0;
 *sr { arg fftsize, fftoffset, real, imag = 0.0; 
  ^this.multiChannelPerform('sr1', fftsize, fftoffset, real, imag)
 }
 *sr1 { arg fftsize, fftoffset, real, imag = 0.0; 
  ^super.sr1.init(fftsize, fftoffset, imag, real, imag)
 }
 init { arg argFFTsize, argFFToffset, imag ... theInputs;
  fftsize = argFFTsize;
  fftoffset = argFFToffset;
  inputs = theInputs;
  if (imag == 0.0, {
   channels = Complex.new( OutputProxy.sr1(this), 0.0 );
  },{
   channels = Complex.new( OutputProxy.sr1(this), OutputProxy.ar1(this) );
  });
  ^channels
 }
}

S2A : MultiOutUGen {
 *ar { arg real, imag = 0.0; 
  ^this.multiChannelPerform('ar1', real, imag)
 }
 *ar1 { arg real, imag = 0.0; 
  ^super.ar1.init(imag, real, imag)
 }
 init { arg imag ... theInputs;
  inputs = theInputs;
  if (imag == 0.0, {
   channels = Complex.new( OutputProxy.ar1(this), 0.0 );
  },{
   channels = Complex.new( OutputProxy.ar1(this), OutputProxy.ar1(this) );
  });
  ^channels
 }
}

SROsc : MultiOutUGen {
 var fftoffset=0, real, imag;
 *sr { arg fftoffset, realBuf, imaginaryBuf = 0.0; 
  ^this.multiChannelPerform('sr1', fftoffset, realBuf, imaginaryBuf)
 }
 *sr1 { arg fftoffset, realBuf, imaginaryBuf = 0.0; 
  ^super.sr1.init(fftoffset, realBuf, imaginaryBuf)
 }
 init { arg argFFToffset, realBuf, imaginaryBuf;
  fftoffset = argFFToffset;
  real = realBuf;
  imag = imaginaryBuf;
  if (imag == 0.0, {
   channels = Complex.new( OutputProxy.ar1(this), 0.0 );
  },{
   channels = Complex.new( OutputProxy.ar1(this), OutputProxy.ar1(this) );
  });
  ^channels
 }
}

BinShift : MultiOutUGen {
 *sr { arg real, imag = 0.0, shift = 0.0, stretch = 1.0;
  ^this.multiChannelPerform('sr1', real, imag, shift, stretch)
 }
 *sr1 { arg real, imag = 0.0, shift = 0.0, stretch = 1.0;
  ^super.sr1.init(imag, real, imag, shift, stretch)
 }
 init { arg imag ... theInputs;
  inputs = theInputs;
  if (imag == 0.0, {
   channels = Complex.new( OutputProxy.ar1(this), 0.0 );
  },{
   channels = Complex.new( OutputProxy.ar1(this), OutputProxy.ar1(this) );
  });
  ^channels
 }
}



This page was created by SimpleText2Html 1.0.3 on 22-Feb-100.