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

Safe HaskellNone

Perform.Lilypond.Lilypond

Contents

Description

Convert from Score events to a lilypond score.

Synopsis

config

paper_config :: [Text] Source #

Lilypond code inserted inside the toplevel paper block.

output

ly_file :: Types.Config -> Title -> [Movement] -> Lazy.Text Source #

Format a list Movements into a complete lilypond file.

write_empty_staff :: Types.StaffConfig -> [Process.VoiceLy] -> Output () Source #

Convert ly code to all hidden rests, and emit an empty staff with a bass clef.

(<+>) :: Text -> Text -> Text infixr 6 Source #

convert events

data StaffGroup Source #

If the staff group has >1 staff, it is bracketed as a grand staff.

convert_staff_groups :: Types.Config -> Types.Time -> [Types.Event] -> Either Text [StaffGroup] Source #

Group a stream of events into individual staves based on instrument, and for keyboard instruments, left or right hand. Then convert each staff of Events to Notes, divided up into measures.

split_events :: [Types.Event] -> [(Instrument, [[Types.Event]])] Source #

Split events by instrument, and if they have EnvKey.hand, further split into right and left hand.

staff_group :: Types.Config -> Types.Time -> [Meter.Meter] -> Instrument -> [[Types.Event]] -> Either Text StaffGroup Source #

Right hand goes at the top, left hand goes at the bottom. Any other hands go below that. Events that are don't have a hand are assumed to be in the right hand.

movements

split_movements :: [(Types.Time, Title)] -> [Types.Event] -> [(Types.Time, Title, [Types.Event])] Source #

Use the movement break points to group the events by movement. The events are not shifted in time, so each movement has to start at the proper offset. The reason is that certain calls, like tuplet, bake in lilypond code, and it will be wrong if the events change position.

meter

get_meters :: Types.Time -> Types.Time -> [Types.Event] -> Either Text [Meter.Meter] Source #

Extract Meters from the Events, and emit one per measure.