de.sciss.synth.ugen

FFT

final case class FFT(buf: GE, in: GE, hop: GE = synth.this.GE.const(0.5), winType: GE = synth.this.GE.const(0), active: GE = synth.this.GE.const(1), winSize: GE = synth.this.GE.const(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 vocoding 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.

in

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

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.)

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.

See also

de.sciss.synth.ugen.FFTTrigger

de.sciss.synth.ugen.IFFT

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

Instance Constructors

  1. new FFT(buf: GE, in: GE, hop: GE = synth.this.GE.const(0.5), winType: GE = synth.this.GE.const(0), active: GE = synth.this.GE.const(1), winSize: GE = synth.this.GE.const(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.

    in

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

    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.)

    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.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val active: GE

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

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val buf: GE

    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.

  9. def clone(): AnyRef

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

    Definition Classes
    AnyRef
  11. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  13. val hop: GE

  14. val in: GE

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

  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def makeUGen(_args: IndexedSeq[UGenIn]): UGenInLike

    Attributes
    protected
    Definition Classes
    FFT → UGenSource
  17. def makeUGens: UGenInLike

    Attributes
    protected
    Definition Classes
    FFT → Expander
  18. final def name: String

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

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. final def rate: Rate

    Definition Classes
    ControlRated
  23. final def rewrap(args: IndexedSeq[UGenInLike], exp: Int): UGenInLike

    Attributes
    protected
    Definition Classes
    SomeOut → UGenSource
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. final def unwrap(args: IndexedSeq[UGenInLike]): UGenInLike

    Attributes
    protected
    Definition Classes
    UGenSource
  26. final def wait(): Unit

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

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

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

    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.

  30. val winType: GE

    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.)

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 Product

Inherited from Equals

Inherited from Expander[UGenInLike]

Inherited from Lazy

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped