Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | bash@cs.uu.nl, jpm@cs.ox.ac.uk |
Safe Haskell | Safe-Inferred |
Summary: A set of types and classes for representing musical time, mainly (but not necessarily) in the context of recognising chords from an arbitrary audio source.
- type ChordAnnotation = [TimedData ProbChord]
- data ProbChordSeg = Segment {}
- data ProbChord = ProbChord {
- chordLab :: ChordLabel
- prob :: NumData
- data ChordCand = ChordCand {}
- data TimedData a = TimedData {
- getData :: a
- getTimeStamps :: [BarTime]
- data Beat
- data BarTime
- type BarTimeTrackData = [BarTime]
- type NumData = Double
- data AudioFeat = AudioFeat {}
- type ChordinoData = [ChordinoLine]
- data ChordinoLine = ChordinoLine {}
- type KeyStrengthData = ChordinoData
- type BeatTrackerData = [NumData]
- type BeatChroma = TimedData [ChordinoLine]
- type ChordStruct = [NumData]
- timedData :: a -> NumData -> NumData -> TimedData a
- timedDataBT :: a -> BarTime -> BarTime -> TimedData a
- getBarTime :: TimedData a -> BarTime
- getBeat :: TimedData a -> Beat
- onset :: TimedData a -> NumData
- offset :: TimedData a -> NumData
- setData :: TimedData a -> b -> TimedData b
- getBeatTrack :: BarTimeTrackData -> BeatTrackerData
- concatTimedData :: a -> TimedData a -> TimedData a -> TimedData a
- nextBeat :: Beat -> Beat
- prevBeat :: Beat -> Beat
- updateTPChord :: (ChordLabel -> ChordLabel) -> TimedData ProbChord -> TimedData ProbChord
- dropProb :: [TimedData ProbChord] -> [TimedData ChordLabel]
- dropTimed :: [TimedData a] -> [a]
- timeStamp :: BarTime -> NumData
- beat :: BarTime -> Beat
Datatypes
Types for representing Chords and their probabilities
type ChordAnnotation = [TimedData ProbChord]Source
A chord annotation consists of a list with chords and segment boundaries.
data ProbChordSeg Source
Clustering ProbChord
s in a collection of chords that share a key
Combines a ChordLabel
with a probability.
ProbChord | |
|
A chord candidate: an intermediate datatype that matches shorthand, chord structure and root note (plus inversion)
Representing musical time
A datatype that wraps around an arbitrary datatype, adding (in this order)
a Beat
, an onset, and an offset.
TimedData | |
|
For now, we fix the number of available beats to four, because this is also hard-coded into the bar and beat-tracker.
Combines a Beat
and a timestamp
type BarTimeTrackData = [BarTime]Source
A type synonym is defined for our main numerical representation, this allows us to easily change the precision.
Representing raw audio data
Groups the three types of VAMP plug-in data: ChordinoData
,
BarTimeTrackData
, and KeyStrengthData
. See for more information:
type ChordinoData = [ChordinoLine]Source
type BeatTrackerData = [NumData]Source
type BeatChroma = TimedData [ChordinoLine]Source
type ChordStruct = [NumData]Source
A chord template is list of NumData
s
Functions
Data access
getBarTime :: TimedData a -> BarTimeSource
Returns the start time stamp
Type conversion and other utilities
getBeatTrack :: BarTimeTrackData -> BeatTrackerDataSource
Converts BarTimeTrackData
into BeatTrackerData
concatTimedData :: a -> TimedData a -> TimedData a -> TimedData aSource
nextBeat :: Beat -> BeatSource
returns the next beat, e.g. nextBeat Two = Three
.
Following the (current) definition of Beat
, we still assume 4/4, in the
future this function should also have the meter as an argument.
updateTPChord :: (ChordLabel -> ChordLabel) -> TimedData ProbChord -> TimedData ProbChordSource
dropProb :: [TimedData ProbChord] -> [TimedData ChordLabel]Source
drops the probabilties paired with chordlabels (in a list of ProbChord
s)
and returns a list of ChordLabel
s