Copyright | (c) Hans Hoglund 2012-2014 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | non-portable (TF,GNTD) |
Safe Haskell | None |
Language | Haskell2010 |
Provides key signature meta-data.
- data Fifths
- data KeySignature
- key :: Fifths -> Bool -> KeySignature
- isMajorKey :: KeySignature -> Bool
- isMinorKey :: KeySignature -> Bool
- keySignature :: (HasMeta a, HasPosition a) => KeySignature -> a -> a
- keySignatureDuring :: HasMeta a => Span -> KeySignature -> a -> a
- withKeySignature :: KeySignature -> (KeySignature -> Score a -> Score a) -> Score a -> Score a
Key signature type
data KeySignature Source
A key signature, represented by number of fifths from C and mode.
key :: Fifths -> Bool -> KeySignature Source
Create a major or minor signature.
isMajorKey :: KeySignature -> Bool Source
isMinorKey :: KeySignature -> Bool Source
Adding key signatures to scores
keySignature :: (HasMeta a, HasPosition a) => KeySignature -> a -> a Source
Set the key signature of the given score.
keySignatureDuring :: HasMeta a => Span -> KeySignature -> a -> a Source
Set the key signature of the given part of a score.
Extracting key signatures
withKeySignature :: KeySignature -> (KeySignature -> Score a -> Score a) -> Score a -> Score a Source
Extract all key signatures from the given score, using the given default key signature.