vocoder-conduit-0.1.0.0: Phase vocoder for Conduit
Copyright(c) Marek Materzok 2021
LicenseBSD2
Safe HaskellNone
LanguageHaskell2010

Vocoder.Conduit.Filter

Description

This module defines some useful frequency-domain filters as conduits. It includes convenience wrappers for filters defined in the vocoder package.

Synopsis

Documentation

data Filter m Source #

Conduit frequency-domain filter type. A conduit filter extends basic frequency-domain filters by using a conduit instead of a pure function. This enables time transformation filters.

runFilter :: Filter m -> forall f. Traversable f => FreqStep -> ConduitT (f STFTFrame) (f STFTFrame) m () Source #

idFilter :: Monad m => Filter m Source #

Identity filter

composeFilters :: Monad m => Filter m -> Filter m -> Filter m Source #

Sequential filter composition.

realtimeFilter :: Monad m => Filter m -> Filter m Source #

Use a basic frequency-domain filter as a conduit filter.

amplitudeFilter :: Monad m => (FreqStep -> Moduli -> Moduli) -> Filter m Source #

Creates a conduit filter which transforms only amplitudes, leaving phase increments unchanged.

linearAmplitudeFilter :: Monad m => (Double -> Double) -> Filter m Source #

Creates a filter which scales amplitudes depending on frequency.

amplify :: Monad m => Double -> Filter m Source #

Creates an "amplifier" which scales all frequencies.

lowpassBrickwall :: Monad m => Double -> Filter m Source #

Creates a brickwall lowpass filter.

highpassBrickwall :: Monad m => Double -> Filter m Source #

Creates a brickwall highpass filter.

bandpassBrickwall :: Monad m => Double -> Double -> Filter m Source #

Creates a brickwall bandpass filter.

bandstopBrickwall :: Monad m => Double -> Double -> Filter m Source #

Creates a brickwall bandstop filter.

lowpassButterworth :: Monad m => Double -> Double -> Filter m Source #

Creates an n-th degree Butterworth-style lowpass filter.

highpassButterworth :: Monad m => Double -> Double -> Filter m Source #

Creates an n-th degree Butterworth-style highpass filter.

bandpassButterworth :: Monad m => Double -> Double -> Double -> Filter m Source #

Creates an n-th degree Butterworth-style bandpass filter.

bandstopButterworth :: Monad m => Double -> Double -> Double -> Filter m Source #

Creates an n-th degree Butterworth-style bandstop filter.

pitchShiftInterpolate :: Monad m => Double -> Filter m Source #

Creates an interpolative pitch-shifting filter.

convolutionFilter :: Monad m => Vector Double -> Filter m Source #

Creates a filter which convolves the spectrum using a kernel.

envelopeFilter :: Monad m => Length -> Filter m Source #

Creates a filter which replaces the amplitudes with their envelope.

randomPhaseFilter :: MonadIO m => Filter m Source #

Sets the phase increments so that the bins have horizontal consistency. This erases the phase information, introducing "phasiness".

playSpeed :: Monad m => Rational -> Filter m Source #

Changes play speed by replicating or dropping frames.