reactive-midyim-0.4.1.1: Process MIDI events via reactive-banana

Safe HaskellNone
LanguageHaskell98

Reactive.Banana.MIDI.Pattern

Contents

Synopsis

reactive patterns

type T m time set key value = Behavior (set key value) -> Event time -> m (Event [Boundary key value]) Source #

mono :: MonadMoment m => Selector set key Velocity i -> Behavior (set key Velocity) -> Event i -> m (Event [Boundary key Velocity]) Source #

poly :: MonadMoment m => Selector set key Velocity i -> Behavior (set key Velocity) -> Event [IndexNote i] -> m (Event [Boundary key Velocity]) Source #

selectors

type Selector set key value i = i -> set key value -> [(key, value)] Source #

data IndexNote i Source #

Constructors

IndexNote Int i 
Instances
Functor IndexNote Source # 
Instance details

Defined in Reactive.Banana.MIDI.Pattern

Methods

fmap :: (a -> b) -> IndexNote a -> IndexNote b #

(<$) :: a -> IndexNote b -> IndexNote a #

Foldable IndexNote Source # 
Instance details

Defined in Reactive.Banana.MIDI.Pattern

Methods

fold :: Monoid m => IndexNote m -> m #

foldMap :: Monoid m => (a -> m) -> IndexNote a -> m #

foldr :: (a -> b -> b) -> b -> IndexNote a -> b #

foldr' :: (a -> b -> b) -> b -> IndexNote a -> b #

foldl :: (b -> a -> b) -> b -> IndexNote a -> b #

foldl' :: (b -> a -> b) -> b -> IndexNote a -> b #

foldr1 :: (a -> a -> a) -> IndexNote a -> a #

foldl1 :: (a -> a -> a) -> IndexNote a -> a #

toList :: IndexNote a -> [a] #

null :: IndexNote a -> Bool #

length :: IndexNote a -> Int #

elem :: Eq a => a -> IndexNote a -> Bool #

maximum :: Ord a => IndexNote a -> a #

minimum :: Ord a => IndexNote a -> a #

sum :: Num a => IndexNote a -> a #

product :: Num a => IndexNote a -> a #

Traversable IndexNote Source # 
Instance details

Defined in Reactive.Banana.MIDI.Pattern

Methods

traverse :: Applicative f => (a -> f b) -> IndexNote a -> f (IndexNote b) #

sequenceA :: Applicative f => IndexNote (f a) -> f (IndexNote a) #

mapM :: Monad m => (a -> m b) -> IndexNote a -> m (IndexNote b) #

sequence :: Monad m => IndexNote (m a) -> m (IndexNote a) #

Eq i => Eq (IndexNote i) Source # 
Instance details

Defined in Reactive.Banana.MIDI.Pattern

Methods

(==) :: IndexNote i -> IndexNote i -> Bool #

(/=) :: IndexNote i -> IndexNote i -> Bool #

Ord i => Ord (IndexNote i) Source # 
Instance details

Defined in Reactive.Banana.MIDI.Pattern

Show i => Show (IndexNote i) Source # 
Instance details

Defined in Reactive.Banana.MIDI.Pattern

item :: i -> Int -> IndexNote i Source #

data Poly set key value i Source #

Constructors

Poly (Selector set key value i) (T Int [IndexNote i]) 

selectFromOctaveChord :: (C set, Ord pitch, C pitch) => Selector set pitch value Int Source #

Generate notes according to the key set, where notes for negative and too large indices are padded with keys that are transposed by octaves.

selectFromChord :: (C set, Ord key) => Selector set key value Int Source #

selectFromChordRatio :: (C set, Ord key) => Selector set key value Double Source #

selectInversion :: (C set, C pitch) => Selector set pitch value Double Source #

patterns

flipSeq :: Int -> [Int] Source #

See Haskore/FlipSong

flipSeq m !! n = cross sum of the m-ary representation of n modulo m.

For m=2 this yields http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A010060

fromList :: MonadMoment m => [a] -> Event time -> m (Event a) Source #

cycleUp :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity Source #

cycleDown :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity Source #

pingPong :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity Source #

crossSum :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity Source #

bruijn :: (MonadMoment m, C set, Ord key) => Int -> Int -> T m time set key Velocity Source #

binaryStaccato :: (MonadMoment m, C set, Ord key) => T m time set key Velocity Source #

binaryLegato :: (MonadMoment m, C set, Ord key) => T m time set key Velocity Source #

binaryAccident :: (MonadMoment m, C set, Ord key) => T m time set key Velocity Source #

cycleUpOctave :: (MonadMoment m, C set, Ord pitch, C pitch) => Behavior Int -> T m time set pitch Velocity Source #

random :: (MonadMoment m, C set, Ord key) => T m time set key Velocity Source #

randomInversions :: (MonadMoment m, C set, C pitch) => T m time set pitch Velocity Source #

cycleUpInversions :: (MonadMoment m, C set, C pitch) => Int -> T m time set pitch Velocity Source #

inversions :: (MonadMoment m, C set, C pitch) => [Double] -> T m time set pitch Velocity Source #

tests