synthesizer-core-0.8.2.1: Audio signal processing coded in Haskell: Low level part

Safe HaskellNone
LanguageHaskell2010

Synthesizer.CausalIO.Gate

Synopsis

Documentation

data Chunk a Source #

Chunk represents a chunk of a Gate signal.

It means (Chunk chunkDuration sustainDuration).

sustainDuration means: Just (t,a) - key is released at time t with attribute a, e.g. the note-off-velocity, t must be smaller than chunkDuration! Nothing - key is in pressed or released state over the whole chunk

Constructors

Chunk StrictTime (Maybe (StrictTime, a)) 
Instances
Show a => Show (Chunk a) Source # 
Instance details

Defined in Synthesizer.CausalIO.Gate

Methods

showsPrec :: Int -> Chunk a -> ShowS #

show :: Chunk a -> String #

showList :: [Chunk a] -> ShowS #

Semigroup (Chunk a) Source # 
Instance details

Defined in Synthesizer.CausalIO.Gate

Methods

(<>) :: Chunk a -> Chunk a -> Chunk a #

sconcat :: NonEmpty (Chunk a) -> Chunk a #

stimes :: Integral b => b -> Chunk a -> Chunk a #

Monoid (Chunk a) Source # 
Instance details

Defined in Synthesizer.CausalIO.Gate

Methods

mempty :: Chunk a #

mappend :: Chunk a -> Chunk a -> Chunk a #

mconcat :: [Chunk a] -> Chunk a #

Transform (Chunk a) Source # 
Instance details

Defined in Synthesizer.CausalIO.Gate

Methods

take :: Int -> Chunk a -> Chunk a Source #

drop :: Int -> Chunk a -> Chunk a Source #

dropMarginRem :: Int -> Int -> Chunk a -> (Int, Chunk a) Source #

splitAt :: Int -> Chunk a -> (Chunk a, Chunk a) Source #

reverse :: Chunk a -> Chunk a Source #

NormalForm (Chunk a) Source # 
Instance details

Defined in Synthesizer.CausalIO.Gate

Methods

evaluateHead :: Chunk a -> () Source #

Read (Chunk a) Source # 
Instance details

Defined in Synthesizer.CausalIO.Gate

Methods

null :: Chunk a -> Bool Source #

length :: Chunk a -> Int Source #

chunk :: StrictTime -> Maybe (StrictTime, a) -> Chunk a Source #

smart constructor that checks the time constraints

allToStorableVector :: Arrow arrow => arrow (Chunk a) (Vector ()) Source #

allToChunkySize :: Arrow arrow => arrow (Chunk a) LazySize Source #

shorten :: Transform signal => T (T (Chunk a) signal) signal Source #

Pass the second signal while the gate is open.

For completeness we would need a data type analogously to ChunkySize, that measures signal duration in CausalIO processes. shorten could then be written as

shorten = Zip.second ^<< Zip.arrowFirstShort Gate.toChunkySize