Safe Haskell | None |
---|---|
Language | Haskell98 |
- module Euterpea.IO.MUI.InstrumentWidgets
- asyncUISFV :: (NFData c, ArrowReader DeltaT a, ArrowCircuit a, ArrowIO a) => Double -> DeltaT -> PureAuto b c -> a b [(c, Time)]
- asyncUISFE :: (NFData c, ArrowCircuit a, ArrowIO a, ArrowChoice a) => PureAuto b c -> a (SEvent b) (SEvent c)
- clockedSFToUISF :: forall a b c. (NFData b, Clock c) => DeltaT -> SigFun c a b -> UISF a [(b, Time)]
- runMidi :: (NFData b, NFData c) => SF (b, SEvent [MidiMessage]) (c, SEvent [MidiMessage]) -> UISF (b, (Maybe InputDeviceID, Maybe OutputDeviceID)) [c]
- runMidiM :: (NFData b, NFData c) => SF (b, ([(InputDeviceID, SEvent [MidiMessage])], [OutputDeviceID])) (c, [(OutputDeviceID, SEvent [MidiMessage])]) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [c]
- runMidiMFlood :: (NFData b, NFData c) => SF (b, SEvent [MidiMessage]) (c, SEvent [MidiMessage]) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [c]
- runMidiMB :: (NFData b, NFData c) => SF (b, ([(InputDeviceID, SEvent [MidiMessage])], [OutputDeviceID])) (c, [(OutputDeviceID, BufferOperation MidiMessage)]) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [(c, Bool)]
- runMidiMBFlood :: (NFData b, NFData c) => SF (b, SEvent [MidiMessage]) (c, BufferOperation MidiMessage) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [(c, Bool)]
- newtype Automaton a b c :: (* -> * -> *) -> * -> * -> * = Automaton (a b (c, Automaton a b c))
- toAutomaton :: forall a b. SF a b -> Automaton (->) a b
- quantize :: ArrowCircuit a => Int -> Int -> a b (SEvent [b])
- presentFFT :: Double -> [Double] -> Map Double Double
- fftA :: ArrowCircuit a => Int -> Int -> a Double (SEvent [Double])
- 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)
Documentation
asyncUISFV :: (NFData c, ArrowReader DeltaT a, ArrowCircuit a, ArrowIO a) => Double -> DeltaT -> PureAuto b c -> a b [(c, Time)] Source
asyncUISFE :: (NFData c, ArrowCircuit a, ArrowIO a, ArrowChoice a) => PureAuto b c -> a (SEvent b) (SEvent c) Source
clockedSFToUISF :: forall a b c. (NFData b, Clock c) => DeltaT -> SigFun c a b -> UISF a [(b, Time)] Source
runMidi :: (NFData b, NFData c) => SF (b, SEvent [MidiMessage]) (c, SEvent [MidiMessage]) -> UISF (b, (Maybe InputDeviceID, Maybe OutputDeviceID)) [c] Source
runMidiM :: (NFData b, NFData c) => SF (b, ([(InputDeviceID, SEvent [MidiMessage])], [OutputDeviceID])) (c, [(OutputDeviceID, SEvent [MidiMessage])]) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [c] Source
runMidiMFlood :: (NFData b, NFData c) => SF (b, SEvent [MidiMessage]) (c, SEvent [MidiMessage]) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [c] Source
runMidiMB :: (NFData b, NFData c) => SF (b, ([(InputDeviceID, SEvent [MidiMessage])], [OutputDeviceID])) (c, [(OutputDeviceID, BufferOperation MidiMessage)]) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [(c, Bool)] Source
runMidiMBFlood :: (NFData b, NFData c) => SF (b, SEvent [MidiMessage]) (c, BufferOperation MidiMessage) -> UISF (b, ([InputDeviceID], [OutputDeviceID])) [(c, Bool)] Source
newtype Automaton a b c :: (* -> * -> *) -> * -> * -> *
An arrow type comprising Mealy-style automata, each step of which is is a computation in the original arrow type.
Arrow a => ArrowTransformer Automaton a | |
ArrowReader r a => ArrowReader r (Automaton a) | |
ArrowState s a => ArrowState s (Automaton a) | |
ArrowWriter w a => ArrowWriter w (Automaton a) | |
ArrowError r a => ArrowError r (Automaton a) | |
Arrow a => Category * (Automaton a) | |
ArrowAddState r a a' => ArrowAddState r (Automaton a) (Automaton a') | |
ArrowAddReader r a a' => ArrowAddReader r (Automaton a) (Automaton a') | |
ArrowAddWriter w a a' => ArrowAddWriter w (Automaton a) (Automaton a') | |
ArrowLoop a => ArrowLoop (Automaton a) | |
ArrowPlus a => ArrowPlus (Automaton a) | |
ArrowZero a => ArrowZero (Automaton a) | |
Arrow a => Arrow (Automaton a) | |
ArrowChoice a => ArrowChoice (Automaton a) | |
ArrowLoop a => ArrowCircuit (Automaton a) | |
(ArrowLoop a, ArrowApply a) => ArrowAddStream (Automaton a) a | |
ArrowPlus a => Alternative (Automaton a b) | |
Arrow a => Functor (Automaton a b) | |
Arrow a => Applicative (Automaton a b) | |
ArrowPlus a => Monoid (Automaton a b c) |
toAutomaton :: forall a b. SF a b -> Automaton (->) a b Source
quantize :: ArrowCircuit 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 Double Source
Converts the vector result of a dft into a map from frequency to magnitude. One common use is: fftA >>> arr (fmap $ presentFFT clockRate)
fftA :: ArrowCircuit 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
The liftAIO function lifts an IO action into an arrow.
initialAIO :: ArrowIO a => forall d b c. IO d -> (d -> a b c) -> a b c
The initialAIO function performs an IO action once when the arrow is first initialized and then uses the result of that action to generate the arrow itself.
uisfSource :: IO b -> UISF () b
Lift an IO source to UISF.
uisfSourceE :: IO b -> UISF (SEvent ()) (SEvent b)
Lift an IO source to an event-based UISF.