reactive-balsa-0.1: Programmatically edit MIDI events via ALSA and reactive-banana

Safe HaskellNone

Reactive.Banana.ALSA.Pattern

Contents

Synopsis

reactive patterns

type T t time set = Behavior t set -> Event t time -> Event t [NoteBoundary]Source

mono :: C set => Selector set i -> Behavior t set -> Event t i -> Event t [NoteBoundary]Source

poly :: C set => Selector set i -> Behavior t set -> Event t [IndexNote i] -> Event t [NoteBoundary]Source

selectors

type Selector set i = i -> set -> [((Pitch, Channel), Velocity)]Source

data IndexNote i Source

Constructors

IndexNote Int i 

item :: i -> Int -> IndexNote iSource

data Poly set i Source

Constructors

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

selectFromOctaveChord :: C set => Selector set 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.

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 => Behavior t Int -> T t time setSource

crossSum :: C set => Behavior t Int -> T t time setSource

pingPong :: C set => Behavior t Int -> T t time setSource

cycleDown :: C set => Behavior t Int -> T t time setSource

bruijn :: C set => Int -> Int -> T t time setSource

binaryStaccato :: C set => T t time setSource

binaryAccident :: C set => T t time setSource

binaryLegato :: C set => T t time setSource

cycleUpOctave :: C set => Behavior t Int -> T t time setSource

random :: C set => T t time setSource

randomInversions :: C set => T t time setSource

cycleUpInversions :: C set => Int -> T t time setSource

inversions :: C set => [Double] -> T t time setSource

tests