fadno-1.1.9.1: Minimal library for music generation and notation
Safe HaskellNone
LanguageHaskell2010

Fadno.Xml

Synopsis

Score and Part

xmlScore :: String -> String -> [(CmpPart, ScorePart)] -> ScorePartwise Source #

Partwise score.

xmlPart :: MeasureList f => String -> String -> f Measure -> (CmpPart, ScorePart) Source #

Render partwise part and score parts.

xmlPartClef :: MeasureList f => String -> String -> Clef -> f Measure -> (CmpPart, ScorePart) Source #

Render partwise part with clef.

Bars

xmlMeasure :: Traversable t => String -> t ChxMusicData -> Measure Source #

Partwise measure.

xmlPrependMeasureData :: MeasureList f => ChxMusicData -> f Measure -> f Measure Source #

Add datum to beginning of first measure

xmlPrependMeasureDatas :: MeasureList f => [ChxMusicData] -> f Measure -> f Measure Source #

Add data to beginning of first measure

xmlAppendMeasureData :: MeasureList f => ChxMusicData -> f Measure -> f Measure Source #

Add datum to beginning of last measure

xmlAppendMeasureDatas :: MeasureList f => [ChxMusicData] -> f Measure -> f Measure Source #

Add data to beginning of last measure

xmlClef :: (ApplyMonoid c ChxMusicData, HasClef a) => a -> c ChxMusicData Source #

Clef in bar

xmlClef' :: Clef -> ChxMusicData Source #

Clef alone.

xmlKeySignature :: Spelling -> ChxMusicData Source #

toFifths :: Spelling -> Fifths Source #

xmlRepeats :: (ApplyMonoid t ChxMusicData, HasRepeats a) => a -> t ChxMusicData Source #

Measure repeats for a single measure.

xmlRepeats' :: (HasRepeats a, MeasureList f) => a -> f Measure -> f Measure Source #

Measure repeats bracketing existing measures.

xmlBarline :: (ApplyMonoid c ChxMusicData, HasBarline a) => a -> c ChxMusicData Source #

Measure barlines.

xmlBarline' :: ApplyMonoid c ChxMusicData => Bool -> HasBarline a => a -> c ChxMusicData Source #

Measure barlines; flag determines if double bars are rendered to left (False) or right (True).

xmlTimeSig :: (ApplyMonoid t ChxMusicData, HasTimeSignature a) => a -> t ChxMusicData Source #

Measure time signature.

xmlRehearsalMark :: (ApplyMonoid t ChxMusicData, HasRehearsalMark a) => a -> t ChxMusicData Source #

Measure rehearsal mark.

xmlDirection :: (ApplyMonoid t ChxMusicData, HasDirection a) => a -> t ChxMusicData Source #

Measure direction.

Notes

xmlNote :: HasNote a (Mono PitchRep) Rational => a -> ChxMusicData Source #

render note/rest as xml

xmlChord :: HasNote a [PitchRep] Rational => a -> [ChxMusicData] Source #

render notes as xml chord or rest.

xmlArticulation :: HasArticulation a => a -> ChxMusicData -> ChxMusicData Source #

Add articulation to note.

xmlTie :: HasTie a => a -> ChxMusicData -> ChxMusicData Source #

Adapt a rendered note to account for tie information. > xmlTie testNote $ xmlChord 128 testNote

xmlBeams :: HasBeams a => a -> ChxMusicData -> ChxMusicData Source #

Add beams, numbering from first beam in list, to note.

xmlVoice :: HasVoice a => a -> ChxMusicData -> ChxMusicData Source #

xmlSlur :: HasSlur a => a -> ChxMusicData -> ChxMusicData Source #

Rendering

renderFile :: EmitXml a => FilePath -> a -> IO () #

renderString :: XmlRep -> String #

renderElement :: XmlRep -> Element #

data Element #

Instances

Instances details
Data Element 
Instance details

Defined in Text.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Element -> c Element

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Element

toConstr :: Element -> Constr

dataTypeOf :: Element -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Element)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Element)

gmapT :: (forall b. Data b => b -> b) -> Element -> Element

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Element -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Element -> r

gmapQ :: (forall d. Data d => d -> u) -> Element -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Element -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Element -> m Element

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Element -> m Element

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Element -> m Element

Show Element 
Instance details

Defined in Text.XML.Light.Types

Methods

showsPrec :: Int -> Element -> ShowS

show :: Element -> String

showList :: [Element] -> ShowS

Node Element 
Instance details

Defined in Text.XML.Light

Methods

node :: QName -> Element -> Element

Node [Element] 
Instance details

Defined in Text.XML.Light

Methods

node :: QName -> [Element] -> Element

Node (Attr, Element) 
Instance details

Defined in Text.XML.Light

Methods

node :: QName -> (Attr, Element) -> Element

Node ([Attr], Element) 
Instance details

Defined in Text.XML.Light

Methods

node :: QName -> ([Attr], Element) -> Element

Node ([Attr], [Element]) 
Instance details

Defined in Text.XML.Light

Methods

node :: QName -> ([Attr], [Element]) -> Element

Internals

convertDurR :: PositiveDivisions -> Rational -> (PositiveDivisions, NoteTypeValue, Int) Source #

Rational duration (ie, '1 % 4' for quarter note) to xml values.

xmlDivisions :: PositiveDivisions Source #

Hardcoded divisions.