Skip to main content

Module tsv

Module tsv 

Source
Expand description

The tabular format for harmonic analysis the Digital and Cognitive Musicology Lab annotates its corpora in: music21’s romanText.tsvConverter.

A DCML table is one row a chord: the measure and the beat it falls on, the global and local keys, and the chord in parts – the numeral, the form, the figured bass, the added tones and the degree it is read in – beside the label the annotator wrote. from_tsv reads a table into a score of RomanNumerals and to_tsv writes one back out.

The two standards the lab has published are both read: version 1 as the Annotated Beethoven Corpus was first released, and version 2 as it is now, whose columns are named differently and whose labels carry the added tones in parentheses. Version says which.

The two notations differ in more than their columns, and the swaps are music21’s: a half-diminished chord is % there and ø here, a seventh says its quality there and not here, a minor key’s degrees are written in upper case there where music21 writes the mode’s own, and the added tones of version 2 become music21’s [no5][add6] brackets.

Structs§

TabChord
One row of a DCML table, read: music21’s TabChord and TabChordV2.

Enums§

Direction
Which way a label is being read: music21’s direction.
Version
Which of the lab’s two standards a table is written in.

Functions§

character_swaps
The swaps between the two notations: music21’s characterSwaps.
figured_bass_of
The figured bass the lab writes, which is music21’s figure from its first digit on: M43 is 43, and a figure with no digit in it says nothing.
form_of
The form column for a numeral: music21’s getForm, which reads it off the figure – % for a half-diminished chord, o for a diminished one, +M for an augmented major seventh, + for an augmented chord and M for a major seventh.
from_tsv
A DCML table read as a score of one part: music21’s TsvHandler.toM21Stream, which prepares the measures from the table’s own measure numbers and meters and then puts each chord in the measure it falls in.
handle_added_tones
A label’s parentheses turned into music21’s brackets: music21’s handleAddedTones.
is_minor
Whether a key is minor, which the lab says by writing it in lower case: music21’s isMinor.
local_key
The local key in its own terms: music21’s getLocalKey, which reads a degree against the global key and answers the key it names – V of G is D, and ii of C is d.
local_key_as_roman
The degree one key stands on in another: music21’s localKeyAsRn, which is how a table says where the music has gone – C major is the VI of e minor.
secondary_key
The key a secondary degree establishes: music21’s getSecondaryKey, which reads the part after the slash of a V/vi in the local key.
to_tsv
A score written as one of the lab’s tables: music21’s M21toTSV, which writes a row for every numeral of the score, in the order a walk of it meets them.
to_tsv_with_extra
A score written as a table, with the cells music21 keeps on each numeral’s editorial given back: one list per chord the walk meets, in that order, which for a score from_tsv read is the order of the table’s own rows.
tsv_to_chords
The rows of a table, each read: music21’s TsvHandler.tsvToChords.