music21.alpha.trecento.cadencebook¶
The file trecento/cadences.xls contains (in a modified TinyNotation format) incipits and cadences for hundreds of trecento ballatas (in a sheet called “fischer_ballata”) and several other works (sanctus, etc.). This module contains methods and classes for working with this encoding, including transforming it into music21 Streams.
AgnusDeiSheet¶
-
class
music21.alpha.trecento.cadencebook.
AgnusDeiSheet
(**keywords)¶
AgnusDeiSheet
bases
AgnusDeiSheet
methods
Methods inherited from TrecentoSheet
:
Ballata¶
-
class
music21.alpha.trecento.cadencebook.
Ballata
(rowvalues=None, rowDescriptions=None)¶ Class representing a fourteenth-century Ballata.
Overrides the locations of the column numbers in which one finds the cadences.
Ballata
bases
Ballata
read-only properties
Read-only properties inherited from TrecentoCadenceWork
:
Ballata
methods
Methods inherited from TrecentoCadenceWork
:
BallataSheet¶
-
class
music21.alpha.trecento.cadencebook.
BallataSheet
(**keywords)¶ shortcut to a worksheet containing all the ballata cadences encoded.
2011-May: over 400 of 460 encoded; unencoded pieces are mostly fragmentary.
BallataSheet
bases
BallataSheet
methods
-
BallataSheet.
makeWork
(rownumber=1)¶
Methods inherited from TrecentoSheet
:
CacciaSheet¶
-
class
music21.alpha.trecento.cadencebook.
CacciaSheet
(**keywords)¶ shortcut to a worksheet containing all the caccia cadences encoded
2011-May: none encoded.
>>> cacciaSheet = alpha.trecento.cadencebook.CacciaSheet()
CacciaSheet
bases
CacciaSheet
methods
Methods inherited from TrecentoSheet
:
CredoSheet¶
-
class
music21.alpha.trecento.cadencebook.
CredoSheet
(**keywords)¶
CredoSheet
bases
CredoSheet
methods
Methods inherited from TrecentoSheet
:
Gloria¶
-
class
music21.alpha.trecento.cadencebook.
Gloria
(rowvalues=None, rowDescriptions=None)¶ Class representing a fourteenth-century Gloria.
Overrides the locations of the column numbers in which one finds the cadences.
Gloria
bases
Gloria
read-only properties
Read-only properties inherited from TrecentoCadenceWork
:
Gloria
methods
Methods inherited from TrecentoCadenceWork
:
GloriaSheet¶
-
class
music21.alpha.trecento.cadencebook.
GloriaSheet
(**keywords)¶ shortcut to a worksheet containing all the known 14th and early 15th c. French, Spanish, and Italian Gloria’s openings of the Et in Terra, Dominus Deus, Qui Tollis, encoded along with the ends of the Cum Sancto and Amen.
2011-August: all encoded except some very fragmentary pieces.
>>> cadenceSpreadSheet = alpha.trecento.cadencebook.GloriaSheet() >>> gloriaNo20 = cadenceSpreadSheet.makeWork(20) >>> incipit = gloriaNo20.incipit >>> incipit.show('text') {0.0} <music21.metadata.Metadata object at 0x...> {0.0} <music21.stream.Part C> {0.0} <music21.stream.Measure 1 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.meter.TimeSignature 2/4> {0.0} <music21.note.Note D> {2.0} <music21.stream.Measure 2 offset=2.0> {0.0} <music21.note.Note D> ... {2.0} <music21.bar.Barline style=final> {0.0} <music21.stream.Part Ct> {0.0} <music21.stream.Measure 1 offset=0.0> {0.0} <music21.clef.BassClef> {0.0} <music21.meter.TimeSignature 2/4> {0.0} <music21.note.Note D> {2.0} <music21.stream.Measure 2 offset=2.0> {0.0} <music21.note.Note F#> ... {16.0} <music21.stream.Measure 9 offset=16.0> {0.0} <music21.note.Note B> {2.0} <music21.bar.Barline style=final> {0.0} <music21.stream.Part T> {0.0} <music21.stream.Measure 1 offset=0.0> {0.0} <music21.clef.BassClef> {0.0} <music21.meter.TimeSignature 2/4> {0.0} <music21.note.Note D> {2.0} <music21.stream.Measure 2 offset=2.0> {0.0} <music21.note.Note D> ... {16.0} <music21.stream.Measure 9 offset=16.0> {0.0} <music21.note.Note E> {2.0} <music21.bar.Barline style=final>
GloriaSheet
bases
GloriaSheet
methods
-
GloriaSheet.
makeWork
(rownumber=1)¶
Methods inherited from TrecentoSheet
:
KyrieSheet¶
-
class
music21.alpha.trecento.cadencebook.
KyrieSheet
(**keywords)¶
KyrieSheet
bases
KyrieSheet
methods
Methods inherited from TrecentoSheet
:
MadrigalSheet¶
-
class
music21.alpha.trecento.cadencebook.
MadrigalSheet
(**keywords)¶ shortcut to a worksheet containing all the madrigal cadences encoded
2011-May: none encoded.
MadrigalSheet
bases
MadrigalSheet
methods
Methods inherited from TrecentoSheet
:
SanctusSheet¶
-
class
music21.alpha.trecento.cadencebook.
SanctusSheet
(**keywords)¶
SanctusSheet
bases
SanctusSheet
methods
Methods inherited from TrecentoSheet
:
TrecentoCadenceWork¶
-
class
music21.alpha.trecento.cadencebook.
TrecentoCadenceWork
(rowvalues=None, rowDescriptions=None)¶ A class representing a work that takes one line in the Trecento Cadence excel workbook
Takes in two lists: one containing a value for each column in the excel spreadsheet and another containing a description for each column (generally, the excel header row)
contains the following attributes:
fisherNum -- the work number assigned by Kurt von Fischer (only applies to pieces discovered before 1956) title -- may contain unicode characters composer -- "." = anonymous encodedVoices -- a string representing the number of voices, a period, then the number of texted voices pmfcVol -- the volume of Polyphonic Music of the Fourteenth Century where the piece might be found (if any) pmfcPageStart -- the initial page number in that PMFC volume pmfcPageEnd -- the final page number timeSignBegin -- the starting time signature (as a string) for the piece entryNotes -- comments
attributes shared with all members of the class:
beginSnippetPositions -- a list of the excel spreadsheet columns in which an incipit of some section can be found. (default = [8]) endSnippetPositions -- a list of the excel spreadsheet columns in which an cadence of some section can be found. (default = [])
TrecentoCadenceWork
read-only properties
-
TrecentoCadenceWork.
cadenceA
¶ returns the snippet which represents the cadence at the end of the A section of the piece.
-
TrecentoCadenceWork.
cadenceB
¶ returns the snippet that represents the open cadence of the B section or the only cadence if there are no open and close endings.
-
TrecentoCadenceWork.
cadenceBClos
¶ Returns the second B cadence – that is, the 2nd or clos ending.
-
TrecentoCadenceWork.
incipit
¶ Gets the Incipit PolyphonicSnippet of the piece.
The incipit keeps its time signature in a different location from all the other snippets. hence, it’s a little different
Returns None if the piece or timeSignature is undefined
>>> bs = alpha.trecento.cadencebook.BallataSheet() >>> accur = bs.makeWork(2) >>> accurIncipit = accur.incipit >>> print(accurIncipit) <music21.alpha.trecento.polyphonicSnippet.Incipit ...>
TrecentoCadenceWork
methods
-
TrecentoCadenceWork.
allCadences
()¶ returns a list of all the PolyphonicSnippet objects which are actually cadences (and not incipits)
-
TrecentoCadenceWork.
asOpus
()¶ returns all snippets as a
Opus
object>>> deduto = alpha.trecento.cadencebook.BallataSheet().workByTitle('deduto') >>> deduto.title 'Deduto sey a quel' >>> dedutoScore = deduto.asOpus() >>> dedutoScore <music21.stream.Opus ...> >>> dedutoScore.show('lily.png')
-
TrecentoCadenceWork.
asScore
()¶ returns all snippets as a score chunk
>>> deduto = alpha.trecento.cadencebook.BallataSheet().workByTitle('deduto') >>> deduto.title 'Deduto sey a quel' >>> dedutoScore = deduto.asScore() >>> dedutoScore <music21.stream.Score ...>
Changes made to a snippet are reflected in the asScore() score object:
>>> deduto.snippets[0].parts[0].flat.notes[0].name = "C###" >>> deduto.asScore().parts[0].flat.notes[0].name 'C###'
-
TrecentoCadenceWork.
convertBlockToStreams
(thisBlock)¶ Takes a block of music information (in
TrecentoCadenceStream
notation) and returns a list of Streams and other information>>> block1 = ['e4 f g a', 'g4 a b cc', '', 'no-cadence', '2/4'] >>> bs = alpha.trecento.cadencebook.BallataSheet() >>> dummyPiece = bs.makeWork(2) >>> blockStreams = dummyPiece.convertBlockToStreams(block1) >>> for x in blockStreams: ... print(x) <music21.stream.Part ...> <music21.stream.Part ...> None no-cadence 2/4 >>> blockStreams[0].show('text') {0.0} <music21.stream.Measure 1 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.meter.TimeSignature 2/4> {0.0} <music21.note.Note E> {1.0} <music21.note.Note F> {2.0} <music21.stream.Measure 2 offset=2.0> {0.0} <music21.note.Note G> {1.0} <music21.note.Note A> {2.0} <music21.bar.Barline style=final>
-
TrecentoCadenceWork.
getAllStreams
()¶ Get all streams in the work as a List, losing association with the other polyphonic units.
>>> b = alpha.trecento.cadencebook.BallataSheet().makeWork(20) >>> sList = b.getAllStreams() >>> sList [<music21.stream.Part ...>, <music21.stream.Part ...>, ...]
-
TrecentoCadenceWork.
getOtherSnippets
()¶ returns a list of bits of music notation that are not the actual incipits of the piece.
>>> bs = alpha.trecento.cadencebook.BallataSheet() >>> accur = bs.makeWork(2) >>> accurSnippets = accur.getOtherSnippets() >>> for thisSnip in accurSnippets: ... print(thisSnip) <music21.alpha.trecento.polyphonicSnippet.FrontPaddedSnippet ...> <music21.alpha.trecento.polyphonicSnippet.FrontPaddedSnippet ...>
-
TrecentoCadenceWork.
getSnippetAtPosition
(snippetPosition, snippetType='end')¶ gets a “snippet” which is a collection of up to 3 lines of music, a timeSignature and a description of the cadence.
>>> bs = alpha.trecento.cadencebook.BallataSheet() >>> accur = bs.makeWork(2) >>> print(accur.getSnippetAtPosition(12)) <music21.alpha.trecento.polyphonicSnippet.FrontPaddedSnippet ...>
-
TrecentoCadenceWork.
pmfcPageRange
()¶ returns a nicely formatted string giving the page numbers in PMFC where the piece can be found
>>> bs = alpha.trecento.cadencebook.BallataSheet() >>> altroCheSospirar = bs.makeWork(4) >>> altroCheSospirar.title 'Altro che sospirar' >>> altroCheSospirar.pmfcVol 11 >>> altroCheSospirar.pmfcPageRange() 'pp. 2-4'
TrecentoSheet¶
-
class
music21.alpha.trecento.cadencebook.
TrecentoSheet
(**keywords)¶ A TrecentoSheet represents a single worksheet of an excel spreadsheet that contains data about particular pieces of trecento music.
Users can iterate over the rows to get TrecentoCadenceWork objects for each row.
See the specialized subclasses below, esp. BallataSheet for more details.
>>> kyrieSheet = alpha.trecento.cadencebook.TrecentoSheet(sheetname = 'kyrie') >>> for thisKyrie in kyrieSheet: ... print(thisKyrie.title) Questa Fanc. Kyrie Summe Clementissime Kyrie rondello
TrecentoSheet
methods
-
TrecentoSheet.
makeWork
(rownumber=2)¶ Returns the TrecentoCadenceWork at the given row number Same as using getItem above, but without slices...
We use Excel Row numbers, NOT Python row numbers: in other words, makeWork(1) = Excel row 1 (python row 0)
Row 1 is a header, so makeWork(2) gives the first piece.
>>> ballataSheet = alpha.trecento.cadencebook.BallataSheet() >>> b = ballataSheet.makeWork(3) >>> print(b.title) Ad(d)io, amore mio
-
TrecentoSheet.
next
()¶
-
TrecentoSheet.
workByTitle
(title)¶ return the first work with TITLE in the work’s title. Case insensitive
>>> ballataSheet = alpha.trecento.cadencebook.BallataSheet() >>> farina = ballataSheet.workByTitle('farina') >>> print(farina.title) De mia farina >>> farina.incipit.parts[0].show('text') {0.0} <music21.stream.Measure 1 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.meter.TimeSignature 3/4> {0.0} <music21.note.Rest rest> {1.0} <music21.note.Rest rest> {2.0} <music21.note.Note C> {2.5} <music21.note.Note D> {3.0} <music21.stream.Measure 2 offset=3.0> {0.0} <music21.note.Note E> {1.0} <music21.note.Note G> {2.0} <music21.note.Note G> {6.0} <music21.stream.Measure 3 offset=6.0> {0.0} <music21.note.Note G> {1.0} <music21.note.Note E> {2.0} <music21.note.Note D> {3.0} <music21.bar.Barline style=final>