Euterpea-1.0.0: Library for computer music research and education

Safe HaskellNone

Euterpea.Experimental

Synopsis

Documentation

asyncUISFV :: NFData b => Double -> Double -> Automaton (->) a b -> UISF a [(b, Time)]

asyncUISFE :: NFData b => Automaton (->) a b -> UISF (SEvent a) (SEvent b)

clockedSFToUISF :: forall a b c. (NFData b, Clock c) => Double -> SigFun c a b -> UISF a [(b, Time)]Source

runMidi :: NFData b => SF (b, SEvent [MidiMessage]) (c, SEvent [MidiMessage]) -> UISF (b, (Maybe InputDeviceID, Maybe OutputDeviceID)) [c]Source

newtype Automaton a b c

Constructors

Automaton (a b (c, Automaton a b c)) 

Instances

Arrow a => ArrowTransformer Automaton a 
ArrowWriter w a => ArrowWriter w (Automaton a) 
ArrowState s a => ArrowState s (Automaton a) 
ArrowReader r a => ArrowReader r (Automaton a) 
ArrowError r a => ArrowError r (Automaton a) 
ArrowAddWriter w a a' => ArrowAddWriter w (Automaton a) (Automaton a') 
ArrowAddState r a a' => ArrowAddState r (Automaton a) (Automaton a') 
ArrowAddReader r a a' => ArrowAddReader r (Automaton a) (Automaton a') 
Arrow a => Category (Automaton a) 
ArrowZero a => ArrowZero (Automaton a) 
ArrowPlus a => ArrowPlus (Automaton a) 
ArrowLoop a => ArrowLoop (Automaton a) 
ArrowChoice a => ArrowChoice (Automaton a) 
Arrow a => Arrow (Automaton a) 
ArrowLoop a => ArrowCircuit (Automaton a) 
(ArrowLoop a, ArrowApply a) => ArrowAddStream (Automaton a) a 
Arrow a => Functor (Automaton a b) 
Arrow a => Applicative (Automaton a b) 
ArrowPlus a => Alternative (Automaton a b) 
ArrowPlus a => Monoid (Automaton a b c) 

toAutomaton :: forall a b. SF a b -> Automaton (->) a bSource

quantize :: ArrowInit a => Int -> Int -> a b (SEvent [b])Source

Alternative for working with Math.FFT instead of Numeric.FFT import qualified Math.FFT as FFT import Data.Array.IArray import Data.Array.CArray myFFT n lst = elems $ (FFT.dft) (listArray (0, n-1) lst)

Returns n samples of type b from the input stream at a time, updating after k samples. This function is good for chunking data and is a critical component to fftA

presentFFT :: Double -> [Double] -> Map Double DoubleSource

Converts the vector result of a dft into a map from frequency to magnitude. One common use is: fftA >>> arr (fmap $ presentFFT clockRate)

fftA :: ArrowInit a => Int -> Int -> a Double (SEvent [Double])Source

Given a quantization frequency (the number of samples between each successive FFT calculation) and a fundamental period, this will decompose the input signal into its constituent frequencies. NOTE: The fundamental period must be a power of two!

liftAIO :: ArrowIO a => forall b c. (b -> IO c) -> a b c

initialAIO :: ArrowIO a => forall d b c. IO d -> (d -> a b c) -> a b c

uisfSource :: IO b -> UISF () b

uisfSink :: (a -> IO ()) -> UISF a ()

uisfPipe :: (a -> IO b) -> UISF a b

uisfSourceE :: IO b -> UISF (SEvent ()) (SEvent b)

uisfSinkE :: (a -> IO ()) -> UISF (SEvent a) (SEvent ())

uisfPipeE :: (a -> IO b) -> UISF (SEvent a) (SEvent b)