RNBO Objects & Operators fftstream~
Open Help

fftstream~

Fast Fourier Transform

Description

fft~ performs a Fast Fourier transform on any incoming signal and outputs the real and imaginary parts of that transform as well as a synchronization signal.

Arguments

fftsize [enum]

Optional

The first argument specifies the number of points (samples) in the FFT. It must be a power of two. The default number of points is 512.

framesize [int]

Optional

The second argument specifies the number of samples between successive FFTs. This must be at least the number of points, and must also be a power of two. The default interval is 512.

phase [int]

Optional

The third argument specifies the offset into the interval where the FFT will start. This must either be 0 or a multiple of the signal vector size. fft~ will correct bad arguments, but if you change the signal vector size after creating an fft~ and the offset is no longer a multiple of the vector size, the fft~ will not operate when signal processing is turned on.

Inlets

realIn [auto]

The real part of a complex signal that will be transformed. If signals are connected only to the left inlet and left outlet, a real FFT will be performed. Otherwise, a complex FFT will be performed.

imagIn [auto]

The imaginary part of a complex signal that will be transformed. If signals are connected only to the left inlet and left outlet, a real FFT will be performed. Otherwise, a complex FFT will be performed.

Outlets

out1 [signal]

The real part of the Fourier transform of the input. The output begins after all the points of the input have been received.

out2 [signal]

The imaginary part of the Fourier transform of the input. The output begins after all the points of the input have been received.

out3 [signal]

A sync signal that ramps from 0 to the number of points minus 1 over the period in which the FFT output occurs. You can use this signal as an input to the index~ object to perform calculations in the frequency domain. When the FFT is not being sent out (in the case where the interval is larger than the number of points), the sync signal is 0.

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

fftsize [enum] (default: 512)

The first argument specifies the number of points (samples) in the FFT. It must be a power of two. The default number of points is 512.

Possible values:

0 = '64'
1 = '128'
2 = '256'
3 = '512'
4 = '1024'
5 = '2048'
6 = '4096'

framesize [int] (default: 512)

The second argument specifies the number of samples between successive FFTs. This must be at least the number of points, and must also be a power of two. The default interval is 512.

phase [int] (default: 0)

The third argument specifies the offset into the interval where the FFT will start. This must either be 0 or a multiple of the signal vector size. fft~ will correct bad arguments, but if you change the signal vector size after creating an fft~ and the offset is no longer a multiple of the vector size, the fft~ will not operate when signal processing is turned on.

win_bufname [symbol] (default: RNBODefaultFftWindow)

A buffer~ object can be used as an alternative lookup table for the FFT window if a custom windowing function is necessary.

window [enum] (default: rectangular)

Specify which windowing function for the FFT to use (none, the "rectangular" window, is the default).

Possible values:

0 = 'rectangular'
1 = 'hann'
2 = 'hamming'
3 = 'blackman'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

imagIn [auto]

The imaginary part of a complex signal that will be transformed. If signals are connected only to the left inlet and left outlet, a real FFT will be performed. Otherwise, a complex FFT will be performed.

realIn [auto]

The real part of a complex signal that will be transformed. If signals are connected only to the left inlet and left outlet, a real FFT will be performed. Otherwise, a complex FFT will be performed.

reset [bang] (default: 0)

Banging this attribute will reset the object to its default state.

win_buf [number] (default: 0)

If multiple buffer names are declared to be used, this sets the currently active buffer using an index [0 based].

See Also

Name Description
ifftstream~ Inverse Fast Fourier Transform
cartopol Convert Cartesian values to polar format. Angles are in radians.
cartopol~ Convert Cartesian values to polar format. Angles are in radians.
poltocar~ Convert polar to cartesian coordinates
poltocar Convert polar to cartesian coordinates
buffer~ A data buffer for holding audio (or potentially some other) data.
fft~
pfft~