Copyright | (c) Hans Hoglund 2012 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
A Haskell representation of MusicXML. You may want to use the Data.Music.MusicXml.Simple module to generate the representation.
For an introduction to MusicXML, see http://www.makemusic.com/musicxml/tutorial.
- data Score
- = Partwise ScoreAttrs ScoreHeader [(PartAttrs, [(MeasureAttrs, Music)])]
- | Timewise ScoreAttrs ScoreHeader [(MeasureAttrs, [(PartAttrs, Music)])]
- data ScoreHeader = ScoreHeader (Maybe String) (Maybe String) (Maybe Identification) PartList
- data Identification = Identification [Creator]
- data Creator = Creator String String
- data Defaults = Defaults
- data ScoreAttrs = ScoreAttrs [Int]
- data PartAttrs = PartAttrs String
- data MeasureAttrs = MeasureAttrs Int
- newtype PartList = PartList {
- getPartList :: [PartListElem]
- data PartListElem
- newtype Music = Music {}
- data MusicElem
- data Attributes
- = Divisions Divs
- | Key Fifths Mode
- | Time TimeSignature
- | Staves Natural
- | PartSymbol
- | Instruments Natural
- | Clef ClefSign Line
- | StaffDetails
- | Transpose
- | Directive
- | MeasureStyle
- data TimeSignature
- data ClefSign
- data Note
- data FullNote
- type IsChord = Bool
- noChord :: IsChord
- type Tie = StartStop
- noTies :: [Tie]
- data NoteProps = NoteProps {
- noteInstrument :: Maybe String
- noteVoice :: Maybe Natural
- noteType :: Maybe NoteType
- noteDots :: Natural
- noteAccidental :: Maybe (Accidental, Bool, Bool)
- noteTimeMod :: Maybe (Natural, Natural)
- noteStem :: Maybe StemDirection
- noteNoteHead :: Maybe (NoteHead, Bool, Bool)
- noteNoteHeadText :: Maybe String
- noteStaff :: Maybe Natural
- noteBeam :: Maybe (Level, BeamType)
- noteNotations :: [Notation]
- noteLyrics :: [Lyric]
- class HasNoteProps a where
- modifyNoteProps :: (NoteProps -> NoteProps) -> a -> a
- data Notation
- = Tied StartStopContinue
- | Slur Level StartStopContinue
- | Tuplet Level StartStopContinue
- | Glissando Level StartStopContinue LineType (Maybe String)
- | Slide Level StartStopContinue LineType (Maybe String)
- | Ornaments [(Ornament, [Accidental])]
- | Technical [Technical]
- | Articulations [Articulation]
- | DynamicNotation Dynamics
- | Fermata FermataSign
- | Arpeggiate
- | NonArpeggiate
- | AccidentalMark Accidental
- | OtherNotation String
- data Articulation
- data Ornament
- = TrillMark
- | Turn
- | DelayedTurn
- | InvertedTurn
- | DelayedInvertedTurn
- | VerticalTurn
- | Shake
- | WavyLine
- | Mordent
- | InvertedMordent
- | Schleifer
- | Tremolo Natural
- | OtherOrnament String
- data Technical
- = UpBow
- | DownBow
- | Harmonic
- | OpenString
- | ThumbPosition
- | Fingering
- | Pluck
- | DoubleTongue
- | TripleTongue
- | Stopped
- | SnapPizzicato
- | Fret
- | String
- | HammerOn
- | PullOff
- | Bend
- | Tap
- | Heel
- | Toe
- | Fingernails
- | Hole
- | Arrow
- | Handbell
- | OtherTechnical String
- data Direction
- = Rehearsal String
- | Segno
- | Words String
- | Coda
- | Crescendo StartStop
- | Diminuendo StartStop
- | Dynamics Dynamics
- | Dashes Level StartStop
- | Bracket
- | Pedal StartStopChange
- | Metronome NoteVal Bool Tempo
- | OctaveShift
- | HarpPedals
- | Damp
- | DampAll
- | EyeGlasses
- | StringMute
- | Scordatura
- | Image
- | PrincipalVoice
- | AccordionRegistration
- | Percussion
- | OtherDirection String
- data Lyric = Lyric
- type Pitch = (PitchClass, Maybe Semitones, Octaves)
- type DisplayPitch = (PitchClass, Octaves)
- data PitchClass
- newtype Semitones = Semitones {}
- noSemitones :: Maybe Semitones
- newtype Octaves = Octaves {
- getOctaves :: Int
- newtype Fifths = Fifths {}
- newtype Line = Line {}
- data Mode
- data Accidental
- = DoubleFlat
- | Flat
- | Natural
- | Sharp
- | DoubleSharp
- type Duration = Divs
- type NoteType = (NoteVal, Maybe NoteSize)
- newtype Divs = Divs {}
- newtype NoteVal = NoteVal {}
- data NoteSize
- newtype Beat = Beat {}
- newtype BeatType = BeatType {
- getBeatType :: Int
- data Dynamics
- data StemDirection
- = StemDown
- | StemUp
- | StemNone
- | StemDouble
- data NoteHead
- = SlashNoteHead
- | TriangleNoteHead
- | DiamondNoteHead
- | SquareNoteHead
- | CrossNoteHead
- | XNoteHead
- | CircleXNoteHead
- | InvertedTriangleNoteHead
- | ArrowDownNoteHead
- | ArrowUpNoteHead
- | SlashedNoteHead
- | BackSlashedNoteHead
- | NormalNoteHead
- | ClusterNoteHead
- | CircleDotNoteHead
- | LeftTriangleNoteHead
- | RectangleNoteHead
- | NoNoteHead
- data LineType
- newtype Level = Level {
- getLevel :: Max8
- data BeamType
- type StartStop = StartStopContinueChange
- type StartStopChange = StartStopContinueChange
- type StartStopContinue = StartStopContinueChange
- data StartStopContinueChange
- toXml :: Score -> Element
- showXml :: Score -> String
Score
Partwise ScoreAttrs ScoreHeader [(PartAttrs, [(MeasureAttrs, Music)])] | |
Timewise ScoreAttrs ScoreHeader [(MeasureAttrs, [(PartAttrs, Music)])] |
data ScoreHeader Source
WriteMusicXml ScoreHeader | |
Default ScoreHeader |
Part list
data PartListElem Source
Music
Attributes
data Attributes Source
Divisions Divs | |
Key Fifths Mode | |
Time TimeSignature | |
Staves Natural | |
PartSymbol | |
Instruments Natural | |
Clef ClefSign Line | |
StaffDetails | |
Transpose | |
Directive | |
MeasureStyle |
Notes
Note FullNote Duration [Tie] NoteProps | |
CueNote FullNote Duration NoteProps | |
GraceNote FullNote [Tie] NoteProps |
WriteMusicXml Note | |
Default Note | |
HasNoteProps Note |
WriteMusicXml FullNote | |
Default FullNote |
NoteProps | |
|
WriteMusicXml NoteProps | |
Default NoteProps |
class HasNoteProps a where Source
modifyNoteProps :: (NoteProps -> NoteProps) -> a -> a Source
Notations
data Articulation Source
Directions
Lyrics
Basic types
Pitch
type DisplayPitch = (PitchClass, Octaves) Source
data PitchClass Source
Enum PitchClass | |
Eq PitchClass | |
Ord PitchClass | |
Show PitchClass | |
IsPitch DisplayPitch | |
IsPitch Pitch |
Semitones | Semitones, i.e 100 cent |
Octaves | Octaves, i.e. 1200 cent |
|
data Accidental Source
Time
NoteVal | Notated time in fractions, in |
BeatType | Time denominator |
|