hmt-0.15: Haskell Music Theory

Safe Haskell | Safe
Language | Haskell98

Music.Theory.Instrument.Choir

Synopsis

- data Voice
  - = Bass
  - | Tenor
  - | Alto
  - | Soprano
- voice_abbrev :: Voice -> Char
- voice_clef :: Integral i => Voice -> Clef i
- type Voice_Rng_Tbl = [(Voice, (Pitch, Pitch))]
- voice_rng_tbl_std :: Voice_Rng_Tbl
- voice_rng_tbl_safe :: Voice_Rng_Tbl
- lookup_err :: Eq a => a -> [(a, b)] -> b
- voice_rng :: Voice_Rng_Tbl -> Voice -> (Pitch, Pitch)
- voice_rng_std :: Voice -> (Pitch, Pitch)
- voice_rng_safe :: Voice -> (Pitch, Pitch)
- in_range_inclusive :: Ord a => a -> (a, a) -> Bool
- in_voice_rng :: Pitch -> Voice -> (Bool, Bool)
- possible_voices :: Voice_Rng_Tbl -> Pitch -> [Voice]
- possible_voices_std :: Pitch -> [Voice]
- possible_voices_safe :: Pitch -> [Voice]
- satb :: [Voice]
- satb_name :: [String]
- satb_abbrev :: [String]
- type Part = (Voice, Int)
- ch_satb_seq :: Int -> [Part]
- ch_parts :: Int -> [[Part]]
- part_nm :: Part -> String
- k_ch_groups :: Int -> [[Part]]
- k_ch_groups' :: Int -> [Part]
- dbl_ch_parts :: Int -> [[Part]]
- mk_clef_seq :: [Part] -> [Clef Int]

# Documentation

data Voice Source #

Voice types.

Constructors

Bass |
Tenor |
Alto |
Soprano |

Instances

Bounded Voice Source # |
Methods minBound :: Voice # maxBound :: Voice #
Enum Voice Source # |
Methods succ :: Voice -> Voice # pred :: Voice -> Voice # toEnum :: Int -> Voice # fromEnum :: Voice -> Int # enumFrom :: Voice -> [Voice] # enumFromThen :: Voice -> Voice -> [Voice] # enumFromTo :: Voice -> Voice -> [Voice] # enumFromThenTo :: Voice -> Voice -> Voice -> [Voice] #
Eq Voice Source # |
Methods (==) :: Voice -> Voice -> Bool # (/=) :: Voice -> Voice -> Bool #
Ord Voice Source # |
Methods compare :: Voice -> Voice -> Ordering # (<) :: Voice -> Voice -> Bool # (<=) :: Voice -> Voice -> Bool # (>) :: Voice -> Voice -> Bool # (>=) :: Voice -> Voice -> Bool # max :: Voice -> Voice -> Voice # min :: Voice -> Voice -> Voice #
Show Voice Source # |
Methods showsPrec :: Int -> Voice -> ShowS # show :: Voice -> String # showList :: [Voice] -> ShowS #

voice_abbrev :: Voice -> Char Source #

Single character abbreviation for `Voice`.

voice_clef :: Integral i => Voice -> Clef i Source #

Standard `Clef` for `Voice`.

type Voice_Rng_Tbl = [(Voice, (Pitch, Pitch))] Source #

Table giving ranges for `Voice`s.

voice_rng_tbl_std :: Voice_Rng_Tbl Source #

More or less standard choir ranges, inclusive.

voice_rng_tbl_safe :: Voice_Rng_Tbl Source #

More conservative ranges, inclusive.

lookup_err :: Eq a => a -> [(a, b)] -> b Source #

Erroring variant.

voice_rng :: Voice_Rng_Tbl -> Voice -> (Pitch, Pitch) Source #

Lookup voice range table.

voice_rng_std :: Voice -> (Pitch, Pitch) Source #

Lookup `voice_rng_tbl_std`.

voice_rng_safe :: Voice -> (Pitch, Pitch) Source #

Lookup `voice_rng_tbl_safe`.

in_range_inclusive :: Ord a => a -> (a, a) -> Bool Source #

Is p `>=` l and `<=` r.

in_voice_rng :: Pitch -> Voice -> (Bool, Bool) Source #

Is p in range for v, (std & safe).

    map (in_voice_rng T.c4) [Bass .. Soprano]

possible_voices :: Voice_Rng_Tbl -> Pitch -> [Voice] Source #

Given tbl list `Voice`s that can sing `Pitch`.

possible_voices_std :: Pitch -> [Voice] Source #

std variant.

possible_voices_safe :: Pitch -> [Voice] Source #

safe variant.

satb :: [Voice] Source #

Enumeration of SATB voices.

satb_name :: [String] Source #

Names of `satb`.

satb_abbrev :: [String] Source #

`voice_abbrev` of `satb` as `String`s.

type Part = (Voice, Int) Source #

Voice & part number.

ch_satb_seq :: Int -> [Part] Source #

k part choir, ordered by voice.

ch_parts :: Int -> [[Part]] Source #

`ch_satb_seq` grouped in parts.

    map (map part_nm) (ch_parts 8)

part_nm :: Part -> String Source #

Abreviated name for part.

    part_nm (Soprano,1) == "S1"

k_ch_groups :: Int -> [[Part]] Source #

k SATB choirs, grouped by choir.

    k_ch_groups 2

k_ch_groups' :: Int -> [Part] Source #

`concat` of `k_ch_groups`.

dbl_ch_parts :: Int -> [[Part]] Source #

Two k part SATB choirs in score order.

    map part_nm (concat (dbl_ch_parts 8))

mk_clef_seq :: [Part] -> [Clef Int] Source #

`voice_clef` for `Part`s.