Safe Haskell | Safe-Inferred |
---|
Utilities for equal-tempered chromatic scales with keys and modes.
Synopsis
- data ScaleMap = ScaleMap {}
- type SemisToNoteNumber = DeriveT.PitchConfig -> Pitch.FSemi -> Either.Either DeriveT.PitchError Pitch.NoteNumber
- twelve_doc :: Doc.Doc
- scale_map :: Theory.Layout -> TheoryFormat.Format -> Keys -> Theory.Key -> ScaleMap
- type Keys = Map Pitch.Key Theory.Key
- make_keys :: TheoryFormat.Format -> [Theory.Key] -> Keys
- make_scale :: Pitch.ScaleId -> ScaleMap -> Doc.Doc -> Scale
- transpose :: ScaleMap -> Transpose
- pitch_note :: ScaleMap -> TheoryFormat.RelativePitch -> Scale.PitchNote
- pitch_nn :: ScaleMap -> TheoryFormat.RelativePitch -> Scale.PitchNn
- input_to_note :: ScaleMap -> Scales.InputToNote
- group_tonic_mode :: [(Pitch.Key, a)] -> [(Text, a)]
- relative_fmt :: Theory.Key -> Keys -> TheoryFormat.RelativeFormat Theory.Key
- show_pitch :: ScaleMap -> Maybe Pitch.Key -> Pitch.Pitch -> Either.Either DeriveT.PitchError Pitch.Note
- read_pitch :: ScaleMap -> Maybe Pitch.Key -> Pitch.Note -> Either.Either DeriveT.PitchError Pitch.Pitch
- read_key :: ScaleMap -> Maybe Pitch.Key -> Either.Either DeriveT.PitchError Theory.Key
Documentation
This contains all that is needed to define a modal key system. It fills
a similar role to Scales.DegreeMap
for non-keyed scales.
ScaleMap | |
|
type SemisToNoteNumber = DeriveT.PitchConfig -> Pitch.FSemi -> Either.Either DeriveT.PitchError Pitch.NoteNumber Source #
twelve_doc :: Doc.Doc Source #
scale_map :: Theory.Layout -> TheoryFormat.Format -> Keys -> Theory.Key -> ScaleMap Source #
make_keys :: TheoryFormat.Format -> [Theory.Key] -> Keys Source #
make_scale :: Pitch.ScaleId -> ScaleMap -> Doc.Doc -> Scale Source #
pitch_note :: ScaleMap -> TheoryFormat.RelativePitch -> Scale.PitchNote Source #
Create a PitchNote for ScaleDegree.scale_degree
.
pitch_nn :: ScaleMap -> TheoryFormat.RelativePitch -> Scale.PitchNn Source #
Create a PitchNn for ScaleDegree.scale_degree
.
group_tonic_mode :: [(Pitch.Key, a)] -> [(Text, a)] Source #
Assuming keys are formatted tonic-mode
, group keys by mode and replace
the tonics with a pattern.
util
show_pitch :: ScaleMap -> Maybe Pitch.Key -> Pitch.Pitch -> Either.Either DeriveT.PitchError Pitch.Note Source #