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

Perform.Lilypond.Lilypond

Description

Convert from Score events to a lilypond score.

Synopsis

# config

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.

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

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

Constructors

 OutputState Fields

Instances

 # MethodsshowList :: [OutputState] -> ShowS #

# convert events

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

Constructors

 StaffGroup Instrument [[Process.VoiceLy]]

Instances

 # MethodsshowList :: [StaffGroup] -> ShowS # # MethodsformatList :: [StaffGroup] -> Doc 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.

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

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