[Sc-devel] fft and cos_table

LFSaw lfsaw at lfsaw.de
Fri Apr 18 10:15:12 PDT 2008


if no-one objects I will commit these on monday (no internet during  
weekends for me... :-)
Or perhaps someone else wants to? :-)


Till


On 18.04.2008, at 16:28, ronald kuivila wrote:
> I love convenience....
> Looks good to me.
>
> RJK
>
> On Apr 18, 2008, at 8:26 AM, Till Bovermann wrote:
>
>> what about this change?
>> this way you are note forced to do the book-keeping of the cosTable
>> when just computing one fft / ifft...
>>
>> 2c
>> Till
>>
>> + Signal {	
>> 	fft { arg imag, cosTable;
>> 		imag = imag ? Signal.newClear(this.size);
>> 		cosTable = cosTable ? Signal.fftCosTable(this.size);
>> 		
>> 		// argCosTable must contain 1/4 cycle of a cosine (use fftCosTable)
>> 		// fftsize is the next greater power of two than the receiver's
>> length
>> 		^this.pr_fft(imag, cosTable);
>> 	}
>> 	pr_fft { arg imag, cosTable;
>> 		// argCosTable must contain 1/4 cycle of a cosine (use fftCosTable)
>> 		// fftsize is the next greater power of two than the receiver's
>> length
>> 		_Signal_FFT
>> 		^this.primitiveFailed
>> 	}
>> 	
>> 	ifft { arg imag, cosTable;
>> 		imag = imag ? Signal.newClear(this.size);
>> 		cosTable = cosTable ? Signal.fftCosTable(this.size);
>> 		
>> 		// argCosTable must contain 1/4 cycle of a cosine (use fftCosTable)
>> 		// fftsize is the next greater power of two than the receiver's
>> length
>> 		^this.pr_ifft(imag, cosTable);
>> 	}
>> 	pr_ifft { arg imag, cosTable;
>> 		// argCosTable must contain 1/4 cycle of a cosine (use fftCosTable)
>> 		// fftsize is the next greater power of two than the receiver's
>> length
>> 		_Signal_IFFT
>> 		^this.primitiveFailed
>> 	}
>>
>> }
>> _______________________________________________
>> Sc-devel mailing list
>> Sc-devel at create.ucsb.edu
>> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>>
>
> _______________________________________________
> Sc-devel mailing list
> Sc-devel at create.ucsb.edu
> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel



More information about the Sc-devel mailing list