Previous topic

music21.trecento.findTrecentoFragments

Next topic

music21.trecento.polyphonicSnippet

Table Of Contents

Table Of Contents

This Page

music21.trecento.notation

Tools for creating Punctus and Divisione objects unique to Trecento notation.

Other objects found in medieval and renaissance music (such as rests, notes, and clef) can be found in the module music21.medren.

Also contains functions for converting Trecento notation to modern notation.

Functions

music21.trecento.notation.convertBrevisLength(brevisLength, convertedStream, inpDiv=None, measureNumOffset=0)

Takes two required arguments, a measure object and a stream containing modern objects. Takes two optional arguments, inpDiv and measureNumOffset.

music21.trecento.notation.convertBrevisLength() converts each of the objects in the measure to their modern equivalents using the BrevisLengthTranslator object. inpDiv is a divisione possibly coming from a some higher context. measureNumOffset helps calculate measure number.

This acts as a helper method to improve the efficiency of music21.trecento.notation.convertTrecentoStream().

music21.trecento.notation.convertTrecentoStream(inpStream, inpDiv=None)

Take one argument: input stream. Converts an entire stream containing only mensural and trecento objects into one containing modern clef, note, and time signature objects. The converted stream preserves the structure of the original stream, converting only the mensural and trecento objects.

This stream must have all of the qualifications present in the documentation for music21.medren.breakMensuralStreamIntoBrevisLengths(). Furthermore, no non-mensural or non-trecento objects (other than streams and formatting) may be present in the input streams.

Examples:

../_images/medren_SePerDureca.jpg

Anonymous, Se per dureça. Padua, Biblioteca Universitaria, MS 1115. Folio Ar.

>>> from music21 import stream, trecento
>>> upperString = ".p. $C1 g(B) g(M) f e g f e p g(SB) f(SM) e d e(M) f p e(SB) e(SM) f e d(M) c p "
>>> upperString += "d(SB) r e p f(M) e d e d c p d(SB) c(M) d c d p e(SB) r(M) g f e p g(SB) a(SM) g f e(M) d p "
>>> upperString += "e(SB) f(SM) e d c(M) d e(L) a(SB) a p b(M) a g a g f p g f e f e f p "
>>> upperString += "g(SB) g(SM) a g f e d p e(SB) r(M) f(SM) e d e(M) p d(SB) r e(M) f p "
>>> upperString += "g(SB) d r(M) e p f e d e d c p d(SB) d(M) e(SB) c(M) p d(SB) c(M) d c B c(L) "
>>> upperString += "c'(SB)[D] c' p c'(SM) b a  b(M) c' b c' p b(SM) a g a(M) b a b p "
>>> upperString += "g(SB) g(SM) a g f e d p e(SB) r e(M) f p g f e f e f p g(SB) r g(M) f p "
>>> upperString += "g(SB) f(SM) e d e(M) f e(L) a(M) b a b g(SB) p c'(M) b a c' b a p "
>>> upperString += "b c' b a g a p b(SB) c'(SM) b a g(M) f p a(SB) a(M) g(SB) f(M) p "
>>> upperString += "e(SB) r g(M) f p g f e f e d p c(SB) d r p a g(SM) a g f e d p e(M) r f(SM) e d e(SB) d(Mx)"
>>> lowerString = ".p. $C3 c(L) G(B) A(SB) B c p d c r p A B c p d c B p <A*o*[DL] G> A c B A(L) "
>>> lowerString += "A(SB) A p  G A B p c c(M) B(SB) A(M) p G(SB) G p A B c p d A r p G[D] A p "
>>> lowerString += "B B(M) c(SB) c(M) p d(SB) d(M) A(SB) A(M) p G(SB) A B C(L) "
>>> lowerString += "c(SB)[D] c e(B) d c(SB) c d p e d r p c c(M) d(SB) d(M) p c(SB) r r p "
>>> lowerString += "c d c(M) d e(L) d(SB)[D] e p c[D] d p e e(M) d(SB) c(M) p B(SB) A B(M) c p "
>>> lowerString += "d(SB) d(M) c(SB) d(M) p e(SB) d r p c c(M) A(SB) B(M) p c(SB) B B p A B[D] p A B c d(Mx)"
>>> SePerDureca = stream.Stream()
>>> SePerDureca.append(trecento.notation.TinyTrecentoNotationStream(upperString))
>>> SePerDureca.append(trecento.notation.TinyTrecentoNotationStream(lowerString))
>>> SePerDurecaConverted = trecento.notation.convertTrecentoStream(SePerDureca)

