Copyright | (c) Hans Hoglund 2012 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Absolute pitch representation.
The canonical pitch representation is frequency in Hertz (Hz). For conversion, see
HasFrequency
.
- newtype Hertz = Hertz {}
- data Cents
- data Fifths
- class HasFrequency a where
- fifths :: HasFrequency a => a -> Fifths
- cents :: HasFrequency a => a -> Cents
Documentation
Absolute frequency in Hertz.
Number of pure octaves.
Cents are a logarithmic representation of frequency such that
f * (2/1) = frequency (cents f + 1200)
Number of pure fifths.
Fifths are a logarithmic representation of frequency.
f * (3/2) = frequency (fifths f + 1)
class HasFrequency a where Source
fifths :: HasFrequency a => a -> Fifths Source
cents :: HasFrequency a => a -> Cents Source