music-parts-1.9.0: Musical instruments, parts and playing techniques.

Safe HaskellNone
LanguageHaskell2010

Music.Parts

Contents

Description

Representation of musical instruments, parts and playing techniques.

Synopsis

Terminology

Parts represent a subset of a group of performers. It is mainly used for instrumental and vocal music, but some concetps may be useful in electronic music as well.

  • Section refers to a set of instrumentfamilies related by sound production method (i.e. woodwind).
  • Family refers to a set of instrument or voice types, which typically differ in size (i.e. saxophones).
  • Instrument refers to a set of instruments or voice types of a given type (i.e. soprano saxophones). Perhaps confusingly, this includes vocal types such as alto, tenor etc as well. However, there is no good general term that incorporate both instrument and voice type.
  • A Part is made up of an Instrument and a Division (i.e. Violin I). Solo parts are treated separately, so i.e. Violin solo II (as in a double concerto) is distinct from Violin II.

Subparts

Solo vs. tutti

Instruments

Parts

data Part Source

A part is a subdivided group of instruments of a given type.

Constructors

Part Solo Instrument Subpart 

Instances

Enum Part 
Eq Part 
Ord Part 
Show Part 
Monoid Part 
Semigroup Part 
ToJSON Part 
FromJSON Part 
Default Part 

divide :: Int -> Part -> [Part] Source

Divide a part into n subparts.

containsPart :: Part -> Part -> Bool Source

a `containsPart` b holds if the set of players represented by a is an improper subset of the set of players represented by b.

distinctFrom :: Part -> Part -> Bool Source

Returns True iff x and y are completely distinct, i.e. neither contains the other.

>>> violins `distinctFrom` trumpets
True
>>> violins `distinctFrom` violins
False
>>> violins `distinctFrom` violins1
False
>>> violins1 `distinctFrom` violins
False
>>> violins1 `distinctFrom` violins2
True

allDistinct :: [Part] -> Bool Source

Returns True iff all given parts are distinct (as per distinctFrom).

Instruments etc

Ensembles

Default values

Basic