Copyright | (c) Benjamin Kovach, 2014 |
---|---|
License | MIT |
Maintainer | bkovach13@gmail.com |
Stability | experimental |
Portability | Mac OSX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Defines a number of operators to effectively piece together Bang compositions.
- (><) :: Music dur a -> Music dur a -> Music dur a
- (!>) :: Rational -> Music a b -> Music a b
- (#>) :: Num a => Int -> Music a b -> Music a b
- (>>~) :: Monoid b => (a -> b) -> [a] -> b
- (~=~) :: (Dur, Music Dur b) -> (Dur, Music Dur b) -> Music Dur b
- (~=) :: Music Dur b -> Music Dur b -> Music Dur b
- (=~) :: Music Dur b -> Music Dur b -> Music Dur b
- (~~) :: Dur -> Music Dur b -> Music Dur b
- (<<~) :: Dur -> Music Dur b -> Music Dur b
- (~>>) :: Dur -> Music Dur b -> Music Dur b
- (~@>) :: Dur -> Music Dur b -> Music Dur b
- (<@~) :: Dur -> Music Dur b -> Music Dur b
- (<!>) :: Dur -> [Music Dur b] -> Music Dur b
- (>!<) :: Dur -> [Music Dur b] -> Music Dur b
Documentation
(!>) :: Rational -> Music a b -> Music a b infixr 0 Source
Set the Tempo
of a composition (default 1)
Example (play 4 bass drum hits at double speed):
2 !> (4 #> bd)
(>>~) :: Monoid b => (a -> b) -> [a] -> b infixl 1 Source
Map a function over a list of compositions and sequentially compose them.
Note: This is just foldMap
specialized to the list Monoid.
Example (play sn
, t1
and t2
all twice):
(2 #>) >>~ [sn, t1, t2]
(~@>) :: Dur -> Music Dur b -> Music Dur b infixr 2 Source
Infix operator for hushFor
Example (half rest, then two closed hi-hats):
(1/2) ~@> ( (2 #> bd) <> (2 #> hc) )
(<@~) :: Dur -> Music Dur b -> Music Dur b infixr 2 Source
Infix operator for hushFrom
Example (two bass drum hits, then a half rest):
(1/2) <@~ ( (2 #> bd) <> (2 #> hc) )