Class/Object

de.sciss.synth.ugen

FFT

Related Docs: object FFT | package ugen

Permalink

final case class FFT(buf: GE, in: GE, hop: GE = 0.5f, winType: GE = 0, active: GE = 1, winSize: GE = 0) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

A UGen performing short-time forward fourier transformations. In order to properly link the spectral ugens ( PV_... ), you should begin by using the output of each UGen (which is just the fft buffer identifier), and use that as buffer input of the next UGen. That way, the UGen graph is correctly sorted. E.g. IFFT(PV_...(FFT(buf, in))) .

The UGen will initially output zero until the first FFT can be performed. This is the case after hop * fftSize . Thus for a default fft buffer size of 1024 and a hop of 0.5, and for a default control block size of 64, for the first 1024*0.5/64 = 8 control blocks the UGen will output zero. This also implies that the first FFT in this case if performed on the first 512 samples of the in signal (prepended by 512 zeros). In other words, the first 'full' FFT of the input happens after fftSize/controlBlockSize cycles, no matter what hop size was chosen.

If you use FFT for performing signal analysis and not phase vocoder effects, make sure you change the window type accordingly.

buf

The buffer to use for writing the FFT to. The size must be a power of two. Since FFT operates at control rate (also being a power of two), the buffer should probably be at least as long as the control block size. (init-time only)

in

The time domain signal to be transformed into the spectral domain.

hop

A factor determining the step size between successive FFTs. That is, FFTs are performed every fftSize * hop sample frames. The default of 0.5 means thus a 50% overlap, while a hope of 1.0 means no overlapping. Choosing 0.0 will most likely crash the server! (init-time only)

winType

The window function applied before each FFT is taken. The default of 0 is a sine window which is good for phase vocoder applications (using the PV_... UGens). For analysis applications, you may want to use -1 which is a rectangle window (effectively no windowing) or 1 which is a Hann window. A Hann window gives perfect overlap-add reconstruction for a hope size of 0.5 (or 0.25 etc.) (init-time only)

active

This parameter can be temporarily set to <= 0 to pause the FFT operation.

winSize

With the default value of zero, the window size equals the fft size. If you wish to perform zero padding, an explicit window size can be specified. (init-time only)

See also

FFTTrigger

IFFT

Linear Supertypes
Serializable, Serializable, IsIndividual, HasSideEffect, ControlRated, SingleOut, SomeOut, GE.Lazy, GE, UGenSource[UGenInLike], Expander[UGenInLike], Lazy, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FFT
  2. Serializable
  3. Serializable
  4. IsIndividual
  5. HasSideEffect
  6. ControlRated
  7. SingleOut
  8. SomeOut
  9. Lazy
  10. GE
  11. UGenSource
  12. Expander
  13. Lazy
  14. Product
  15. Equals
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FFT(buf: GE, in: GE, hop: GE = 0.5f, winType: GE = 0, active: GE = 1, winSize: GE = 0)

    Permalink

    buf

    The buffer to use for writing the FFT to. The size must be a power of two. Since FFT operates at control rate (also being a power of two), the buffer should probably be at least as long as the control block size. (init-time only)

    in

    The time domain signal to be transformed into the spectral domain.

    hop

    A factor determining the step size between successive FFTs. That is, FFTs are performed every fftSize * hop sample frames. The default of 0.5 means thus a 50% overlap, while a hope of 1.0 means no overlapping. Choosing 0.0 will most likely crash the server! (init-time only)

    winType

    The window function applied before each FFT is taken. The default of 0 is a sine window which is good for phase vocoder applications (using the PV_... UGens). For analysis applications, you may want to use -1 which is a rectangle window (effectively no windowing) or 1 which is a Hann window. A Hann window gives perfect overlap-add reconstruction for a hope size of 0.5 (or 0.25 etc.) (init-time only)

    active

    This parameter can be temporarily set to <= 0 to pause the FFT operation.

    winSize

    With the default value of zero, the window size equals the fft size. If you wish to perform zero padding, an explicit window size can be specified. (init-time only)

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val active: GE

    Permalink

    This parameter can be temporarily set to <= 0 to pause the FFT operation.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val buf: GE

    Permalink

    The buffer to use for writing the FFT to.

    The buffer to use for writing the FFT to. The size must be a power of two. Since FFT operates at control rate (also being a power of two), the buffer should probably be at least as long as the control block size. (init-time only)

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. val hop: GE

    Permalink

    A factor determining the step size between successive FFTs.

    A factor determining the step size between successive FFTs. That is, FFTs are performed every fftSize * hop sample frames. The default of 0.5 means thus a 50% overlap, while a hope of 1.0 means no overlapping. Choosing 0.0 will most likely crash the server! (init-time only)

  12. val in: GE

    Permalink

    The time domain signal to be transformed into the spectral domain.

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def makeUGens: UGenInLike

    Permalink

    Abstract method which must be implemented by creating the actual UGens during expansion.

    Abstract method which must be implemented by creating the actual UGens during expansion. This method is at most called once during graph expansion

    returns

    the expanded object (depending on the type parameter U)

    Attributes
    protected
    Definition Classes
    FFTExpander
  15. final def name: String

    Permalink
    Definition Classes
    UGenSource
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def rate: Rate

    Permalink
    Definition Classes
    ControlRated
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. val winSize: GE

    Permalink

    With the default value of zero, the window size equals the fft size.

    With the default value of zero, the window size equals the fft size. If you wish to perform zero padding, an explicit window size can be specified. (init-time only)

  25. val winType: GE

    Permalink

    The window function applied before each FFT is taken.

    The window function applied before each FFT is taken. The default of 0 is a sine window which is good for phase vocoder applications (using the PV_... UGens). For analysis applications, you may want to use -1 which is a rectangle window (effectively no windowing) or 1 which is a Hann window. A Hann window gives perfect overlap-add reconstruction for a hope size of 0.5 (or 0.25 etc.) (init-time only)

Inherited from Serializable

Inherited from Serializable

Inherited from IsIndividual

Inherited from HasSideEffect

Inherited from ControlRated

Inherited from SingleOut

Inherited from SomeOut

Inherited from GE.Lazy

Inherited from GE

Inherited from UGenSource[UGenInLike]

Inherited from Expander[UGenInLike]

Inherited from Lazy

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped