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

Safe HaskellNone

Reactive.Banana.MIDI.Pattern

Contents

Synopsis

reactive patterns

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

mono :: C set => Selector set key Velocity i -> Behavior t (set key Velocity) -> Event t i -> Event t [Boundary key Velocity]Source

poly :: C set => Selector set key Velocity i -> Behavior t (set key Velocity) -> Event t [IndexNote i] -> Event t [Boundary key Velocity]Source

selectors

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

item :: i -> Int -> IndexNote iSource

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 IntSource

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 IntSource

selectFromChordRatio :: (C set, Ord key) => Selector set key value DoubleSource

selectInversion :: (C set, C pitch) => Selector set pitch value DoubleSource

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.comcgi-binaccess.cgiasnjassequenceseisA.cgi?Anum=A010060

fromList :: [a] -> Event t time -> Event t aSource

cycleUp :: (C set, Ord key) => Behavior t Int -> T t time set key VelocitySource

crossSum :: (C set, Ord key) => Behavior t Int -> T t time set key VelocitySource

pingPong :: (C set, Ord key) => Behavior t Int -> T t time set key VelocitySource

cycleDown :: (C set, Ord key) => Behavior t Int -> T t time set key VelocitySource

bruijn :: (C set, Ord key) => Int -> Int -> T t time set key VelocitySource

binaryStaccato :: (C set, Ord key) => T t time set key VelocitySource

binaryAccident :: (C set, Ord key) => T t time set key VelocitySource

binaryLegato :: (C set, Ord key) => T t time set key VelocitySource

cycleUpOctave :: (C set, Ord pitch, C pitch) => Behavior t Int -> T t time set pitch VelocitySource

random :: (C set, Ord key) => T t time set key VelocitySource

randomInversions :: (C set, C pitch) => T t time set pitch VelocitySource

cycleUpInversions :: (C set, C pitch) => Int -> T t time set pitch VelocitySource

inversions :: (C set, C pitch) => [Double] -> T t time set pitch VelocitySource

tests