| Portability | non-portable |
|---|---|
| Stability | experimental |
| Maintainer | bash@cs.uu.nl, jpm@cs.ox.ac.uk |
| Safe Haskell | None |
HarmTrace.Base.ChordTokenizer
Description
Summary: Some general parsing utilities used for parsing textual chord representations.
- parseChordSeq :: String -> (PieceLabel, [Error LineColPos])
- pChord :: Parser ChordLabel
- pShorthand :: Parser Shorthand
- pSongAbs :: Parser PieceLabel
- pRoot :: Parser Root
- pAdditions :: Parser [Addition]
- pAddition :: Parser Addition
- pKey :: Parser Key
Top level parser
parseChordSeq :: String -> (PieceLabel, [Error LineColPos])Source
Top level parser that parsers a string into a PieceLabel and a posibly
empty list of errors
Parsing (elements of) chords
pChord :: Parser ChordLabelSource
Parses a ChordLabel in Harte et al. syntax including possible additions,
and removal of chord additions. If a chord has no Shorthand, the Degree
list (if any) is analysed and depending on the Triad (if any) a
Maj, Min,Aug, or Dim Shorthand is stored. By default all the
duration stored in every Chord is 1 (where the unit is application
dependend, often these are beats, but they can also be eightnotes)
pShorthand :: Parser ShorthandSource
Parses a shorthand following Harte et al. syntax, but also the shorthands
added to the Billboard dataset, e.g. maj, min, or 9.