Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Derive.Scale.JustScales

Synopsis

Documentation

just_base_control :: ScoreT.Control Source #

Hz frequency of 1/1.

data ScaleMap Source #

Bundle up data needed to construct a just scale.

Constructors

ScaleMap 

Fields

scale_map :: Keys -> Key -> Maybe Tuning -> TheoryFormat.Format -> ScaleMap Source #

Make a just scale with the given set of keys. A "key" in a just scale is the set of ratios and the tonic. The number of ratios should be the same as the number of scale degrees as defined by the TheoryFormat.Format. If there are too many, the extras will never be reached, if too few, they'll wrap around.

layout :: Theory.Layout Source #

TODO this should be 'repeat 2', but as long as this is also controlling the input layout, it has to be piano layout, or it won't work properly with kbd and midi entry.

group_relative_keys :: [(Pitch.Key, Key)] -> [(Doc.Doc, Doc.Doc)] Source #

Group keys and format them into fields suitable to pass to make_scale. The Keys are expected to be relative, so their key_tonics are ignored.

input_to_note

transpose

note_to_call

note_to_call :: DeriveT.Scale -> ScaleMap -> Pitch.Note -> Maybe ValCall Source #

To modulate to another scale: just-base = (hz (4g)) | key = g-maj The order is important, so the (hz (4g)) happens in the context of the old key.

split_fraction :: (RealFrac a, Integral b) => a -> (b, a) Source #

Like properFraction, but the fraction is always positive.

degree_to_hz Source #

Arguments

:: Ratios 
-> Pitch.Hz 
-> Pitch.Pitch

should be relative to scale's tonic

-> Pitch.Hz 

Given a Key, convert a pitch in that key to its hz value, calculated as a ratio from the given base hz.

key

data Key Source #

Instances

Instances details
Show Key Source # 
Instance details

Defined in Derive.Scale.JustScales

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Eq Key Source # 
Instance details

Defined in Derive.Scale.JustScales

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Pretty.Pretty Key Source # 
Instance details

Defined in Derive.Scale.JustScales

make_keys :: [Text] -> [(Text, [(Tuning, Ratios)])] -> Keys Source #

format

named intervals