Safe Haskell | Safe-Inferred |
---|
Utilities for stringed instruments.
Synopsis
- open_strings_env :: Sig.Parser [DeriveT.Pitch]
- string_env :: Sig.Parser (Maybe DeriveT.Pitch)
- with_string :: String -> Deriver a -> Deriver a
- insert_string :: String -> DeriveT.Environ -> DeriveT.Environ
- data String = String {}
- indexed_strings :: [DeriveT.Pitch] -> Deriver [String]
- string :: DeriveT.Pitch -> Deriver String
- string_val :: DeriveT.Pitch -> DeriveT.Val -> Deriver String
- type Harmonic = Int
- find_harmonic :: Bool -> Harmonic -> [String] -> Maybe String -> Pitch.NoteNumber -> Either Text (String, Harmonic)
- harmonic_of :: Bool -> Harmonic -> Pitch.NoteNumber -> Pitch.NoteNumber -> Maybe Harmonic
Documentation
open_strings_env :: Sig.Parser [DeriveT.Pitch] Source #
TODO if Sig.Parser supported Deriver eval, I could make these return
String, and not need to call indexed_strings
.
insert_string :: String -> DeriveT.Environ -> DeriveT.Environ Source #
String | |
|
indexed_strings :: [DeriveT.Pitch] -> Deriver [String] Source #
string_val :: DeriveT.Pitch -> DeriveT.Val -> Deriver String Source #
:: Bool | |
-> Harmonic | |
-> [String] | |
-> Maybe String | |
-> Pitch.NoteNumber | |
-> Either Text (String, Harmonic) | Either Error (selected string, harmonic) |
If string is given, try to find this pitch in the harmonics of that string. Otherwise, find the string from open_strings which has this as its lowest harmonic.
harmonic_of :: Bool -> Harmonic -> Pitch.NoteNumber -> Pitch.NoteNumber -> Maybe Harmonic Source #