Packages

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 is 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

IFFT

FFTTrigger

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

Instance Constructors

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

    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
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val active: GE
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val buf: GE
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. lazy val hashCode: Int
    Definition Classes
    UGenSource → AnyRef → Any
  11. val hop: GE
  12. val in: GE
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def makeUGen(_args: Vec[UGenIn]): UGenInLike
    Attributes
    protected
    Definition Classes
    FFTUGenSource
  15. def makeUGens: UGenInLike

    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
  16. final def name: String
    Definition Classes
    UGenSource
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def productElementNames: Iterator[String]
    Definition Classes
    Product
  21. final def rate: Rate
    Definition Classes
    ControlRated
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. val winSize: GE
  27. val winType: GE

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

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