Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone



Calls that are similar to staff-notation articulations, or could be. This means calls that modify notes in relatively straightforward ways, either by adding an attribute or modifying their environment.

There is already general purpose syntax to add attributes to notes, e.g. attr = +x or n +x or just +x, and instruments may supply special calls for their attributes, but there are several attributes which look nice with their own calls and are used by many instruments.

TODO There are too many ways to apply attributes to notes, and they work in inconsistent ways.



attr pattern


touch_interval :: StringUtil.Harmonic -> Maybe Pitch.NoteNumber Source #

Where should I touch the string to play the nth harmonic of a base frequency?

natural_harmonic Source #

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.

artificial_harmonic Source #


:: Pitch.NoteNumber 
-> Pitch.NoteNumber 
-> Either Text (Pitch.NoteNumber, StringUtil.Harmonic)

(stopped pitch, harmonic)

Pick the lowest harmonic which is above the given lowest string.


c_slur :: Maybe Call.UpDown -> Generator Note Source #

I'm not really sure how fancy calls should be. On one hand, high level calls should get a nice result automatically. On the other hand, they're not very composable if they override things like %sus-abs.

c_attr_slur :: Attrs.Attributes -> Attrs.Attributes -> Generator Note Source #

This is not in note_calls, instruments that support this are expected to override ( with it.


c_sustain_abs :: Transformer Note Source #

This is the same as c_lengthen, but it's here for symmetry with c_sustain. Also, conceptually this is lower level, while c_lengthen is meant to be modified to whatever is locally appropriate.