Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | W. Bas de Haas <bash@cs.uu.nl> |
Safe Haskell | Safe-Inferred |
Summary: Billboard files can contain a variety of annoatations. This module aims at representing these as Haskell types
- data Annotation
- data Label
- = Struct Char Int
- | Instr Instrument
- | Anno Description
- | Modulation Root
- data Instrument
- = Guitar
- | Voice
- | Violin
- | Banjo
- | Synthesizer
- | Saxophone
- | Flute
- | Drums
- | Trumpet
- | Piano
- | Harmonica
- | Organ
- | Keyboard
- | Trombone
- | Electricsitar
- | Pennywhistle
- | Tenorsaxophone
- | Whistle
- | Oboe
- | Tambura
- | Horns
- | Clarinet
- | Electricguitar
- | Tenorhorn
- | Percussion
- | Rhythmguitar
- | Hammondorgan
- | Harpsichord
- | Cello
- | Acousticguitar
- | Bassguitar
- | Strings
- | SteelDrum
- | Vibraphone
- | Bongos
- | Steelguitar
- | Horn
- | Sitar
- | Barisaxophone
- | Accordion
- | Tambourine
- | Kazoo
- | UnknownInstr String
- data Description
- = Chorus
- | Intro
- | Outro
- | Bridge
- | Interlude
- | Solo
- | Fadeout
- | Fadein
- | Prechorus
- | Maintheme
- | Keychange
- | Secondarytheme
- | Ending
- | PhraseTrans
- | Instrumental
- | Coda
- | Transition
- | PreVerse
- | Vocal
- | Talking
- | TalkingEnd
- | Silence
- | Applause
- | Noise
- | SongEnd
- | ModulationSeg
- | PreIntro
- | Chords
- | Repeat Int
- | Verse (Maybe Int)
- | InterpolationInsert
- | UnknownAnno String
- isStruct :: Label -> Bool
- isStart :: Annotation -> Bool
- isUnknown :: Annotation -> Bool
- isRepeat :: Annotation -> Bool
- isEndAnno :: Annotation -> Bool
- isFirstChord :: Annotation -> Bool
- isLastChord :: Annotation -> Bool
- getRepeats :: Annotation -> Int
- getLabel :: Annotation -> Label
Types for storing annotations encountered in the Billboard dataset
data Annotation Source
an Annotation
occurs either at the start or at the end of a chord
sequence line.
All annotations contain information we term Label
Struct Char Int | denoting A .. Z and the nr of primes (') |
Instr Instrument | |
Anno Description | |
Modulation Root |
data Instrument Source
Representing musical instruments
Guitar | |
Voice | |
Violin | |
Banjo | |
Synthesizer | |
Saxophone | |
Flute | |
Drums | |
Trumpet | |
Piano | |
Harmonica | |
Organ | |
Keyboard | |
Trombone | |
Electricsitar | |
Pennywhistle | |
Tenorsaxophone | |
Whistle | |
Oboe | |
Tambura | |
Horns | |
Clarinet | |
Electricguitar | |
Tenorhorn | |
Percussion | |
Rhythmguitar | |
Hammondorgan | |
Harpsichord | |
Cello | |
Acousticguitar | |
Bassguitar | |
Strings | |
SteelDrum | |
Vibraphone | |
Bongos | |
Steelguitar | |
Horn | |
Sitar | |
Barisaxophone | |
Accordion | |
Tambourine | |
Kazoo | |
UnknownInstr String | a catch all description for unrecognised instruments |
data Description Source
Representing typical structural segementation labels
Chorus | |
Intro | |
Outro | |
Bridge | |
Interlude | |
Solo | |
Fadeout | |
Fadein | |
Prechorus | |
Maintheme | |
Keychange | |
Secondarytheme | |
Ending | |
PhraseTrans | |
Instrumental | |
Coda | |
Transition | |
PreVerse | |
Vocal | |
Talking | |
TalkingEnd | |
Silence | |
Applause | |
Noise | |
SongEnd | |
ModulationSeg | |
PreIntro | |
Chords | |
Repeat Int | |
Verse (Maybe Int) | |
InterpolationInsert | a chord inserted by the posprocessing interpolation |
UnknownAnno String | a catch all description for unrecognised descriptions |
Utilities
Tests
isStruct :: Label -> BoolSource
Returns True if the Annotation
annotates a structural segmentation label
isStart :: Annotation -> BoolSource
Returns True if the Annotation
occurs at the start of a line
isUnknown :: Annotation -> BoolSource
Returns True if the Annotation
isRepeat :: Annotation -> BoolSource
Returns True if the Annotation
represents a repeat.
isEndAnno :: Annotation -> BoolSource
Returns True if the Annotation
represents the end of a piece.
isFirstChord :: Annotation -> BoolSource
Returns True if the Annotation
marks the start of a chord sequence
isLastChord :: Annotation -> BoolSource
Returns True if the Annotation
marks the end of a chord sequence
Data access
getRepeats :: Annotation -> IntSource
Returns the number of repeats represented by this Annotation
. If the
Annotation
describes something completely different (say Electricsitar
)
it will return 1.
getLabel :: Annotation -> LabelSource
Returns the Label
of an Annotation