Safe Haskell | None |
---|---|
Language | Haskell2010 |
Semitones and enharmonic equivalence.
- data Octaves
- type Semitones = ChromaticSteps
- class HasSemitones a where
- semitone :: Semitones
- tone :: Semitones
- ditone :: Semitones
- tritone :: Semitones
- isSemitone :: HasSemitones a => a -> Bool
- isTone :: HasSemitones a => a -> Bool
- isTritone :: HasSemitones a => a -> Bool
- (=:=) :: HasSemitones a => a -> a -> Bool
- (/:=) :: HasSemitones a => a -> a -> Bool
Types
Octaves
Number of octaves. May be negative, indicating a downward interval.
Semitones
type Semitones = ChromaticSteps Source
Number of semitones. May be negative, indicating a downward interval.
class HasSemitones a where Source
Class of intervals that can be converted to a number of Semitones
.
isSemitone :: HasSemitones a => a -> Bool Source
Returns true iff the given interval spans one semitone.
isTone :: HasSemitones a => a -> Bool Source
Returns true iff the given interval spans one whole tone (two semitones).
isTritone :: HasSemitones a => a -> Bool Source
Returns true iff the given interval spans three whole tones (six semitones).
Enharmonic equivalence
(=:=) :: HasSemitones a => a -> a -> Bool infix 4 Source
Enharmonic equivalence.
>>>
asInterval _A2 == m3
False>>>
asInterval _A2 =:= m3
True
(/:=) :: HasSemitones a => a -> a -> Bool infix 4 Source
Enharmonic non-equivalence.
>>>
asInterval _A2 /= m3
True>>>
asInterval _A2 /:= m3
False