Copyright | (c) Dima Szamozvancev |
---|---|
License | MIT |
Maintainer | ds709@cam.ac.uk |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Combinators for building scores: Music
values with global composition
attributes such as tempo or key signature.
- data Attributes t k r = (Primitive t, Primitive k, ScoreAtt t, ScoreAtt k) => Attributes {
- title :: String
- tempo :: Tempo
- timeSignature :: TimeSig t
- keySignature :: KeyS k
- ruleSet :: r
- defAttributes :: Attributes 4 (Key C Natural MajorMode) Classical
- getTimeSig :: Attributes t k r -> Message
- getKeySig :: Attributes t k r -> Message
- score :: Spec (Attributes 4 (Key C Natural MajorMode) Classical)
- section :: AMut String (Attributes t k r)
- setTempo :: AMut Tempo (Attributes t k r)
- setTimeSig :: (Primitive t', ScoreAtt t') => AConv (TimeSig t') (Attributes t k r) (Attributes t' k r)
- setKeySig :: (Primitive k', ScoreAtt k') => AConv (KeyS k') (Attributes t k r) (Attributes t k' r)
- setRuleSet :: AConv r' (Attributes t k r) (Attributes t k r')
- free :: Free
- classical :: Classical
- strict :: Strict
Scores and attributes
data Attributes t k r Source #
Datatype containing MIDI attributes of a Mezzo composition.
(Primitive t, Primitive k, ScoreAtt t, ScoreAtt k) => Attributes | |
|
defAttributes :: Attributes 4 (Key C Natural MajorMode) Classical Source #
Default attributes: Composition in C major in common time, with tempo 120 BPM.
getTimeSig :: Attributes t k r -> Message Source #
Get the time signature MIDI message.
getKeySig :: Attributes t k r -> Message Source #
Get the key signature MIDI message.
Score builders
setTimeSig :: (Primitive t', ScoreAtt t') => AConv (TimeSig t') (Attributes t k r) (Attributes t' k r) Source #
Sets the time signature of the composition.
setKeySig :: (Primitive k', ScoreAtt k') => AConv (KeyS k') (Attributes t k r) (Attributes t k' r) Source #
Sets the key signature of the composition.
setRuleSet :: AConv r' (Attributes t k r) (Attributes t k r') Source #
Sets the key signature of the composition.