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

Portabilitynon-portable (TF,GNTD)
Stabilityexperimental
Maintainerhans@hanshoglund.se
Safe HaskellNone

Music.Time.Internal.Quantize

Contents

Description

Provides rhythmical quantization.

You generally need not worry about this module, as quantization is handled automatically by HasBackendScore instances.

Warning This modules is poorly named and will probably be split or moved soon.

Synopsis

Rhythm type

data Rhythm a Source

Constructors

Beat Duration a 
Group [Rhythm a] 
Dotted Int (Rhythm a) 
Tuplet Duration (Rhythm a) 

Instances

Functor Rhythm 
Foldable Rhythm 
Eq a => Eq (Rhythm a) 
Show a => Show (Rhythm a) 
Monoid (Rhythm a) 
Semigroup (Rhythm a) 
VectorSpace (Rhythm a) 
AdditiveGroup (Rhythm a) 
HasDuration (Rhythm a) 

mapWithDur :: (Duration -> a -> b) -> Rhythm a -> Rhythm bSource

Quantization

quantize :: Tiable a => [(Duration, a)] -> Either String (Rhythm a)Source

dotMod :: Int -> DurationSource

Return the scaling applied to a note with the given number of dots (i.e. 32, 74 etc).

Utility

drawRhythm :: Show a => Rhythm a -> StringSource