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

Copyright(c) Hans Hoglund 2012-2014
LicenseBSD-style
Maintainerhans@hanshoglund.se
Stabilityexperimental
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone
LanguageHaskell2010

Music.Score.Export.Lilypond

Contents

Description

 

Synopsis

Lilypond backend

class HasLilypondInstrument a where Source

Extract instrument info as per Music.Part This is really crude, needs rethinking!

Methods

getLilypondClef :: a -> Int Source

data Lilypond Source

A token to represent the Lilypond backend.

Instances

HasBackend Lilypond 
HasBackendNote Lilypond Double 
HasBackendNote Lilypond Float 
HasBackendNote Lilypond Int 
HasBackendNote Lilypond Integer 
HasBackendNote Lilypond a => HasBackendNote Lilypond [a] 
Integral a => HasBackendNote Lilypond (Ratio a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (Sum a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (Product a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (Behavior a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (TieT a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (SlideT a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (TextT a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (HarmonicT a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (TremoloT a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (ColorT a) 
(HasDynamicNotation a b c, HasArticulationNotation c d e, (~) * (Part e) (Part c), HasOrdPart a, Transformable a, Semigroup a, Tiable e, HasOrdPart c, Show (Part c), HasLilypondInstrument (Part c), Satisfied) => HasBackendScore Lilypond (Score a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (PartT n a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (DynamicT DynamicNotation a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (ArticulationT ArticulationNotation a) 
type BackendMusic Lilypond 
type BackendNote Lilypond 
type BackendScore Lilypond 
type BackendContext Lilypond = LyContext 
type BackendScoreEvent Lilypond (Score a) = SetArticulation ArticulationNotation (SetDynamic DynamicNotation a) 

data LyContext a Source

Context passed to the note export. Includes duration and note/rest distinction.

Constructors

LyContext Duration (Maybe a) 

type HasLilypond a = (HasBackendNote Lilypond (BackendScoreEvent Lilypond a), HasBackendScore Lilypond a) Source

Constraint for types that has a Lilypond representation.

Converting to Lilypond

toLilypond :: HasLilypond a => a -> LyMusic Source

Convert a score to a Lilypond representation.

toLilypondString :: HasLilypond a => a -> String Source

Convert a score to a Lilypond string.

Lilypond I/O

showLilypond :: HasLilypond a => a -> IO () Source

Convert a score to a Lilypond representaiton and print it on the standard output.

openLilypond :: HasLilypond a => a -> IO () Source

Typeset a score using Lilypond and open it. (This is simple wrapper around writeLilypond that may not work well on all platforms.)

writeLilypond :: HasLilypond a => FilePath -> a -> IO () Source

Convert a score to a Lilypond representation and write to a file.

Customize Lilypond backend

openLilypond' :: HasLilypond a => LilypondOptions -> a -> IO () Source

Typeset a score using Lilypond and open it. (This is simple wrapper around writeLilypond that may not work well on all platforms.)

writeLilypond' :: HasLilypond a => LilypondOptions -> FilePath -> a -> IO () Source

Convert a score to a Lilypond representation and write to a file.