Copyright | (c) Hans Hoglund 2012-2014 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | non-portable (TF,GNTD) |
Safe Haskell | None |
Language | Haskell2010 |
- class HasMusicXmlInstrument a where
- getMusicXmlClef :: a -> Int
- getMusicXmlNumberOfStaves :: a -> Int
- data MusicXml
- data XmlContext a = XmlContext Duration (Maybe a)
- type HasMusicXml a = (HasBackendNote MusicXml (BackendScoreEvent MusicXml a), HasBackendScore MusicXml a)
- toMusicXml :: HasMusicXml a => a -> Score
- toMusicXmlString :: HasMusicXml a => a -> String
- showMusicXml :: HasMusicXml a => a -> IO ()
- openMusicXml :: HasMusicXml a => a -> IO ()
- writeMusicXml :: HasMusicXml a => FilePath -> a -> IO ()
MusicXml backend
class HasMusicXmlInstrument a where Source
Extract instrument info as per Music.Part This is really crude, needs rethinking!
getMusicXmlClef :: a -> Int Source
getMusicXmlNumberOfStaves :: a -> Int Source
A token to represent the MusicXml backend.
data XmlContext a Source
Context passed to the note export. Includes duration and note/rest distinction.
XmlContext Duration (Maybe a) |
Functor XmlContext | |
Foldable XmlContext | |
Traversable XmlContext | |
Eq a => Eq (XmlContext a) | |
Show a => Show (XmlContext a) |
type HasMusicXml a = (HasBackendNote MusicXml (BackendScoreEvent MusicXml a), HasBackendScore MusicXml a) Source
Constraint for types that has a MusicXML representation.
Converting to MusicXml
toMusicXml :: HasMusicXml a => a -> Score Source
Convert a score to a MusicXML score.
toMusicXmlString :: HasMusicXml a => a -> String Source
Convert a score to a MusicXML string.
MusicXml I/O
showMusicXml :: HasMusicXml a => a -> IO () Source
Convert a score to MusicXML string and print it on the standard output.
openMusicXml :: HasMusicXml a => a -> IO () Source
Typeset a score using MusicXML and open it. (This is simple wrapper around
writeMusicXml
that may not work well on all platforms.)
writeMusicXml :: HasMusicXml a => FilePath -> a -> IO () Source
Convert a score to MusicXML and write to a file.