Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- type T m time set key value = Behavior (set key value) -> Event time -> m (Event [Boundary key value])
- mono :: MonadMoment m => Selector set key Velocity i -> Behavior (set key Velocity) -> Event i -> m (Event [Boundary key Velocity])
- poly :: MonadMoment m => Selector set key Velocity i -> Behavior (set key Velocity) -> Event [IndexNote i] -> m (Event [Boundary key Velocity])
- type Selector set key value i = i -> set key value -> [(key, value)]
- data IndexNote i = IndexNote Int i
- item :: i -> Int -> IndexNote i
- data Poly set key value i = Poly (Selector set key value i) (T Int [IndexNote i])
- selectFromOctaveChord :: (C set, Ord pitch, C pitch) => Selector set pitch value Int
- selectFromChord :: (C set, Ord key) => Selector set key value Int
- selectFromChordRatio :: (C set, Ord key) => Selector set key value Double
- selectInversion :: (C set, C pitch) => Selector set pitch value Double
- flipSeq :: Int -> [Int]
- cycleUpIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int)
- cycleDownIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int)
- pingPongIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int)
- crossSumIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int)
- crossSumStaticIndex :: MonadMoment m => Int -> Event time -> m (Event Int)
- fromList :: MonadMoment m => [a] -> Event time -> m (Event a)
- cycleUp :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity
- cycleDown :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity
- pingPong :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity
- crossSum :: (MonadMoment m, C set, Ord key) => Behavior Int -> T m time set key Velocity
- bruijn :: (MonadMoment m, C set, Ord key) => Int -> Int -> T m time set key Velocity
- binaryStaccato :: (MonadMoment m, C set, Ord key) => T m time set key Velocity
- binaryLegato :: (MonadMoment m, C set, Ord key) => T m time set key Velocity
- binaryAccident :: (MonadMoment m, C set, Ord key) => T m time set key Velocity
- decomposePositional :: Integer -> Integer -> [Integer]
- cycleUpOctave :: (MonadMoment m, C set, Ord pitch, C pitch) => Behavior Int -> T m time set pitch Velocity
- random :: (MonadMoment m, C set, Ord key) => T m time set key Velocity
- randomInversions :: (MonadMoment m, C set, C pitch) => T m time set pitch Velocity
- cycleUpInversions :: (MonadMoment m, C set, C pitch) => Int -> T m time set pitch Velocity
- inversions :: (MonadMoment m, C set, C pitch) => [Double] -> T m time set pitch Velocity
- examplePolyTempo0 :: T Int [IndexNote Int]
- examplePolyTempo1 :: T Int [IndexNote Int]
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
Instances
Functor IndexNote Source # | |
Foldable IndexNote Source # | |
Defined in Reactive.Banana.MIDI.Pattern 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] # length :: IndexNote a -> Int # elem :: Eq a => a -> IndexNote a -> Bool # maximum :: Ord a => IndexNote a -> a # minimum :: Ord a => IndexNote a -> a # | |
Traversable IndexNote Source # | |
Defined in Reactive.Banana.MIDI.Pattern | |
Eq i => Eq (IndexNote i) Source # | |
Ord i => Ord (IndexNote i) Source # | |
Defined in Reactive.Banana.MIDI.Pattern | |
Show i => Show (IndexNote i) Source # | |
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.
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
cycleUpIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int) Source #
cycleDownIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int) Source #
pingPongIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int) Source #
crossSumIndex :: MonadMoment m => Behavior Int -> Event time -> m (Event Int) Source #
crossSumStaticIndex :: MonadMoment m => Int -> Event time -> m (Event Int) 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 #
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 #