Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Derive.Call.GraceUtil

Description

Functions to emit grace-note like things.

Synopsis

standard args

default_grace_dur :: Typecheck.DefaultReal Source #

It's pretty much arbitrary, but this seems ok.

calls

make_grace :: Module.Module -> Doc.Doc -> (NoteDeriver -> NoteDeriver) -> (PassedArgs Score.Event -> [SubT.Event] -> NoteDeriver) -> Generator Note Source #

Make a grace call with the standard arguments.

make_grace_pitch :: Module.Module -> Doc.Doc -> (PassedArgs Score.Event -> [SubT.EventT DeriveT.Pitch] -> NoteDeriver) -> Generator Note Source #

This is like make_grace, but gives you pitches instead of realized events, in case you want to merge them or something.

make_grace_notes Source #

Arguments

:: Maybe ScoreTime 
-> (ScoreTime, ScoreTime)

(start, end)

-> [note]

the last note is the destination

-> DeriveT.Duration 
-> Typecheck.Normalized

placement, see grace_place_doc

-> Deriver [SubT.EventT note] 

attr grace

c_attr_grace Source #

Arguments

:: Map Int Attrs.Attributes

Map intervals in semitones (positive or negative) to attrs.

-> Generator Note 

util

fit_grace_durs :: (Fractional a, Ord a) => Typecheck.Normalized -> Maybe a -> a -> a -> Int -> a -> [(a, a)] Source #

Determine grace note starting times and durations if they are to fit in the given time range, shortening them if they don't fit.

fit_grace Source #

Arguments

:: (Fractional a, Ord a) 
=> Typecheck.Normalized

placement, see grace_place_doc

-> Maybe a 
-> a 
-> a 
-> Int 
-> a 
-> [a] 

fit_before :: (Fractional a, Ord a) => Maybe a -> a -> Int -> a -> [a] Source #

fit_after :: (Fractional a, Ord a) => a -> a -> Int -> a -> [a] Source #