| Copyright | Christoph Finkensiep 2021 |
|---|---|
| License | BSD |
| Maintainer | chfin@chfin.de |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
| Extensions |
|
Musicology.Pitch.Spelled
Description
This module defines pitch and interval types for spelled pitch, i.e. Western notation.
Synopsis
- data SInterval = SInterval {}
- spelled :: Int -> Int -> SInterval
- spelledDiaChrom :: Int -> Int -> SInterval
- newtype SIC = SIC {}
- sic :: Int -> SIC
- type SPitch = Pitch SInterval
- type SPC = Pitch SIC
- spelledp :: Int -> Int -> SPitch
- spc :: Int -> SPC
- class Spelled i where
- letter :: Spelled i => i -> Char
- second :: ImperfectInterval SInterval
- third :: ImperfectInterval SInterval
- fourth :: SInterval
- tritone :: SInterval
- fifth :: SInterval
- sixth :: ImperfectInterval SInterval
- seventh :: ImperfectInterval SInterval
- second' :: ImperfectInterval SIC
- third' :: ImperfectInterval SIC
- fourth' :: SIC
- tritone' :: SIC
- fifth' :: SIC
- sixth' :: ImperfectInterval SIC
- seventh' :: ImperfectInterval SIC
- newtype Accidental = Acc Int
- flt :: Accidental
- nat :: Accidental
- shp :: Accidental
- c :: Accidental -> Int -> SPitch
- d :: Accidental -> Int -> SPitch
- e :: Accidental -> Int -> SPitch
- f :: Accidental -> Int -> SPitch
- g :: Accidental -> Int -> SPitch
- a :: Accidental -> Int -> SPitch
- b :: Accidental -> Int -> SPitch
- c' :: Accidental -> SPC
- d' :: Accidental -> SPC
- e' :: Accidental -> SPC
- f' :: Accidental -> SPC
- g' :: Accidental -> SPC
- a' :: Accidental -> SPC
- b' :: Accidental -> SPC
Interval Types
Instances
Instances
| FromJSON SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| ToJSON SIC Source # | |||||
| NFData SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| Generic SIC Source # | |||||
Defined in Musicology.Pitch.Spelled Associated Types
| |||||
| Show SIC Source # | |||||
| Show SPC Source # | |||||
| Eq SIC Source # | |||||
| Ord SIC Source # | |||||
| Hashable SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| Chromatic SIC Source # | |||||
Defined in Musicology.Pitch.Spelled Methods | |||||
| Diatonic SIC Source # | |||||
| Interval SIC Source # | |||||
| IntervalClass SIC Source # | |||||
| Notation SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| Notation SPC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| ToMidi SIC Source # | |||||
| ToMidi SPC Source # | |||||
| Spelled SIC Source # | |||||
| AdditiveGroup SIC Source # | |||||
| VectorSpace SIC Source # | |||||
| type Rep SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| type ICOf SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| type IOf SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
| type Scalar SIC Source # | |||||
Defined in Musicology.Pitch.Spelled | |||||
Pitch Types
Common Accessors
Concrete Intervals
Concrete intervals come in two variants,
one for intervals (e.g. fifth) and one for interval classes (fifth').
Imperfect intervals have a ImperfectInterval type
and must be used with major or minor (e.g. ).
All (fully applied) intervals can be used with minor thirdaug, dim and down
Concrete pitches
Concrete pitches are constructed from an accidental (flt, nat, or shp)
and (for non-class pitches) and octave number.
newtype Accidental Source #
flt :: Accidental Source #
nat :: Accidental Source #
shp :: Accidental Source #
c' :: Accidental -> SPC Source #
d' :: Accidental -> SPC Source #
e' :: Accidental -> SPC Source #
f' :: Accidental -> SPC Source #
g' :: Accidental -> SPC Source #
a' :: Accidental -> SPC Source #
b' :: Accidental -> SPC Source #