Skip to main content

Module clercq_temperley

Module clercq_temperley 

Source
Expand description

The de Clercq-Temperley analyses of the rock corpus: music21’s romanText.clercqTemperley.

A song is a handful of rules, each a line of its own. Vr: I | IV | I | V | names the verse’s chords a measure at a time, and the last rule, S:, plays the song through by naming the others – S: [G] $In $Vr $Vr $Ch. A rule may expand another ($VP*2), repeat a measure of its own (|*4), say the key or the meter in brackets ([G], [3/4]), repeat the chord before it with a dot, rest a measure with an R, and carry a comment after a %. The first line is the title, also written after a %.

from_clercq_temperley reads one into a part of RomanNumerals, which is music21’s CTSong.toPart: a measure for each the rules name, its chords sharing the bar equally, the figure of each written under it as a lyric and the name of the rule that brought it under the first chord of its section. A chord repeated across a barline is tied to the one before it rather than struck again.

The format is the rock corpus’s, documented at https://rockcorpus.midside.com. The library reads text, not files, so a .clt file is the caller’s to read.

Structs§

CtLabels
What is written under the chords as a song is read: music21’s labelRomanNumerals and labelSubsectionsOnScore, both on.
CtRule
One rule of a song: music21’s CTRule, a line of the text.
CtSong
A song as its text says: music21’s CTSong.
MeasureGroup
One group of a rule’s text: music21’s (content, sep, numReps).

Enums§

GroupKind
What a group of a rule’s text stands for.

Functions§

fixup_chord_atom
A figure as music21 reads one: music21’s fixupChordAtom, which reads the lab’s x as a diminished chord, its h as a half-diminished one and, on a minor degree, its a as an augmented one.
from_clercq_temperley
A song read into a part: music21’s CTSong(text).toPart().
from_clercq_temperley_with
The same, saying what to write under the chords.
is_same
Whether two chords sound the same notes, which is what decides a tie: music21’s isSame, comparing the pitches by name and octave.