Copyright | (c) Hans Hoglund 2012 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | non-portable (TF,GNTD) |
Safe Haskell | None |
Language | Haskell2010 |
Part representation.
- data Division
- divisions :: Int -> [Division]
- getDivision :: Division -> (Int, Int)
- data Subpart
- data Instrument
- data Solo
- data Part = Part Solo Instrument Subpart
- divide :: Int -> Part -> [Part]
- containsPart :: Part -> Part -> Bool
- containsSubpart :: Subpart -> Subpart -> Bool
- solo :: Instrument -> Part
- tutti :: Instrument -> Part
- piccoloFlute :: Instrument
- flute :: Instrument
- altoFlute :: Instrument
- bassFlute :: Instrument
- oboe :: Instrument
- corAnglais :: Instrument
- heckelphone :: Instrument
- ebClarinet :: Instrument
- clarinet :: Instrument
- aClarinet :: Instrument
- bassClarinet :: Instrument
- sopranoSax :: Instrument
- altoSax :: Instrument
- tenorSax :: Instrument
- baritoneSax :: Instrument
- bassoon :: Instrument
- contraBassoon :: Instrument
- horn :: Instrument
- piccoloTrumpet :: Instrument
- trumpet :: Instrument
- bassTrumpet :: Instrument
- altoTrombone :: Instrument
- tenorTrombone :: Instrument
- trombone :: Instrument
- bassTrombone :: Instrument
- tuba :: Instrument
- timpani :: Instrument
- piano :: Instrument
- celesta :: Instrument
- glockenspiel :: Instrument
- vibraphone :: Instrument
- marimba :: Instrument
- xylophone :: Instrument
- xylorimba :: Instrument
- tubularBells :: Instrument
- dulcimer :: Instrument
- accordion :: Instrument
- harmonica :: Instrument
- violin :: Instrument
- viola :: Instrument
- cello :: Instrument
- doubleBass :: Instrument
- defaultClef :: Part -> Int
- defaultMidiProgram :: Part -> Int
- defaultMidiChannel :: Part -> Int
- defaultMidiNote :: Part -> Int
- data BasicPart
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 anInstrument
and aDivision
(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
A division represents a subset of a finite group of performers.
For example a group may be divided into three equal divisions,
designated (0, 3)
, (1, 3)
and (2, 3)
respectively.
divisions :: Int -> [Division] Source
Get all possible divisions for a given divisor in ascending order.
getDivision :: Division -> (Int, Int) Source
Instruments
data Instrument Source
An Instrument
represents the set of all instruments of a given type.
Enum Instrument | |
Eq Instrument | |
Ord Instrument | |
Show Instrument | |
Default Instrument | This instance is quite arbitrary but very handy. |
Parts
A part is a subdivided group of instruments of a given type.
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.
containsSubpart :: Subpart -> Subpart -> Bool Source
solo :: Instrument -> Part Source
tutti :: Instrument -> Part Source
Instruments etc
oboe :: Instrument Source
horn :: Instrument Source
tuba :: Instrument Source
Default values
defaultClef :: Part -> Int Source
defaultMidiProgram :: Part -> Int Source
defaultMidiChannel :: Part -> Int Source
defaultMidiNote :: Part -> Int Source