final case class MelFilter(in: GE, size: GE, minFreq: GE = 55.0, maxFreq: GE = 18000.0, sampleRate: GE = 44100.0, bands: GE = 42) extends SingleOut with Product with Serializable
A UGen that maps short-time Fourier transformed spectra to the mel scale. To obtain
the MFCC, one has to take the log of the output of this UGen and decimate it with a DCT.
Example:
def mfcc(in: GE) = { val fsz = 1024 val lap = Sliding(in, fsz, fsz/2) * GenWindow(fsz, GenWindow.Hann) val fft = Real1FFT(lap, fsz, mode = 1) val mag = fft.complex.mag.max(-80) val mel = MelFilter(mag, fsz/2, bands = 42) DCT_II(mel.log, 42, 13, zero = 0) }
- in
magnitudes of spectra, as output by
Real1FFT(..., mode = 1).complex.abs- size
bands in input spectrum (assumed to be
fft-size / 2). lowest band corresponds to DC and highest to(size - 1)/size * sampleRate/2.- minFreq
lower frequency to sample. Will be clipped between zero (inclusive) and Nyquist (exclusive).
- maxFreq
upper frequency to sample. Will be clipped between
minFreq(inclusive) and Nyquist (exclusive).- bands
number of filter bands output
- Alphabetic
- By Inheritance
- MelFilter
- Serializable
- Serializable
- SingleOut
- SomeOut
- Lazy
- GE
- UGenSource
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
MelFilter(in: GE, size: GE, minFreq: GE = 55.0, maxFreq: GE = 18000.0, sampleRate: GE = 44100.0, bands: GE = 42)
- in
magnitudes of spectra, as output by
Real1FFT(..., mode = 1).complex.abs- size
bands in input spectrum (assumed to be
fft-size / 2). lowest band corresponds to DC and highest to(size - 1)/size * sampleRate/2.- minFreq
lower frequency to sample. Will be clipped between zero (inclusive) and Nyquist (exclusive).
- maxFreq
upper frequency to sample. Will be clipped between
minFreq(inclusive) and Nyquist (exclusive).- bands
number of filter bands output
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val bands: GE
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val in: GE
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
makeUGen(args: IndexedSeq[UGenIn])(implicit b: Builder): UGenInLike
- Attributes
- protected
- Definition Classes
- MelFilter → UGenSource
-
def
makeUGens(implicit b: Builder): UGenInLike
Abstract method which must be implemented by creating the actual
UGens during expansion. - val maxFreq: GE
- val minFreq: GE
-
final
def
name: String
- Definition Classes
- UGenSource
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val sampleRate: GE
- val size: GE
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )