music-score-1.6: Musical score and part representation.

Portabilitynon-portable (TF,GNTD)
Safe HaskellNone




Provides functions for manipulating parts.


Part representation

type family Part a :: *Source

Associated part type. Should normally implement Ord and Show.

class HasPart a whereSource

Class of types with an associated part.

The part type can be any ordered type. A Show instance is also required from printing the name of the part in output.


getPart :: a -> Part aSource

Get the voice of the given note.

setPart :: Part a -> a -> aSource

Set the voice of the given note.

modifyPart :: (Part a -> Part a) -> a -> aSource

Modify the voice of the given note.

type HasPart' a = (Show (Part a), Ord (Part a), Default (Part a), HasPart a)Source

Like HasPart, but enforces the part to be ordered. This is usually required for part separation and traversal.

newtype PartT n a Source




getPartT :: (n, a)


Typeable2 PartT 
Monoid n => Monad (PartT n) 
Functor (PartT n) 
Monoid n => Applicative (PartT n) 
Comonad (PartT n) 
(Enum v, Bounded a) => Bounded (PartT v a) 
(Enum v, Enum a) => Enum (PartT v a) 
(Eq n, Eq a) => Eq (PartT n a) 
(Enum v, Ord v, Real a, Enum a, Integral a) => Integral (PartT v a) 
(Enum v, Eq v, Num a) => Num (PartT v a) 
(Ord n, Ord a) => Ord (PartT n a) 
(Enum v, Ord v, Num a, Ord a, Real a) => Real (PartT v a) 
(Show n, Show a) => Show (PartT n a) 
Semigroup a => Semigroup (PartT n a) 
(IsDynamics a, Enum n) => IsDynamics (PartT n a) 
(IsPitch a, Enum n) => IsPitch (PartT n a) 
Reversible a => Reversible (PartT p a) 
HasGetPitch a => HasGetPitch (PartT n a) 
HasPart (PartT n a) 
Tiable a => Tiable (PartT n a) 
HasChord a => HasChord (PartT n a) 
HasDynamic a => HasDynamic (PartT n a) 
HasArticulation a => HasArticulation (PartT n a) 
HasSlide a => HasSlide (PartT n a) 
HasHarmonic a => HasHarmonic (PartT n a) 
HasText a => HasText (PartT n a) 
HasTremolo a => HasTremolo (PartT n a) 
HasMidi a => HasMidi (PartT n a) 
HasLilypond a => HasLilypond (PartT n a) 
HasMusicXml a => HasMusicXml (PartT n a) 
HasSetPitch a b => HasSetPitch (PartT n a) (PartT n b) 

getParts :: (Foldable t, HasPart' a) => t a -> [Part a]Source

Get all parts in the given score. Returns a list of parts.

 Score a -> [Part]