Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Perform.Lilypond.Meter

Contents

Description

Support for rhythmic spelling in different meters.

Synopsis

Documentation

data Meter Source #

Constructors

Meter 

Fields

Instances

find_rank :: Types.Time -> Rank -> Meter -> Maybe Types.Time Source #

Find the time of the rank <= the given one. Rank 0 can never be spanned, so always stop at a rank 0.

measure_time :: Meter -> Types.Time Source #

Duration of a measure, in Time.

type Rank = Int Source #

allowed time

convert_duration :: Meter -> Bool -> Bool -> Types.Time -> Types.Time -> [Types.NoteDuration] Source #

Given a starting point and a duration, emit the list of Durations needed to express that duration.

allowed_time_greedy :: Bool -> Meter -> Types.Time -> Types.Time Source #

Figure out how much time a note at the given position should be allowed before it must tie.

allowed_time_best :: Bool -> Meter -> Types.Time -> Types.Time Source #

The algorithm for note durations is greedy, in that it will seek to find the longest note that doesn't span a beat whose rank is too low. But that results in rests being spelled c4 r2 r4 instead of c4 r4 r2. Unlike notes, all rests are the same. So rests will pick the duration that ends on the lowest rank.