Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Derive.Scale.JustScales

Contents

Synopsis

Documentation

just_base_control :: 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 -> 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 :: BaseTypes.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 #

Constructors

Key 

Instances

Eq Key # 

Methods

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

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

Show Key # 

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Pretty Key # 

format

named intervals