Copyright | (c) Hans Hoglund 2012-2015 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | non-portable (TF,GNTD) |
Safe Haskell | None |
Language | Haskell2010 |
Provides various representaitons of musical instruments, subdivisions and parts.
- module Music.Parts.Division
- module Music.Parts.Subpart
- module Music.Parts.Solo
- module Music.Parts.Instrument
- data Part = Part Solo Instrument Subpart
- _solo :: Lens' Part Solo
- _subpart :: Lens' Part Subpart
- _instrument :: Lens' Part Instrument
- divide :: Int -> Part -> [Part]
- containsPart :: Part -> Part -> Bool
- smallestPart :: Part -> Part -> Part
- smallestSubpart :: Subpart -> Subpart -> Subpart
- largestPart :: Part -> Part -> Part
- largestSubpart :: Subpart -> Subpart -> Subpart
- distinctFrom :: Part -> Part -> Bool
- allDistinct :: [Part] -> 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
- piccoloFlutes :: Part
- flutes :: Part
- oboes :: Part
- clarinets :: Part
- bassoons :: Part
- flutes1 :: Part
- flutes2 :: Part
- oboes1 :: Part
- oboes2 :: Part
- clarinets1 :: Part
- clarinets2 :: Part
- horns :: Part
- highHorns :: [Part]
- lowHorns :: [Part]
- trumpets :: Part
- trombones :: Part
- trumpets1 :: Part
- trumpets2 :: Part
- trombones1 :: Part
- trombones2 :: Part
- tubas :: Part
- violins :: Part
- violins1 :: Part
- violins2 :: Part
- violas :: Part
- cellos :: Part
- doubleBasses :: Part
- harp :: Part
- defaultClef :: Part -> Int
- defaultMidiProgram :: Part -> Int
- defaultMidiChannel :: Part -> Int
- defaultMidiNote :: Part -> Int
- module Music.Parts.Basic
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
module Music.Parts.Division
module Music.Parts.Subpart
Solo vs. tutti
module Music.Parts.Solo
Instruments
module Music.Parts.Instrument
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.
smallestPart :: Part -> Part -> Part Source
smallestSubpart :: Subpart -> Subpart -> Subpart Source
largestPart :: Part -> Part -> Part Source
largestSubpart :: Subpart -> Subpart -> Subpart Source
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
).
solo :: Instrument -> Part Source
tutti :: Instrument -> Part Source
Instruments etc
oboe :: Instrument Source
horn :: Instrument Source
tuba :: Instrument Source
Ensembles
clarinets1 :: Part Source
clarinets2 :: Part Source
trombones1 :: Part Source
trombones2 :: Part Source
Default values
defaultClef :: Part -> Int Source
defaultMidiProgram :: Part -> Int Source
defaultMidiChannel :: Part -> Int Source
defaultMidiNote :: Part -> Int Source
Basic
module Music.Parts.Basic