Module temperley
source code
Corpus file handling for David Temperley's corpora.
David Temperley has various corpora that he has used in his books:
-
The Cognition of Basic Musical Structures (2001)
-
Music and Probability (2007)
He evaluates his own techniques and others' on this data, so it is an
important comparison for me. It's also an important source of annotated
data, aside for my own small corpus.
This module provides utilities for reading in the corpus files and
representing the data internally.
The data formats are described in Temperley's documentation for the
programs that make up Melisma.
Note:
This implementation is not intended to be complete. It may not
handle all types of input that Temperley describes. I'm just
implementing things as I need them.
Author:
Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>
|
|
Event
Superclass of all events that occur in the data.
|
|
|
TPCNoteEvent
Tonal pitch-class note, found in TPC files and chord files.
|
|
|
BeatEvent
A beat identifier, giving a time of occurrence and a beat level.
|
|
|
ChordEvent
A chord, identified just by its start time, end time and root.
|
|
|
DataSequence
Data structure to store a list of events read in from a corpus
file.
|
|
|
InputError
|
|
|
_EVENTS = {'Beat': <class 'jazzparser.data.corpora.temperley.B...
|
|
|
__package__ = 'jazzparser.data.corpora'
|
|
Creates a new DataSequence to represent the data in a file.
- Parameters:
infile (str or open file object) - filename or file object. Filename may be the path to the file or
the path within the corpus.
|
_EVENTS
- Value:
{'Beat': <class 'jazzparser.data.corpora.temperley.BeatEvent'>,
'Chord': <class 'jazzparser.data.corpora.temperley.ChordEvent'>,
'TPCNote': <class 'jazzparser.data.corpora.temperley.TPCNoteEvent'>}
|
|