Converting stream ... 
...
../_images/medren_SePerDurecaConverted.png
music21.trecento.notation.testTinyTrecentoStream()

BrevisLengthTranslator

class music21.trecento.notation.BrevisLengthTranslator(divisione=None, BL=[], pDS=False)

The class music21.trecento.notation.BrevisLengthTranslator takes a divisione sign and a list comprising one brevis length’s worth of mensural or trecento objects as arguments.

The method music21.trecento.notation.BrevisLengthTranslator.getKnownLengths() takes no arguments, and returns a list of floats corresponding to the length (in minima) of each object in the list.

Currently, this class is used only to improve the efficiency of music21.medren.GeneralMensuralNote.duration.

This acts a helper class to improve the efficiency of music21.trecento.notation.convertBrevisLength.

# >>> names = [‘SM’, ‘SM’, ‘SM’, ‘SM’, ‘SB’, ‘SB’, ‘SB’, ‘SB’, ‘SB’, ‘SM’, ‘SM’, ‘SM’] # >>> BL = [medren.MensuralNote(‘A’, n) for n in names] # >>> BL[3] = medren.MensuralRest(‘SM’) # >>> for mn in BL[-3:]: # ... mn.setFlag(‘up’, ‘left’) # >>> for mn in BL[4:9]: # ... mn.setStem(‘down’) # >>> TBL = trecento.notation.BrevisLengthTranslator(div, BL) # >>> TBL.getKnownLengths() # [0.5, 0.5, 0.5, 0.5, 4.0, 4.0, 4.0, 4.0, 4.0, 0.666..., 0.666..., 0.666...]

BrevisLengthTranslator methods

BrevisLengthTranslator.classifyUnknownNotesByType(unchangeableNoteLengthsList)

returns a dictionary where keys are types of notes (‘semibrevis_downstem’) and the values are a list of indices in self.brevisLength (and unchangeableNoteLengthsList) which are those types...

>>> from music21 import medren, trecento
>>> div = trecento.notation.Divisione('.n.')
>>> names = ['SB', 'M', 'M', 'M', 'SB', 'M']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchangeableNoteLengths = TBL.getUnchangeableNoteLengths()
>>> kldict = TBL.classifyUnknownNotesByType(unchangeableNoteLengths)
>>> print(kldict['semibrevis'])
[0, 4]
BrevisLengthTranslator.determineStrongestMeasureLengths(lengths, change_tup, num_tup, diff_tup, lenRem, shrinkable_indices=(), multi=None)

Gets all possible length combinations. Returns the lengths combination of the “strongest” list, along with the remaining length.

Parameters:
  • lengths – list of lengths to be updated
  • change_tup – tuple, each element is the sub-list of self.brevisLength to be changed.
  • num_tup – tuple, each element is an integer, the maximum number of elements in the corresponding list of change_tup that can be changed
  • diff_tup – tuple, each element is the amount by which to change the elements of the corresponding list in change_tup.
  • lenRem – input of the remaining SM in the measure. Gets updated and returned.
  • shrinkable_indices – tuple of indices of elements able to take up slack (i.e. ending SB, or downstem SB)
>>> from music21 import medren, trecento

