Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
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
- flute :: Instrument
- oboe :: Instrument
- corAnglais :: Instrument
- clarinet :: Instrument
- bassoon :: Instrument
- frenchHorn :: Instrument
- trumpet :: Instrument
- trombone :: Instrument
- tuba :: Instrument
- timpani :: Instrument
- piano :: Instrument
- violin :: Instrument
- viola :: Instrument
- cello :: Instrument
- bass :: Instrument
- tubularBells :: 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 -> BoolSource
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 -> BoolSource
solo :: Instrument -> PartSource
tutti :: Instrument -> PartSource
Instruments etc
Default values
defaultClef :: Part -> IntSource
defaultMidiProgram :: Part -> IntSource
defaultMidiChannel :: Part -> IntSource
defaultMidiNote :: Part -> IntSource