synthesizer-llvm-0.2.0.1: Efficient signal processing using runtime compilation

Synthesizer.LLVM.Simple.Signal

Synopsis

Documentation

data T a Source

Constructors

forall state packed size ioContext . (Memory state packed, IsSized packed size) => Cons (forall r c. Phi c => ioContext -> state -> T r c (a, state)) (forall r. ioContext -> CodeGenFunction r state) (IO ioContext) (ioContext -> IO ()) 

simple :: (Memory state packed, IsSized packed size) => (forall r c. state -> T r c (a, state)) -> (forall r. CodeGenFunction r state) -> T aSource

map :: (forall r. a -> CodeGenFunction r b) -> T a -> T bSource

mapAccum :: (Memory s struct, IsSized struct sa) => (forall r. a -> s -> CodeGenFunction r (b, s)) -> (forall r. CodeGenFunction r s) -> T a -> T bSource

zipWith :: (forall r. a -> b -> CodeGenFunction r c) -> T a -> T b -> T cSource

zip :: T a -> T b -> T (a, b)Source

interpolateConstant :: (Memory a struct, IsSized struct size, C b, IsFloating b, CmpRet b Bool, IsConst b, IsFirstClass b, IsSized b sb) => b -> T a -> T aSource

Stretch signal in time by a certain factor.

mix :: IsArithmetic a => T (Value a) -> T (Value a) -> T (Value a)Source

mixStereo :: IsArithmetic a => T (T (Value a)) -> T (T (Value a)) -> T (T (Value a))Source

envelope :: IsArithmetic a => T (Value a) -> T (Value a) -> T (Value a)Source

envelopeStereo :: IsArithmetic a => T (Value a) -> T (T (Value a)) -> T (T (Value a))Source

amplify :: (IsArithmetic a, IsConst a) => a -> T (Value a) -> T (Value a)Source

amplifyStereo :: (IsArithmetic a, IsConst a) => a -> T (T (Value a)) -> T (T (Value a))Source

iterate :: (IsFirstClass a, IsSized a s, IsConst a) => (forall r. Value a -> CodeGenFunction r (Value a)) -> Value a -> T (Value a)Source

exponential2 :: (C a, IsFirstClass a, IsSized a s, IsArithmetic a, IsConst a) => a -> a -> T (Value a)Source

osciPlain :: (IsFirstClass t, IsSized t size, Fraction t, IsConst t) => (forall r. Value t -> CodeGenFunction r y) -> Value t -> Value t -> T ySource

osci :: (IsFirstClass t, IsSized t size, Fraction t, IsConst t) => (forall r. Value t -> CodeGenFunction r y) -> t -> t -> T ySource

osciSaw :: (C a0, IsConst a0, Replicate a0 a, IsFirstClass a, IsSized a size, Fraction a, IsConst a) => a -> a -> T (Value a)Source

fromStorableVector :: (Storable a, MakeValueTuple a value, Memory value struct) => Vector a -> T valueSource

fromStorableVectorLazy :: (Storable a, MakeValueTuple a value, Memory value struct) => Vector a -> T valueSource

render :: (Storable a, MakeValueTuple a value, Memory value struct) => Int -> T value -> Vector aSource

derefChunkPtr :: Importer (Ptr stateStruct -> Word32 -> Ptr struct -> IO Word32)Source

compileChunky :: (Memory value struct, Memory state stateStruct, IsSized stateStruct stateSize) => (forall r. state -> T r (Value Bool, state) (value, state)) -> (forall r. CodeGenFunction r state) -> IO (FunPtr (IO (Ptr stateStruct)), FunPtr (Ptr stateStruct -> IO ()), FunPtr (Ptr stateStruct -> Word32 -> Ptr struct -> IO Word32))Source

runChunky :: (Storable a, MakeValueTuple a value, Memory value struct) => ChunkSize -> T value -> IO (Vector a)Source

renderChunky :: (Storable a, MakeValueTuple a value, Memory value struct) => ChunkSize -> T value -> Vector aSource