Karya, built on 2018-02-23T20:23:55 (patch cf8565b7ac832266878af99a942555d139065f12)

Derive.Attrs

Description

A common library of attributes for instrument definitians.

Usually attributes act like tags in that they all get combined into one Attributes set. This makes sense in some cases, but not all. For example, +mute and +cresc can be usefully combined, you could imagine applying +mute to the entire melody and wanting that to combine with individual articulations within. But +pizz-right is an articulation on its own, and it doesn't really make sense to, e.g. put +right on melody by itself.

And of course since attributes are all mashed into one set, the information about which ones were applied together is lost. For example, I think it's impossible for the lilypond backend to figure how to notate +pizz+right inside of +pizz since right-hand pizz is applied as a per-note articulation, while plain pizz is a mode. But it's trivial if the attribute is +pizz-right instead.

Synopsis

# Documentation

type Attribute = Text Source #

Instruments can have a set of attributes along with them. These are propagated dynamically down the derivation stack. They function like arguments to an instrument, and will typically select an articulation, or a drum from a drumset, or something like that.

newtype Attributes Source #

Constructors

 Attributes (Set Attribute)

Instances

 # Methods # Methods # Methods # MethodsshowList :: [Attributes] -> ShowS # # Methodsstimes :: Integral b => b -> Attributes -> Attributes # # Methodsmconcat :: [Attributes] -> Attributes # # Methodsrnf :: Attributes -> () # # MethodstoJSONList :: [Attributes] -> Value # # Methods # MethodsformatList :: [Attributes] -> Doc Source # # Methods # Methods # Methods # Methods # Methods

True if the first argument contains the attributes in the second.

Remove the attributes in the first argument from the second.

# misc

Generic variations. E.g. if there are two snares you can have snare <> v1 and snare <> v2.