>>> div = trecento.notation.Divisione('.n.')
>>> names = ['SB', 'M', 'M', 'M', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> TBL.determineStrongestMeasureLengths([2.0, 1.0, 1.0, 1.0, 4.0], ([0],), (1,), (1.0,), 0.0, shrinkable_indices = (-1,))
([3.0, 1.0, 1.0, 1.0, 3.0], 0.0)
BrevisLengthTranslator.getBreveStrength(lengths)

BrevisLengthTranslator._evaluateBL() takes divisione, a brevis length’s worth of mensural or trecento objects in a list, and a list of lengths corresponding to each of those objects as arguments.

This method returns the strength of the list based on those lengths. A strong list has longer notes on its stronger beats. Only valid for Trecento notation.

In this example, we test two possible interpretations for the same measure and see that the second is more logical. Note that the strength itself is meaningless except when compared to other possible lengths for the same notes.

>>> from music21 import medren, trecento

>>> div = trecento.notation.Divisione('.n.')
>>> names = ['SB', 'M', 'M', 'M', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> TBL.getBreveStrength([2.0, 1.0, 1.0, 1.0, 4.0])
2.0555...
>>> TBL.getBreveStrength([3.0, 1.0, 1.0, 1.0, 3.0])
2.8333...
BrevisLengthTranslator.getKnownLengths()
BrevisLengthTranslator.getUnchangeableNoteLengths()

takes the music in self.brevisLength and returns a list where element i in this list corresponds to the length in minimas of element i in self.brevisLength. If the length cannot be determined without taking into account the context (e.g., semiminims, semibreves) then None is placed in that list.

>>> from music21 import medren, trecento
>>> div = trecento.notation.Divisione('.i.')
>>> names = ['SB', 'M','SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> TBL.getUnchangeableNoteLengths()
[None, 1.0, None]
>>> names = ['B']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> TBL.getUnchangeableNoteLengths()
[6.0]
>>> names = ['L']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> TBL.getUnchangeableNoteLengths()
[12.0]
>>> names = ['Mx']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> TBL.getUnchangeableNoteLengths()
[24.0]
BrevisLengthTranslator.translate()

Translates and returns a list of lengths for all the notes in self.brevisLength

BrevisLengthTranslator.translateDivI(unchangeableNoteLengthsList=None, unknownLengthsDict=None, minRem=None)
>>> from music21 import medren, trecento
>>> div = trecento.notation.Divisione('.i.')
>>> names = ['SB', 'M', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unchlist
[None, 1.0, None]
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivI(unchlist, unkldict, 5.0)
[2.0, 1.0, 3.0]
BrevisLengthTranslator.translateDivN(unchangeableNoteLengthsList=None, unknownLengthsDict=None, minRem=None)

Translate the Novanaria (9) Divisio; returns the number of minims for each note.

>>> div = trecento.notation.Divisione('.n.')
>>> names = ['SB', 'M', 'M', 'M', 'SB', 'M']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivN(unchlist, unkldict, 5.0)
[3.0, 1.0, 1.0, 1.0, 2.0, 1.0]
>>> BL[-2].setStem('down')
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivN(unchlist, unkldict, 5.0)
[2.0, 1.0, 1.0, 1.0, 3.0, 1.0]
>>> names = ['SB', 'M', 'M', 'M', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivN(unchlist, unkldict, 6.0)
[3.0, 1.0, 1.0, 1.0, 3.0]
>>> names = ['SB', 'M', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivN(unchlist, unkldict, 8.0)
[2.0, 1.0, 6.0]
>>> BL[0].setStem('down')
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivN(unchlist, unkldict, 8.0)
[5.0, 1.0, 3.0]
BrevisLengthTranslator.translateDivOD(unchangeableNoteLengthsList=None, unknownLengthsDict=None, minRem=None)

Translates the octonaria and duodenaria divisions

>>> divO = trecento.notation.Divisione('.o.')
>>> names = ['SB', 'SB', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> BL[1].setStem('down')
>>> TBL = trecento.notation.BrevisLengthTranslator(divO, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 8.0)
[2.0, 4.0, 2.0]
>>> names = ['SM', 'SM', 'SM', 'SB', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(divO, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 8.0)
[0.666..., 0.666..., 0.666..., 2.0, 3.999...]
>>> divD = trecento.notation.Divisione('.d.')
>>> names = ['SB', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(divD, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 12.0)
[4.0, 8.0]
>>> names = ['SB', 'SB', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(divD, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 12.0)
[4.0, 4.0, 4.0]
>>> names = ['SB', 'SB', 'SB', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(divD, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 12.0)
[2.0, 2.0, 4.0, 4.0]
>>> BL[1].setStem('down')
>>> BL[2].setStem('down')
>>> TBL = trecento.notation.BrevisLengthTranslator(divD, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unchlist
[None, None, None, None]
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 12.0)
[2.0, 4.0, 4.0, 2.0]
>>> names = ['SB', 'SB','SM', 'SM','SM','SM','SB','SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(divD, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivOD(unchlist, unkldict, 12.0)
[2.0, 2.0, 0.5, 0.5, 0.5, 0.5, 2.0, 4.0]
BrevisLengthTranslator.translateDivPQ(unchangeableNoteLengthsList=None, unknownLengthsDict=None, minRem=None)

Translates P and Q (6 and 4)

>>> div = trecento.notation.Divisione('.q.')
>>> names = ['SB','SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivPQ(unchlist, unkldict, 4.0)
[2.0, 2.0]
>>> names = ['M', 'SM', 'SM', 'SM', 'SM', 'SM']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> BL[4] = medren.MensuralRest('SM')
>>> BL[1].setFlag('up','left')
>>> BL[2].setFlag('up', 'left')
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivPQ(unchlist, unkldict, 3.0)
[1.0, 0.5, 0.5, 0.666..., 0.666..., 0.666...]
>>> div = trecento.notation.Divisione('.p.')
        >>> names = ['SB','SB', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivPQ(unchlist, unkldict, 6.0)
[2.0, 2.0, 2.0]
>>> names = ['M', 'SB', 'SM', 'SM']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> BL[1].setStem('down')
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivPQ(unchlist, unkldict, 5.0)
[1.0, 4.0, 0.5, 0.5]
>>> names = ['SM', 'SM', 'SM', 'SM', 'SM', 'SM', 'SM', 'SB']
>>> BL = [medren.MensuralNote('A', n) for n in names]
>>> BL[3] = medren.MensuralRest('SM')
>>> for mn in BL[:3]:
...    mn.setFlag('up', 'left')
>>> TBL = trecento.notation.BrevisLengthTranslator(div, BL)
>>> unchlist = TBL.getUnchangeableNoteLengths()
>>> unkldict = TBL.classifyUnknownNotesByType(unchlist)
>>> TBL.translateDivPQ(unchlist, unkldict, 6.0)
[0.666..., 0.666..., 0.666..., 0.5, 0.5, 0.5, 0.5, 2.0]

Divisione

class music21.trecento.notation.Divisione(nameOrSymbol='.p.')

An object representing a divisione found in Trecento Notation. Takes one argument, nameOrSymbol. This is the name of the divisione, or its corresponding letter. The default value for this argument is ‘.p.’

Valid names are ‘quaternaria’, ‘senaria imperfect’, ‘senaria perfecta’, ‘novenaria’, ‘octonaria’, and ‘duodenaria’. The corresponding symbols are ‘.q.’, ‘.i.’, ‘.p.’, ‘.n.’, ‘.o.’, and ‘.d.’.

>>> from music21 import trecento
>>> d = trecento.notation.Divisione('senaria imperfecta')
>>> d.standardSymbol
'.i.'
>>> d = trecento.notation.Divisione('.p.')
>>> d.name
'senaria perfecta'
>>> d = trecento.notation.Divisione('q')
>>> d.standardSymbol
'.q.'

Divisione bases

Divisione read-only properties

Read-only properties inherited from TimeSignature:

Read-only properties inherited from Music21Object:

Divisione read/write properties

Divisione.minimaPerBrevis

Used to get and set the number of minima in a ‘measure’ (the number of minima before a punctus occurs) under the given divisione.

>>> n = trecento.notation.Divisione('.n.')
>>> n.minimaPerBrevis
9
>>> n.minimaPerBrevis = 18
>>> n.minimaPerBrevis
18

Read/write properties inherited from TimeSignature:

Read/write properties inherited from Music21Object:

Divisione methods

Methods inherited from TimeSignature:

Methods inherited from Music21Object:

Divisione instance variables

Instance variables inherited from TimeSignature:

Instance variables inherited from Music21Object:

TinyTrecentoNotationNote

class music21.trecento.notation.TinyTrecentoNotationNote(stringRep='', timeSignature=None)

For documentation please see music21.trecento.notation.TinyTrecentoNotationStream.

TinyTrecentoNotationNote bases

TinyTrecentoNotationNote read-only properties

Read-only properties inherited from TinyNotationNote:

TinyTrecentoNotationNote methods

TinyTrecentoNotationNote.customNotationMatch(noteLikeObject, stringRep, storedDict)
TinyTrecentoNotationNote.customPitchMatch(stringRep, storedDict)

Methods inherited from TinyNotationNote:

TinyTrecentoNotationStream

class music21.trecento.notation.TinyTrecentoNotationStream(stringRep='', div=None)

These are modified from a standard lilypond format called TinyNotation.

Here are some important points about how to create notes and streams:

  1. Note names are: a,b,c,d,e,f,g. r indicates a rest, and p indicates a punctus.

  2. Note octaves are specified as follows:

    CC to BB:from C below bass clef to second-line B in bass clef
    C to B:from bass clef C to B below middle C.
    c to b:from middle C to the middle of treble clef
    c’ to b’:from C in treble clef to B above treble clef (make sure you’re NOT putting in smart quotes)

In 14th c. music, C to B and c to b will be most common

  1. Flats, sharps, and naturals are notated as #,- (not b), and (if needed) n. If the accidental is above the staff (i.e., editorial), enclose it in parentheses: (#), etc. Make sure that flats in the key signatures are explicitly specified.

  2. The syntax structure for a mensural note is as follows:

    pitch(mensuralType)[stems]{flags}

    A mensuralType may be any of Mx for maxima, L for longa, B for brevis, SB for semibrevis, M for minima, or SM for semimina. For more information on mensural types, please see the documentation for music21.medren.generalMensuralNote.

    If no mensural type is specified, it is assumed to be the same as the previous note. I.e., c(SB) B c d is a string of semibrevises.

>>> from music21 import trecento
>>> tTNN = trecento.notation.TinyTrecentoNotationNote('a(M)')
>>> tTNN.note.pitch
<music21.pitch.Pitch A4>
>>> tTNN.note.mensuralType
'minima'

An additional stem may be added by specifying direction: S for a sidestem, D for a downstem, and an empty string to reset.

For example, adding [D] to a note string would add a downstem to that note. Stems must still follow the rules outlined in music21.medren.MensuralNote.setStem().

>>> tTNN = trecento.notation.TinyTrecentoNotationNote('a(SB)[S]')
>>> tTNN.note.getStems()
['side']
>>> tTNN = trecento.notation.TinyTrecentoNotationNote('a(M)[D]')
>>> tTNN.note.getStems()
['up', 'down']

A flag may be added by specifying direction of stem and orientation of flag. Valid directions are U for up, D for down, and an empty string to reset (sidestems cannot have flags). Valid orietations are L for left, R for right, and an empty string to reset. For example, adding {DL} to a note string would add a left flag to that note’s downstem. Flags must still follow the rules outlined in music21.medren.MensuralNote.setFlag().

>>> tTNN = trecento.notation.TinyTrecentoNotationNote('a(SM){UL}')
>>> tTNN.note.getStems()
['up']
>>> flags = tTNN.note.getFlags()
>>> sorted(list(flags.keys()))
['up']
>>> flags['up']
'left'

Multiple flags may be added by placing a space between direction-orientation pairs, as shown in the following complex example:

>>> tTNN = trecento.notation.TinyTrecentoNotationNote(
...     'a(SM)[D]{UL DR}')
>>> tTNN.note.getStems()
['up', 'down']
>>> flags = tTNN.note.getFlags()
>>> sorted(list(flags.keys()))
['down', 'up']
>>> flags['down']
'right'
>>> flags['up']
'left'
  1. It is also possible to create ligatures using the TinyTrecentoNotationNote class. Put all notes in a ligature within < and > symbols.
>>> tTNN = trecento.notation.TinyTrecentoNotationNote('<f g a g f >')
>>> tTNN.note
<music21.medren.Ligature...>

The notes within a ligature have the syntax pitch*notehead*[stems](maxima). Valid notehead shapes are s for square and o for oblique. Valid stem directions are U for up and D for down, and valid orientations are L for left and R for right. To set a note of a ligature as a maxima, append (Mx) to the note string. To set a note of a ligature as reversed, append a forward slash to the note string.

Note, ligatures must follow the rules outlined by music21.medren.Ligature.

Examples:

>>> from music21 import trecento
>>> tTNN = trecento.notation.TinyTrecentoNotationNote('<f a[DL]/>')
>>> tTNN.note.getStem(1)
('down', 'left')
>>> tTNN.note.isReversed(1)
True
>>> tTNN = trecento.notation.TinyTrecentoNotationNote(
...     '<f*o* g a[UR] g f(Mx)>')
>>> print([n.mensuralType for n in tTNN.note.notes])
['longa', 'brevis', 'semibrevis', 'semibrevis', 'maxima']
>>> tTNN.note.getNoteheadShape(1)
'oblique'
  1. Separate objects in a TinyNotationStream by spaces. To add a mensural clef to the stream, add $, followed by the clef type (F or C) to the string. If the clef line on the staff is non-standard, include that after the type.

    For example, $F2 would indicate an F-clef on the second line of the staff. To add a divisione to a tiny notation stream, simply include the divisione abbreviation in the string. For example, .p. would indicate senaria perfecta.

>>> tTNS = trecento.notation.TinyTrecentoNotationStream(
...     '$C3 .p. c(SB) d e p d(B) <e d c>')
>>> tTNS.show('text')
{0.0} <music21.clef.MensuralClef>
{0.0} <music21.trecento.notation.Divisione .p.>
{0.0} <music21.medren.MensuralNote semibrevis C>
{0.0} <music21.medren.MensuralNote semibrevis D>
{0.0} <music21.medren.MensuralNote semibrevis E>
{0.0} <music21.trecento.notation.Punctus...>
{0.0} <music21.medren.MensuralNote brevis D>
{0.0} <music21.medren.Ligature...>

TinyTrecentoNotationStream bases

TinyTrecentoNotationStream read-only properties

Read-only properties inherited from Stream:

Read-only properties inherited from Music21Object:

TinyTrecentoNotationStream read/write properties

Read/write properties inherited from Stream:

Read/write properties inherited from Music21Object:

TinyTrecentoNotationStream methods

TinyTrecentoNotationStream.getNote(stringRep, storedDict={})

Methods inherited from TinyNotationStream:

Methods inherited from Stream:

Methods inherited from Music21Object:

TinyTrecentoNotationStream instance variables

Instance variables inherited from TinyNotationStream:

  • flattenedRepresentationOf
  • definesExplicitPageBreaks
  • definesExplicitSystemBreaks
  • isFlat
  • autoSort
  • isSorted

Instance variables inherited from Stream:

Instance variables inherited from Music21Object: