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

Copyright(c) Hans Hoglund 2012-2014
LicenseBSD-style
Maintainerhans@hanshoglund.se
Stabilityexperimental
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone
LanguageHaskell2010

Music.Score.Ties

Contents

Description

Provides a representation for tied notes, and a class to split a single note into a pair of tied notes.

Synopsis

Tiable class

class Tiable a where Source

Class of types that can be tied. Ties are added to a score by splitting a single note into two and annotating them with a begin tie and end tie mark respectively.

Minimal definition: toTied, or both beginTie and endTie.

Minimal complete definition

isTieEndBeginning

Methods

beginTie :: a -> a Source

Modify a note to be the first note in a tied note pair.

endTie :: a -> a Source

Modify a note to be the second note in a tied note pair.

toTied :: a -> (a, a) Source

Split a single note into a pair of tied notes.

The first returned element should have the original onset and the second element should have the original offset. Formally

(onset . fst . toTied) a = onset a
(offset . snd . toTied) a = offset a

isTieEndBeginning :: a -> (Bool, Bool) Source

isTieBeginning :: a -> Bool Source

isTieEnd :: a -> Bool Source

Instances

newtype TieT a Source

Constructors

TieT 

Fields

getTieT :: ((Any, Any), a)
 

Instances

Monad TieT 
Functor TieT 
Applicative TieT 
Foldable TieT 
Comonad TieT 
HasBackendNote NoteList a => HasBackendNote NoteList (TieT a) 
HasBackendNote Midi a => HasBackendNote Midi (TieT a) 
HasBackendNote SuperCollider a => HasBackendNote SuperCollider (TieT a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (TieT a) 
HasBackendNote MusicXml a => HasBackendNote MusicXml (TieT a) 
Bounded a => Bounded (TieT a) 
Enum a => Enum (TieT a) 
Eq a => Eq (TieT a) 
Floating a => Floating (TieT a) 
Fractional a => Fractional (TieT a) 
(Real a, Enum a, Integral a) => Integral (TieT a) 
Num a => Num (TieT a) 
Ord a => Ord (TieT a) 
(Num a, Ord a, Real a) => Real (TieT a) 
Show a => Show (TieT a) 
Wrapped (TieT a) 
Semigroup a => Semigroup (TieT a) 
IsPitch a => IsPitch (TieT a) 
IsDynamics a => IsDynamics (TieT a) 
Transformable a => Transformable (TieT a) 
Reversible a => Reversible (TieT a) 
Alterable a => Alterable (TieT a) 
Augmentable a => Augmentable (TieT a) 
Tiable a => Tiable (TieT a) 
HasSlide a => HasSlide (TieT a) 
HasText a => HasText (TieT a) 
HasHarmonic a => HasHarmonic (TieT a) 
HasTremolo a => HasTremolo (TieT a) 
HasColor a => HasColor (TieT a) 
Rewrapped (TieT a) (TieT b) 
HasPitches a b => HasPitches (TieT a) (TieT b) 
HasPitch a b => HasPitch (TieT a) (TieT b) 
HasDynamics a b => HasDynamics (TieT a) (TieT b) 
HasDynamic a b => HasDynamic (TieT a) (TieT b) 
HasArticulations a b => HasArticulations (TieT a) (TieT b) 
HasArticulation a b => HasArticulation (TieT a) (TieT b) 
Typeable (* -> *) TieT 
type SetPitch g (TieT a) = TieT (SetPitch g a) 
type SetDynamic g (TieT a) = TieT (SetDynamic g a) 
type SetArticulation g (TieT a) = TieT (SetArticulation g a) 
type Unwrapped (TieT a) = ((Any, Any), a) 
type Pitch (TieT a) = Pitch a 
type Dynamic (TieT a) = Dynamic a 
type Articulation (TieT a) = Articulation a 

Splitting tied notes in scores

splitTiesAt :: Tiable a => [Duration] -> Voice a -> [Voice a] Source

Split all voice into bars, using the given bar durations. Music that does not fit into the given durations is discarded.

Events that cross a barlines are split into tied notes.