Package jazzparser :: Package data :: Package corpora :: Module temperley
[hide private]
[frames] | no frames]

Module temperley

source code

Corpus file handling for David Temperley's corpora.

David Temperley has various corpora that he has used in his books:

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>

Classes [hide private]
  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
Functions [hide private]
 
read_file(infile)
Creates a new DataSequence to represent the data in a file.
source code
Variables [hide private]
  _EVENTS = {'Beat': <class 'jazzparser.data.corpora.temperley.B...
  __package__ = 'jazzparser.data.corpora'
Function Details [hide private]

read_file(infile)
Static Method

source code 

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.

Variables Details [hide private]

_EVENTS

Value:
{'Beat': <class 'jazzparser.data.corpora.temperley.BeatEvent'>,
 'Chord': <class 'jazzparser.data.corpora.temperley.ChordEvent'>,
 'TPCNote': <class 'jazzparser.data.corpora.temperley.TPCNoteEvent'>}