SignalProc

class SignalProc(fft: FFT = KotlinFFT())

Constructors

Link copied to clipboard
fun SignalProc(fft: FFT = KotlinFFT())

Functions

Link copied to clipboard
fun deframesig(    frames: Array<FloatArray>,     sigLen: Int,     frameLen: Int,     frameStep: Int,     winFunc: (Int) -> IntArray = { Array(it){ 1 }.toIntArray() }): FloatArray

Does overlap-add procedure to undo the action of framesig.

Link copied to clipboard
fun framesig(    signal: FloatArray,     frameLen: Int,     frameStep: Int,     winFunc: FloatArray? = null,     strideTrick: Boolean = true): Array<FloatArray>

Frame a signal into overlapping frames.

Link copied to clipboard
fun logpowspec(    frames: Array<FloatArray>,     nfft: Int,     norm: Boolean = true): Array<FloatArray>

Compute the log power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).

Link copied to clipboard
fun magspec(frames: Array<FloatArray>, nfft: Int): Array<FloatArray>

Compute the magnitude spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).

Link copied to clipboard
fun powspec(frames: Array<FloatArray>, nfft: Int): Array<FloatArray>

Compute the power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).

Link copied to clipboard
fun preemphasis(signal: FloatArray, coeff: Float = 0.95f): FloatArray

Perform preemphasis on the input signal.