Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Derive.Attrs

Contents

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

Eq Attributes # 
Ord Attributes # 
Read Attributes # 
Show Attributes # 
Monoid Attributes # 
DeepSeq.NFData Attributes # 

Methods

rnf :: Attributes -> () #

ToJSON Attributes # 
FromJSON Attributes # 
Pretty Attributes # 
Serialize.Serialize Attributes # 
ShowVal.ShowVal Attributes # 
ToVal Attributes # 
ToVal Attributes # 
Typecheck Attributes # 

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

western

technique

misc

v1 :: Attributes Source #

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