csound-expression-5.4.3.1: library to make electronic music
Safe HaskellSafe-Inferred
LanguageHaskell2010

Csound.Tuning

Synopsis

Temperament

newtype Temp Source #

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).

Constructors

Temp 

Fields

Instances

Instances details
Arg Temp Source # 
Instance details

Defined in Csound.Tuning

Tuple Temp Source # 
Instance details

Defined in Csound.Tuning

Default Temp Source # 
Instance details

Defined in Csound.Tuning

Methods

def :: Temp #

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

equal1 :: Temp Source #

Equal temperament

just1 :: Temp Source #

Just intonation

meantone :: Temp Source #

Meantone temperament

pythagor :: Temp Source #

Pythagorean tuning

werckmeister :: Temp Source #

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

young1 :: Temp Source #

Tomas Young temperament

young2 :: Temp Source #

Tomas Young temperament 1 (aligned with ET by C and A)

young3 :: Temp Source #

Tomas Young temperament 2 (aligned with ET by C and A)

In cents

List of temperaments

newtype TempList Source #

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).

Constructors

TempList 

Fields

Instances

Instances details
Arg TempList Source # 
Instance details

Defined in Csound.Tuning

Tuple TempList Source # 
Instance details

Defined in Csound.Tuning

tempList :: [Temp] -> TempList Source #

Creates a list of temperaments.

fromTempList :: TempList -> Sig -> Temp Source #

Selects one of the temperaments by index.

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.