Safe Haskell | None |
---|---|

Language | Haskell98 |

- newtype Temp = Temp {}
- genTemp :: Double -> Double -> Double -> [Double] -> Temp
- genTempRatio :: Double -> Double -> Double -> [Double] -> Temp
- tempC :: [Double] -> Temp
- tempRatioC :: [Double] -> Temp
- stdTemp :: [Double] -> Temp
- stdTempRatio :: [Double] -> Temp
- barTemp :: [Double] -> Temp
- barTempRatio :: [Double] -> Temp
- concertA :: Double -> [Double] -> Temp
- ratioConcertA :: Double -> [Double] -> Temp
- equal1 :: Temp
- just1 :: Temp
- meantone :: Temp
- pythagor :: Temp
- werckmeister :: Temp
- young1 :: Temp
- young2 :: Temp
- young3 :: Temp
- equalCents1 :: [Double]
- justCents1 :: [Double]
- meantoneCents :: [Double]
- pythagorCents :: [Double]
- werckmeisterCents :: [Double]
- youngCents1 :: [Double]
- youngCents2 :: [Double]
- youngCents3 :: [Double]
- newtype TempList = TempList {}
- tempList :: [Temp] -> TempList
- fromTempList :: TempList -> Sig -> Temp
- fromTempListD :: TempList -> D -> Temp
- cent2ratio :: Floating a => a -> a
- ratio2cent :: Floating a => a -> a

# Temperament

Data structure for musical temperament.
The value can be created with constructors `genTemp`

and `genTempCent`

.
It can be passed as an argument to the instrument (it can be a part of the note).

genTemp :: Double -> Double -> Double -> [Double] -> Temp Source #

Creates a temperament. Arguments are

genTemp interval baseHz baseMidiPitch cents

For example:

genTemp 2 261.63 60 [0, 100, 200 .. more cents .. , 1200]

Cent list should include the first note from the next octave(interval of temperament repetition).

genTempRatio :: Double -> Double -> Double -> [Double] -> Temp Source #

Creates a temperament. Arguments are

genTempCent interval baseHz baseMidiPitch ratios

For example:

genTempRatio 2 261.63 60 [1, .. more ratios .. , 2]

Cent list should include the first note from the next octave(interval of temperament repetition).

tempC :: [Double] -> Temp Source #

Temperament with base note at note C (261.63 Hz) and an octave as interval (2). The argument is the list of cents.

tempRatioC :: [Double] -> Temp Source #

Temperament with base note at note C (261.63 Hz) and an octave as interval (2). The argument is the list of ratios.

stdTemp :: [Double] -> Temp Source #

Temperament with 9th note tuned to 440 Hz (Concert A). The argument is the list of cents.

stdTempRatio :: [Double] -> Temp Source #

Temperament with 9th note tuned to 440 Hz (Concert A). The argument is the list of ratios.

barTemp :: [Double] -> Temp Source #

Baroque Temperament with 9th note tuned to 415 Hz (Concert A). The argument is the list of cents.

barTempRatio :: [Double] -> Temp Source #

Baroque Temperament with 9th note tuned to 415 Hz (Concert A). The argument is the list of ratios.

concertA :: Double -> [Double] -> Temp Source #

Temperament with 9th note tuned to 440 Hz (Concert A). The argument is the list of cents.

ratioConcertA :: Double -> [Double] -> Temp Source #

Temperament with 9th note tuned to 440 Hz (Concert A). The argument is the list of ratios.

# Specific temperaments

werckmeister :: Temp Source #

Werckmeister III temperament. Probably it was temperament of the Bach musical era.

## In cents

equalCents1 :: [Double] Source #

justCents1 :: [Double] Source #

meantoneCents :: [Double] Source #

pythagorCents :: [Double] Source #

werckmeisterCents :: [Double] Source #

youngCents1 :: [Double] Source #

youngCents2 :: [Double] Source #

youngCents3 :: [Double] Source #

# List of temperaments

List of temperaments (or more precisely f-table of temperaments). It can be passed as an argument to the instrument (it can be a part of the note).

fromTempListD :: TempList -> D -> Temp Source #

Selects one of the temperaments by index. Works at the time of instrument initialization (remains constant).

# Utility functions

cent2ratio :: Floating a => a -> a Source #

Converts cents to ratios.

ratio2cent :: Floating a => a -> a Source #

Converts ratios to cents.