Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

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

Instances details
Monoid Attributes Source # 
Instance details

Defined in Derive.Attrs

Semigroup Attributes Source # 
Instance details

Defined in Derive.Attrs

Read Attributes Source # 
Instance details

Defined in Derive.Attrs

Show Attributes Source # 
Instance details

Defined in Derive.Attrs

DeepSeq.NFData Attributes Source # 
Instance details

Defined in Derive.Attrs

Methods

rnf :: Attributes -> () #

Eq Attributes Source # 
Instance details

Defined in Derive.Attrs

Ord Attributes Source # 
Instance details

Defined in Derive.Attrs

ToVal Attributes Source # 
Instance details

Defined in Derive.REnv

ShowVal.ShowVal Attributes Source # 
Instance details

Defined in Derive.Attrs

ToVal Attributes Source # 
Instance details

Defined in Derive.Typecheck

Typecheck Attributes Source # 
Instance details

Defined in Derive.Typecheck

Pretty Attributes Source # 
Instance details

Defined in Derive.Attrs

Serialize.Serialize Attributes Source # 
Instance details

Defined in Derive.Attrs

FromJSON Attributes Source # 
Instance details

Defined in Derive.Attrs

ToJSON Attributes Source # 
Instance details

Defined in Derive.Attrs

contain :: Attributes -> Attributes -> Bool Source #

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

remove :: Attributes -> Attributes -> Attributes Source #

Remove the attributes in the first argument from the second.

articulations

dynamics

strings

winds

drums

technique

misc

v1 :: Attributes Source #

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

first :: Attributes Source #

Ordinal numbers, either for intervals, or for the nth of something (e.g. harm <> third).