.. _moduleMedren:

music21.medren
==============

.. WARNING: DO NOT EDIT THIS FILE: AUTOMATICALLY GENERATED. Edit the .py file directly

.. module:: music21.medren


Tools for working with medieval and Renaissance music -- see also the
trecento directory which works particularly on 14th-century Italian
music.




.. function:: convertHouseStyle(score, durationScale=2, barlineStyle='tick', tieTransfer=True, inPlace=False)


    The method :meth:`music21.medren.convertHouseStyle` takes a score, durationScale, barlineStyle, tieTransfer, and inPlace as arguments. Of these, only score is not optional.
    Default values for durationScale, barlineStyle, tieTransfer, and inPlace are 2, 'tick', True, and False respectively.

    Changing :attr:`music21.medren.convertHouseStyle.barlineStyle` changes how the barlines are displayed within the piece.
    Changing :attr:`music21.medren.convertHouseStyle.durationScale` keeps ratios of note durations constant, but scales each duration by the specified value.
    If changing the duration scale causes tied notes, and :attr:`music21.medren.convertHouseStyle.tieTransfer` is set to True, the total duration is transferred to the first note, and all remaining space is left blank.

    Examples:
    The first image shows the original score.
    The second image shows the score with each note's duration scaled by 2, and with the barline style set to 'tick'. The circled area shows a space left blank due to tieTransfer being True.



    >>> from music21 import *
    >>> gloria = corpus.parse('luca/gloria')





    .. image:: images/medren_convertHouseStyle_1.*
            :width: 600




    >>> from music21 import *
    >>> gloria = corpus.parse('luca/gloria')
    >>> newGloria = medren.convertHouseStyle(gloria, durationScale = 2, barlineStyle = 'tick', tieTransfer = True)




    .. image:: images/medren_convertHouseStyle_2.*
            :width: 600




.. function:: cummingSchubertStrettoFuga(score)


    evaluates how well a given score works as a Stretto fuga would work at different intervals



.. function:: scaleDurations(score, scalingNum=1, inPlace=True, scaleUnlinked=True)


    scale all notes and TimeSignatures by the scaling amount.

    returns the Score object



.. function:: setBarlineStyle(score, newStyle, oldStyle='regular', inPlace=True)


    Converts any right barlines in the previous style (oldStyle; default = 'regular')
    to have the newStyle (such as 'tick', 'none', etc., see bar.py).
    Leaves alone any other barline types (such as
    double bars, final bars, etc.).  Also changes any measures with no specified
    barlines (which come out as 'regular') to have the new style.

    returns the Score object.



.. function:: testStretto()


.. function:: transferTies(score, inPlace=True)


    transfer the duration of tied notes (if possible) to the first note and fill the remaining places
    with invisible rests:

    returns the new Score object



Divisione
---------

Inherits from: :class:`~music21.meter.TimeSignature`, :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: 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 *
    >>> d = medren.Divisione('senaria imperfecta')
    >>> d.standardSymbol
    '.i.'
    >>> d = medren.Divisione('.p.')
    >>> d.name
    'senaria perfecta'
    >>> d = medren.Divisione('q')
    >>> d.standardSymbol
    '.q.'



    **Divisione** **attributes**

        Attributes without Documentation: `standardSymbol`, `name`, `timeString`

        Attributes inherited from :class:`~music21.meter.TimeSignature`: :attr:`~music21.meter.TimeSignature.classSortOrder`, :attr:`~music21.meter.TimeSignature.inherited`, :attr:`~music21.meter.TimeSignature.beamSequence`, :attr:`~music21.meter.TimeSignature.symbolizeDenominator`, :attr:`~music21.meter.TimeSignature.symbol`, :attr:`~music21.meter.TimeSignature.beatSequence`, :attr:`~music21.meter.TimeSignature.summedNumerator`, :attr:`~music21.meter.TimeSignature.accentSequence`, :attr:`~music21.meter.TimeSignature.displaySequence`

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`, :attr:`~music21.base.Music21Object.id`, :attr:`~music21.base.Music21Object.groups`, :attr:`~music21.base.Music21Object.hideObjectOnPrint`

    **Divisione** **properties**

        .. attribute:: 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.



            >>> from music21 import *
            >>> n = medren.Divisione('.n.')
            >>> n.minimaPerBrevis
            9
            >>> n.minimaPerBrevis = 18
            >>> n.minimaPerBrevis
            18



        Properties inherited from :class:`~music21.meter.TimeSignature`: :attr:`~music21.meter.TimeSignature.barDuration`, :attr:`~music21.meter.TimeSignature.beatCount`, :attr:`~music21.meter.TimeSignature.beatCountName`, :attr:`~music21.meter.TimeSignature.beatDivisionCount`, :attr:`~music21.meter.TimeSignature.beatDivisionCountName`, :attr:`~music21.meter.TimeSignature.beatDivisionDurations`, :attr:`~music21.meter.TimeSignature.beatDuration`, :attr:`~music21.meter.TimeSignature.beatLengthToQuarterLengthRatio`, :attr:`~music21.meter.TimeSignature.beatSubDivisionDurations`, :attr:`~music21.meter.TimeSignature.classification`, :attr:`~music21.meter.TimeSignature.denominator`, :attr:`~music21.meter.TimeSignature.musicxml`, :attr:`~music21.meter.TimeSignature.mx`, :attr:`~music21.meter.TimeSignature.numerator`, :attr:`~music21.meter.TimeSignature.quarterLengthToBeatLengthRatio`, :attr:`~music21.meter.TimeSignature.totalLength`

        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **Divisione** **methods**

        Methods inherited from :class:`~music21.meter.TimeSignature`: :meth:`~music21.meter.TimeSignature.getAccent`, :meth:`~music21.meter.TimeSignature.getAccentWeight`, :meth:`~music21.meter.TimeSignature.getBeams`, :meth:`~music21.meter.TimeSignature.getBeat`, :meth:`~music21.meter.TimeSignature.getBeatDepth`, :meth:`~music21.meter.TimeSignature.getBeatDuration`, :meth:`~music21.meter.TimeSignature.getBeatOffsets`, :meth:`~music21.meter.TimeSignature.getBeatProgress`, :meth:`~music21.meter.TimeSignature.getBeatProportion`, :meth:`~music21.meter.TimeSignature.getBeatProportionStr`, :meth:`~music21.meter.TimeSignature.getOffsetFromBeat`, :meth:`~music21.meter.TimeSignature.load`, :meth:`~music21.meter.TimeSignature.loadRatio`, :meth:`~music21.meter.TimeSignature.quarterPositionToBeat`, :meth:`~music21.meter.TimeSignature.ratioEqual`, :meth:`~music21.meter.TimeSignature.setAccentWeight`, :meth:`~music21.meter.TimeSignature.setDisplay`

        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonAttributes`, :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


GeneralMensuralNote
-------------------

Inherits from: :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: GeneralMensuralNote(mensuralTypeOrAbbr='brevis')


    The base class object for :class:`music21.medren.MensuralNote` and :class:`music21.medren.MensuralRest`. This is arguably the most important mensural object, since it is responsible for getting the context and determining the contextual duration of objects within both subclasses.
    A :class:`musci21.medren.GeneralMensuralNote` object takes a mensural type or its abbreviation as an argument. The default value for this argument is 'brevis'.

    Valid mensural types are 'maxima', 'longa', 'brevis', 'semibrevis', 'minima', and 'semiminima'.
    The corresponding abbreviations are 'Mx', 'L', 'B', 'SB', 'M', and 'SM'.

    The object's mensural type can be set and accessed via the property :attr:`music21.medren.GeneralMensuralNote.mensuralType`.
    The duration of a general mensural note can be set and accessed using the property :attr:`music21.medren.GeneralMensuralNote.duration`. If the duration of an general mensural note cannot be determined from context, it is set to 0. For more specific examples of this, please see the :attr:`music21.medren.GeneralMensuralNote.duration` documentation.

    Two general mensural notes are considered equal if they have the same mensural type, are present in the same context, and have the same offset within that context.



    **GeneralMensuralNote** **attributes**

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.classSortOrder`, :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`, :attr:`~music21.base.Music21Object.hideObjectOnPrint`, :attr:`~music21.base.Music21Object.groups`, :attr:`~music21.base.Music21Object.id`

    **GeneralMensuralNote** **properties**

        .. attribute:: mensuralType

            Name of the mensural length of the general mensural note (brevis, longa, etc.):



            >>> from music21 import *
            >>> gmn = medren.GeneralMensuralNote('maxima')
            >>> gmn.mensuralType
            'maxima'
            >>> gmn_1 = medren.GeneralMensuralNote('SB')
            >>> gmn_1.mensuralType
            'semibrevis'
            >>> gmn_2 = medren.GeneralMensuralNote('blah')
            Traceback (most recent call last):
            MedRenException: blah is not a valid mensural type or abbreviation



        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatDuration`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **GeneralMensuralNote** **methods**

        .. method:: updateDurationFromMensuration()


            The duration of a :class:`music21.medren.GeneralMensuralNote` object can be accessed and set using the :attr:`music21.medren.GeneralMensuralNote.duration` property.
            The duration of a general mensural note is by default 0. If the object's subclass is not specified (:class:`music21.medren.MensuralNote` or :class:`music21.medren.MensuralRest`), the duration will remain 0 unless set to some other value.
            If a general mensural note has no context, the duration will remain 0 since duration is context dependant.
            Finally, if a mensural note or a mensural rest has context, but a mensuration or divisione cannot be found or determined from that context, the duration will remain 0.

            Every time a duration is changed, the method :meth:`music21.medren.GeneralMensuralNote.updateDurationFromMensuration`` should be called.



            >>> from music21 import *
            >>> mn = medren.GeneralMensuralNote('B')
            >>> mn.duration.quarterLength
            0.0
            >>> mn = medren.MensuralNote('A', 'B')
            >>> mn.duration.quarterLength
            0.0

            However, if subclass is given, context (a stream) is given, and a divisioned is given, duration can be determined.



            >>> from music21 import *
            >>> s = stream.Stream()
            >>> s.append(medren.Divisione('.p.'))
            >>> for i in range(3):
            ...    s.append(medren.MensuralNote('A', 'SB'))
            >>> s.append(medren.Punctus())
            >>> s.append(medren.MensuralNote('B', 'SB'))
            >>> s.append(medren.MensuralNote('B', 'SB'))
            >>> s.append(medren.Punctus())
            >>> s.append(medren.MensuralNote('A', 'B'))
            >>> for mn in s:
            ...    if isinstance(mn, medren.GeneralMensuralNote):
            ...        mn.updateDurationFromMensuration()
            ...        print mn.duration.quarterLength
            1.0
            1.0
            1.0
            1.0
            2.0
            3.0

            Note: French notation not yet supported.



        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonAttributes`, :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


Ligature
--------

Inherits from: :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: Ligature(pitches=None, color='black', filled='yes')


    An object that represents a ligature commonly found in medieval and Renaissance music.
    Initialization takes a list of the pitches in the ligature as a required argument.
    Color of the ligature is an optional argument (default is 'black'). Color can also be set with the :meth:`music21.medren.Ligature.setColor` method.
    Color of a ligature can be determined with the :meth:`music21.medren.Ligature.getColor` method.
    Whether the noteheads of the ligature are filled is an optional argument (default is 'yes'). Noteheads can be also filled with the :meth:`music21.medren.Ligature.setFillStatus` method.
    Fill status of a ligature can be determined with the :meth:`music21.medren.Ligature.getFillStatus` method.

    The notes of the ligature can be accessed via the property :attr:`music21.medren.Ligature.notes`.
    The mensural length of each note is calculated automatically.
    To determine if a ligature is cum proprietate, use the :meth:`music21.medren.Ligature.isCumProprietate` method.
    Similarly, to determine if a ligautre is cum perfectione, use the :meth:`music21.medren.Ligature.isCumPerfectione` method.
    Finally, to determine if a ligature is cum opposite proprietate (C.O.P), use the :meth:`music21.medren.Ligature.isCOP` method.

    Noteheads can be set to have oblique shape using the :meth:`music21.medren.Ligature.makeOblique` method. Similarly, oblique noteheads can be set to have a square shape using the :meth:`music21.medren.Ligature.makeSquare` method.
    The shape of a notehead can be determined using the :meth:`music21.medren.Ligature.getNoteheadShape` method. By default, all noteheads in a ligature are square.

    A note in the ligature can be made to be maxima by the :meth:`music21.medren.Ligature.setMaxima` method. It can be determined whether a note is a maxima by the :meth:`music21.medren.Ligature.isMaxima` method.
    By default, no notes in a ligature are maxima.

    A note in the ligature can be set to have an upstem, a downstem, or no stem by the :meth:`music21.medren.Ligature.setStem` method.
    It can be determined whether a note has a stem by the :meth:`music21.medren.Ligature.getStem` method. By default, no notes in a ligature have stems.

    A note in the ligature can be 'reversed' by the `music21.medren.Ligature.setReverse` method. A 'reversed' note is displayed as stacked upon the preceding note (see the second note in the example).
    It can be determined whether a note is reversed by the `music21.medren.Ligature.isReversed` method. By default, no notes in a ligature are reversed.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Example:




    .. image:: images/medren_Ligature_Mensural-Example.*
            :width: 600



    Roman de Fauvel.  f. 1r.  Paris, Bibliothèque Nationale de France, MS fr.

    The ligatures outlined in blue would be constructed as follows:



    >>> from music21 import *
    >>> l1 = medren.Ligature(['A4','F4','G4','A4','B-4'])
    >>> l1.makeOblique(0)
    >>> l1.setStem(0, 'down', 'left')
    >>> print [n.fullName for n in l1.notes]
    ['brevis A4 ', 'brevis F4 ', 'brevis G4 ', 'brevis A4 ', 'brevis B4-flat ']
    >>>
    >>> l2 = medren.Ligature(['F4','G4','A4','B-4','D5'])
    >>> l2.setStem(4, 'down', 'left')
    >>> l2.setReverse(4, True)
    >>> print [(n.mensuralType, n.pitch) for n in l2.notes]
    [('brevis', F4), ('brevis', G4), ('brevis', A4), ('brevis', B-4), ('longa', D5)]

    Note that ligatures cannot be displayed yet.



    **Ligature** **attributes**

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.classSortOrder`, :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`

    **Ligature** **properties**

        .. attribute:: notes

            Returns the ligature as a list of mensural notes



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','B4'])
            >>> print [n.mensuralType for n in l.notes]
            ['brevis', 'brevis']
            >>> l.makeOblique(0)
            >>> print [n.mensuralType for n in l.notes]
            ['longa', 'brevis']
            >>> l = medren.Ligature(['B4','A4'])
            >>> print [n.mensuralType for n in l.notes]
            ['longa', 'longa']
            >>> l.makeOblique(0)
            >>> print [n.mensuralType for n in l.notes]
            ['longa', 'brevis']
            >>> l.setStem(0, 'down','left')
            >>> print [n.mensuralType for n in l.notes]
            ['brevis', 'brevis']
            >>> l = medren.Ligature(['G4','A4','B4','A4'])
            >>> l.setStem(2, 'up','left')
            >>> print [n.mensuralType for n in l.notes]
            ['brevis', 'brevis', 'semibrevis', 'semibrevis']
            >>> l = medren.Ligature(['B4','A4','G4','A4','G4','A4','F4'])
            >>> l.makeOblique(0)
            >>> l.makeOblique(4)
            >>> l.setStem(2, 'down', 'left')
            >>> l.setStem(4, 'up','left')
            >>> l.setMaxima(6, True)
            >>> print [n.mensuralType for n in l.notes]
            ['longa', 'brevis', 'longa', 'brevis', 'semibrevis', 'semibrevis', 'maxima']



        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatDuration`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **Ligature** **methods**

        .. method:: getColor(index=None)


            Take one argument: index (optional, default is None).

            Returns the color of the note at the given index. If no index specified, returns the color of the ligature.
            If multiple colors are present, returns mixed.



        .. method:: getFillStatus(index=None)


            Take one argument: index (optional, default is None).

            Returns whether the notehead is filled at the given index. If no index specified, returns whether fill status of the ligature.
            If noteheads are not consistent throughout the ligature, returns mixed.



        .. method:: getNoteheadShape(index)


            Takes one argument: index.

            Returns the notehead shape (either square or oblique) of the note at index



        .. method:: getStem(index)


            Takes one argument: index
            If the note at index has a stem, it returns direction (up or down) and orientation (left, right)



        .. method:: isCOP()


            Takes no arguments

            Returns True if the ligature is cum oposita proprietate (C.O.P), and False otherwise



        .. method:: isCumPerfectione()


            Takes no arguments.

            Returns True if the ligature is cum perfectione, and False if the ligature is sine perfectione.



        .. method:: isCumProprietate()


            Takes no arguments.

            Returns True if the ligature is cum proprietate, and False if the ligature is sine proprietate.



        .. method:: isMaxima(index)


            Takes one argument: index.

            If the note at index is a maxima, returns True. Otherwise, it returns False.



        .. method:: isReversed(index)


            Takes one argument: index.

            If the note at index is reversed, returns True. Otherwise, it returns False.



        .. method:: makeOblique(startIndex)


            Takes one argument: startIndex.

            Make the notes at startIndex and the note following startIndex into an oblique notehead.
            Note that an oblique notehead cannot start on the last note of a ligature.
            Also, a note that is a maxima cannot be the start or end of an oblique notehead.



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','B4','A4'])
            >>> l.makeOblique(1)
            >>> l.getNoteheadShape(1)
            'oblique'
            >>> l.getNoteheadShape(2)
            'oblique'
            >>> l.makeOblique(0)
            Traceback (most recent call last):
            MedRenException: cannot start oblique notehead at index 0
            >>> l.makeOblique(2)
            Traceback (most recent call last):
            MedRenException: cannot start oblique notehead at index 2
            >>> l.makeOblique(3)
            Traceback (most recent call last):
            MedRenException: no note exists at index 4



        .. method:: makeSquare(index)


            Takes one argument: index.

            Sets the note at index to have a square notehead. If the note at index is part of an oblique notehead, all other notes that are part of that notehead are also set to have square noteheads.



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','B4','A4'])
            >>> l.makeOblique(1)
            >>> l.makeSquare(2)
            >>> l.getNoteheadShape(2)
            'square'
            >>> l.getNoteheadShape(1)
            'square'



        .. method:: setColor(value, index=None)


            Takes two arguments: value, index (optional, default is None).

            Sets the color of note at index to value. If no index is specified, or index is set to None, every note in the ligature is given value as a color.



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','B4'])
            >>> l.setColor('red')
            >>> l.getColor()
            'red'
            >>> l.setColor('black',1)
            >>> l.getColor()
            'mixed'



        .. method:: setFillStatus(value, index=None)


            Takes two arguments: value, index (optional, default is None).

            Sets the fill status of the notehead at index to value. If no index is specified, or if index is set to None, every notehead is give fill status value.
            To set a notehead as filled, value should be 'yes' or 'filled'. To set a notehead as empty, value should be 'no' or 'empty' .



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','B4'])
            >>> l.setFillStatus('filled')
            >>> l.getFillStatus()
            'yes'
            >>> l.setFillStatus('no', 1)
            >>> l.getFillStatus()
            'mixed'



        .. method:: setMaxima(index, value)


            Takes two arguments: index, value.

            Sets the note at index to value. If value is True, that note is a maxima. If value if False, that note is not.
            A note with an oblique notehead cannot be a maxima.
            A note cannot be a maxima if that note has a stem. A note cannot be a maxima if the previous note has an up-stem.



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','B4'])
            >>> l.setStem(0, 'up', 'left')
            >>> l.setMaxima(2, True)
            >>> l.isMaxima(2)
            True
            >>> l.setMaxima(1, True)
            Traceback (most recent call last):
            MedRenException: cannot make note at index 1 a maxima
            >>> l.setMaxima(0, True)
            Traceback (most recent call last):
            MedRenException: cannot make note at index 0 a maxima
            >>> l.setMaxima(2, False)
            >>> l.isMaxima(2)
            False



        .. method:: setReverse(endIndex, value)


            Takes two arguments: startIndex, value.

            endIndex designates the note to be reversed. value may be True or False.
            Setting value to True reverses the note at endIndex. Setting value to false 'de-reverses' the note at endIndex.

            If the note at endIndex has a stem with direction 'down' and orientation 'left', and is at least a step above the preceding note, it can be reversed.
            No two consecutive notes can be reversed. Also, if the note at endIndex is preceded by a note with an upstem, it cannot be reversed.

            A reversed note is displayed directly on top of the preceeding note in the ligature.



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','F5','F#5'])
            >>> l.setStem(1, 'down', 'left')
            >>> l.setStem(2, 'down', 'left')
            >>> l.setStem(3, 'down', 'left')
            >>> l.setReverse(1,True)
            >>> l.isReversed(1)
            True
            >>> l.setReverse(2,True)
            Traceback (most recent call last):
            MedRenException: the note at index 2 cannot be given reverse value True
            >>> l.setReverse(3,True)
            Traceback (most recent call last):
            MedRenException: the note at index 3 cannot be given reverse value True



        .. method:: setStem(index, direction, orientation)


            Takes three arguments: index, direction, orientation.

            Index determines which note in the ligature the stem will be placed on.
            Direction determines which way the stem faces. Permitted directions are 'up','down', and 'none'.
            Orientation determines on which side of the note the stem sits. Permitted orientations are 'left', 'right', and 'none'.
            Setting the direction and orientation of a stem to 'none' removes the stem from the note.

            Note that if the direction of a stem is 'none', then no stem is present on that note. So the orientation must also be 'none'.
            Also note that an up-stem followed consecutively by a stemmed note is not permitted. An up-stem cannot be on the last note of a ligature.
            Stems may also not overlap. So two consecutive notes may note have stem orientations 'right' and 'left' respectively.
            Finally, a stem cannot be set on a note that is a maxima. An up-stem cannot be set on a note preceding a maxima.



            >>> from music21 import *
            >>> l = medren.Ligature(['A4','C5','B4','A4','B4'])
            >>> l.setStem(0, 'none','left')
            Traceback (most recent call last):
            MedRenException: direction None and orientation left not supported for ligatures
            >>> l.setStem(1,'up', 'left')
            >>> l.getStem(1)
            ('up', 'left')
            >>> l.setStem(2, 'down', 'right')
            Traceback (most recent call last):
            MedRenException: a stem with direction down not permitted at index 2
            >>> l.setMaxima(4, True)
            >>> l.setStem(4, 'up', 'left')
            Traceback (most recent call last):
            MedRenException: cannot place stem at index 4
            >>> l.setStem(3, 'up','left')
            Traceback (most recent call last):
            MedRenException: a stem with direction up not permitted at index 3



        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonAttributes`, :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


MensuralNote
------------

Inherits from: :class:`~music21.medren.GeneralMensuralNote`, :class:`~music21.note.Note`, :class:`~music21.note.NotRest`, :class:`~music21.note.GeneralNote`, :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: MensuralNote(*arguments, **keywords)


    An object representing a mensural note commonly found in medieval and renaissance music.
    Takes pitch and mensural type as arguments, but defaults to 'C' and 'brevis'.
    Pitch and and mensural type can also be set using the properties :attr:`music21.medren.MensuralNote.pitch` and :attr:`music21.medren.MensuralNote.mensuralType` respectively.
    The utf-8 code for the Ciconia font character can be accessed via the property :attr:`music21.medren.MensuralNote.fontString`

    The note stems can can be set using the method :meth:`music21.medren.MensuralNote.setStem`. A note's stems can be displayed using the method :meth:`music21.medren.MensuralNote.getStems`.
    Stems may only be added to notes shorter than a brevis. For additional detail, see the documentation for :meth:`music21.medren.MensuralNote.setStem`.

    The note flags can be set using the method :meth:`music21.medren.MensuralNote.setFlag`. A note's flags can be displayed using the method :meth:`music21.medren.MensuralNote.getFlags`.
    Flags may only be added to stems that exist for the given note. For additional detail, see the documentation for :meth:`music21.medren.MensuralNote.setFlag`.

    Two mensural notes are considered equal if they match in pitch, articulation, and are equal as general mensural notes.

    Additional methods regarding color, duration, mensural type are inherited from :class:`music21.medren.GeneralMensuralNote`.



    **MensuralNote** **attributes**

        Attributes without Documentation: `stems`, `flags`

        Attributes inherited from :class:`~music21.note.Note`: :attr:`~music21.note.Note.isNote`, :attr:`~music21.note.Note.isRest`, :attr:`~music21.note.Note.isUnpitched`, :attr:`~music21.note.Note.pitch`, :attr:`~music21.note.Note.beams`

        Attributes inherited from :class:`~music21.note.GeneralNote`: :attr:`~music21.note.GeneralNote.isChord`, :attr:`~music21.note.GeneralNote.lyrics`, :attr:`~music21.note.GeneralNote.expressions`, :attr:`~music21.note.GeneralNote.tie`, :attr:`~music21.note.GeneralNote.articulations`, :attr:`~music21.note.GeneralNote.editorial`

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.classSortOrder`, :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`, :attr:`~music21.base.Music21Object.id`, :attr:`~music21.base.Music21Object.groups`, :attr:`~music21.base.Music21Object.hideObjectOnPrint`

    **MensuralNote** **properties**

        .. attribute:: color

            The only valid colors for mensural notes are red and black



            >>> from music21 import *
            >>> n = medren.MensuralNote('A', 'brevis')
            >>> n.color
            >>>
            >>> n.color = 'red'
            >>> n.color
            'red'
            >>> n.color = 'green'
            Traceback (most recent call last):
            MedRenException: color green not supported for mensural notes



        .. attribute:: fontString

            The utf-8 code corresponding to a mensural note in Ciconia font.
                                     Note that semiminima with a left flag on the upper stem and any flag on the lower stem, semiminima with a right flag on the upperstem and on the lowerstem, and any red or unfilled notes with sidestems have no corresponding characters in the Cicionia font.

                                     >>> from music21 import *
                                     >>> mn = medren.MensuralNote('A', 'M')
                                     >>> mn.setStem('down')
                                     >>> mn.fontString
                                     '0x44'
                                     >>> mn.setFlag('down', 'right')
                                     >>> mn.fontString
                                     '0x47'
                                     >>> mn.setFlag('down', None)
                                     >>> mn.setStem(None)
                                     >>> mn.fontString
                                     '0x4d'
                                     >>> mn.color = 'red'
                                     >>> mn.fontString
                                     '0x6d'



        .. attribute:: fullName

            No documentation.


        Properties inherited from :class:`~music21.medren.GeneralMensuralNote`: :attr:`~music21.medren.GeneralMensuralNote.mensuralType`

        Properties inherited from :class:`~music21.note.Note`: :attr:`~music21.note.Note.nameWithOctave`, :attr:`~music21.note.Note.pitchClass`, :attr:`~music21.note.Note.accidental`, :attr:`~music21.note.Note.diatonicNoteNum`, :attr:`~music21.note.Note.freq440`, :attr:`~music21.note.Note.frequency`, :attr:`~music21.note.Note.microtone`, :attr:`~music21.note.Note.midi`, :attr:`~music21.note.Note.midiEvents`, :attr:`~music21.note.Note.midiFile`, :attr:`~music21.note.Note.mx`, :attr:`~music21.note.Note.name`, :attr:`~music21.note.Note.octave`, :attr:`~music21.note.Note.pitchClassString`, :attr:`~music21.note.Note.pitchNames`, :attr:`~music21.note.Note.pitches`, :attr:`~music21.note.Note.ps`, :attr:`~music21.note.Note.step`

        Properties inherited from :class:`~music21.note.NotRest`: :attr:`~music21.note.NotRest.notehead`, :attr:`~music21.note.NotRest.noteheadFill`, :attr:`~music21.note.NotRest.noteheadParen`, :attr:`~music21.note.NotRest.stemDirection`, :attr:`~music21.note.NotRest.volume`

        Properties inherited from :class:`~music21.note.GeneralNote`: :attr:`~music21.note.GeneralNote.quarterLength`, :attr:`~music21.note.GeneralNote.lyric`, :attr:`~music21.note.GeneralNote.musicxml`

        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatDuration`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **MensuralNote** **methods**

        .. method:: getFlags()


            Returns a dictionary of each stem with its corresponding flag.



        .. method:: getNumDots()


            Used for French notation. Not yet implemented



        .. method:: getStems()


            Returns a list of stem directions. If the note has no stem, returns an empty list



        .. method:: setFlag(stemDirection, orientation)


            Takes two arguments: stemDirection and orientation.

            stemDirection may be 'up' or 'down' (sidestems cannot have flags), and orientation may be 'left' or 'right'.
            If the note has a stem with direction stemDirection, a flag with the specified orientation is added.
            Any stem may only have up to one flag, so setting a flag overrides whatever flag was previously present.
            Setting the orientation of a flag to None returns that stem to its default flag setting ('right' for semiminima, None otherwise).

            A minima may not have a flag on its upstem, while a semiminima always has a flag on its upstem. The flag orientation for a semiminima is 'right' by default, but may be set to 'left'.
            Any note with a downstem may also have a flag on that stem.



            >>> from music21 import *
            >>> r_1 = medren.MensuralNote('A', 'minima')
            >>> r_1.setFlag('up', 'right')
            Traceback (most recent call last):
            MedRenException: a flag may not be added to an upstem of note type minima
            >>> r_1.setStem('down')
            >>> r_1.setFlag('down', 'left')
            >>> r_1.getFlags()
            {'down': 'left', 'up': None}
            >>> r_2 = medren.MensuralNote('A', 'semiminima')
            >>> r_2.getFlags()
            {'up': 'right'}
            >>> r_2.setFlag('up', 'left')
            >>> r_2.getFlags()
            {'up': 'left'}
            >>> r_3 = medren.MensuralNote('A','semibrevis')
            >>> r_3.setStem('side')
            >>> r_3.setFlag('side','left')
            Traceback (most recent call last):
            MedRenException: a flag cannot be added to a stem with direction side



        .. method:: setStem(direction)


            Takes one argument: direction.

            Adds a stem to a note. Any note with length less than or equal to a minima gets an upstem by default.
            Any note can have at most two stems. Valid stem directions are "down" and "side".
            Downstems can be applied to any note with length less than or equal to a brevis.
            Side stems in Trecento notation are the equivalent of dots, but may only be applied to notes of the type semibrevis and minima (hence, a dotted note may not have a side stem, and vice versa).
            Setting stem direction to None removes all but the default number of stems.



            >>> from music21 import *
            >>> r_1 = medren.MensuralNote('A', 'brevis')
            >>> r_1.setStem('down')
            Traceback (most recent call last):
            MedRenException: A note of type brevis cannot be equipped with a stem
            >>> r_2 = medren.MensuralNote('A', 'semibrevis')
            >>> r_2.setStem('down')
            >>> r_2.setStem('side')
            >>> r_2.getStems()
            ['down', 'side']
            >>> r_3 = medren.MensuralNote('A', 'minima')
            >>> r_3.setStem('side')
            >>> r_3.getStems()
            ['up', 'side']
            >>> r_3.setStem('down')
            Traceback (most recent call last):
            MedRenException: This note already has the maximum number of stems
            >>> r_3.setStem(None)
            >>> r_3.getStems()
            ['up']



        Methods inherited from :class:`~music21.medren.GeneralMensuralNote`: :meth:`~music21.medren.GeneralMensuralNote.updateDurationFromMensuration`

        Methods inherited from :class:`~music21.note.Note`: :meth:`~music21.note.Note.jsonAttributes`, :meth:`~music21.note.Note.setAccidental`, :meth:`~music21.note.Note.transpose`

        Methods inherited from :class:`~music21.note.GeneralNote`: :meth:`~music21.note.GeneralNote.addLyric`, :meth:`~music21.note.GeneralNote.augmentOrDiminish`, :meth:`~music21.note.GeneralNote.compactNoteInfo`, :meth:`~music21.note.GeneralNote.getGrace`, :meth:`~music21.note.GeneralNote.hasLyrics`, :meth:`~music21.note.GeneralNote.insertLyric`

        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


MensuralRest
------------

Inherits from: :class:`~music21.medren.GeneralMensuralNote`, :class:`~music21.note.Rest`, :class:`~music21.note.GeneralNote`, :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: MensuralRest(*arguments, **keywords)


    An object representing a mensural rest. First argument is mensural type.
    The utf-8 code for the Ciconia font character can be accessed via the property :attr:`music21.medren.MensuralNote.fontString`

    Additional methods regarding color, duration, equality, and mensural type are inherited from :class:`music21.medren.GeneralMensuralNote`.



    **MensuralRest** **attributes**

        Attributes inherited from :class:`~music21.note.Rest`: :attr:`~music21.note.Rest.isNote`, :attr:`~music21.note.Rest.isRest`, :attr:`~music21.note.Rest.isUnpitched`, :attr:`~music21.note.Rest.name`

        Attributes inherited from :class:`~music21.note.GeneralNote`: :attr:`~music21.note.GeneralNote.editorial`, :attr:`~music21.note.GeneralNote.isChord`, :attr:`~music21.note.GeneralNote.expressions`, :attr:`~music21.note.GeneralNote.tie`, :attr:`~music21.note.GeneralNote.lyrics`, :attr:`~music21.note.GeneralNote.articulations`

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.classSortOrder`, :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`, :attr:`~music21.base.Music21Object.hideObjectOnPrint`, :attr:`~music21.base.Music21Object.groups`, :attr:`~music21.base.Music21Object.id`

    **MensuralRest** **properties**

        .. attribute:: fontString

            The utf-8 code corresponding to the mensural rest in Ciconia font.
                                       Note that there is no character for a semiminima rest yet.

                                       >>> from music21 import *
                                       >>> mr = medren.MensuralRest('SB')
                                       >>> mr.fontString
                                       '0x32'



        .. attribute:: fullName

            No documentation.


        Properties inherited from :class:`~music21.medren.GeneralMensuralNote`: :attr:`~music21.medren.GeneralMensuralNote.mensuralType`

        Properties inherited from :class:`~music21.note.Rest`: :attr:`~music21.note.Rest.mx`

        Properties inherited from :class:`~music21.note.GeneralNote`: :attr:`~music21.note.GeneralNote.quarterLength`, :attr:`~music21.note.GeneralNote.color`, :attr:`~music21.note.GeneralNote.lyric`, :attr:`~music21.note.GeneralNote.musicxml`

        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatDuration`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **MensuralRest** **methods**

        Methods inherited from :class:`~music21.medren.GeneralMensuralNote`: :meth:`~music21.medren.GeneralMensuralNote.updateDurationFromMensuration`

        Methods inherited from :class:`~music21.note.GeneralNote`: :meth:`~music21.note.GeneralNote.addLyric`, :meth:`~music21.note.GeneralNote.augmentOrDiminish`, :meth:`~music21.note.GeneralNote.compactNoteInfo`, :meth:`~music21.note.GeneralNote.getGrace`, :meth:`~music21.note.GeneralNote.hasLyrics`, :meth:`~music21.note.GeneralNote.insertLyric`, :meth:`~music21.note.GeneralNote.jsonAttributes`

        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


Mensuration
-----------

Inherits from: :class:`~music21.meter.TimeSignature`, :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: Mensuration(tempus='perfect', prolation='minor', mode='perfect', maximode=None, scalingFactor=4)


    An object representing a mensuration sign found in French notation.
    Takes four optional arguments: tempus, prolation, mode, and maximode. Defaults are 'perfect', 'minor', 'perfect', and None respectively.

    Valid values for tempus and mode are 'perfect' and 'imperfect'. Valid values for prolation and maximode are 'major' and 'minor'.



    >>> from music21 import *
    >>> ODot = medren.Mensuration(tempus = 'perfect', prolation = 'major')
    >>> ODot.standardSymbol
    'O-dot'
    >>> ODot.fontString
    '0x50'



    **Mensuration** **attributes**

        Attributes without Documentation: `standardSymbol`, `tempus`, `prolation`, `maximode`, `mode`, `timeString`

        Attributes inherited from :class:`~music21.meter.TimeSignature`: :attr:`~music21.meter.TimeSignature.classSortOrder`, :attr:`~music21.meter.TimeSignature.inherited`, :attr:`~music21.meter.TimeSignature.beamSequence`, :attr:`~music21.meter.TimeSignature.symbolizeDenominator`, :attr:`~music21.meter.TimeSignature.symbol`, :attr:`~music21.meter.TimeSignature.beatSequence`, :attr:`~music21.meter.TimeSignature.summedNumerator`, :attr:`~music21.meter.TimeSignature.displaySequence`, :attr:`~music21.meter.TimeSignature.accentSequence`

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`, :attr:`~music21.base.Music21Object.id`, :attr:`~music21.base.Music21Object.groups`, :attr:`~music21.base.Music21Object.hideObjectOnPrint`

    **Mensuration** **properties**

        .. attribute:: fontString

            The utf-8 code corresponding to the mensuration character in Ciconia font



            >>> from music21 import *
            >>> O = medren.Mensuration('imperfect', 'major')
            >>> O.fontString
            '0x4f'



        .. attribute:: minimaPerBrevis

            Used to get or set the number of minima in a 'measure' under the given divisione.




            >>> from music21 import *
            >>> c = medren.Mensuration('imperfect', 'minor')
            >>> c.minimaPerBrevis
            4
            >>> c.minimaPerBrevis = 8
            >>> c.minimaPerBrevis
            8



        Properties inherited from :class:`~music21.meter.TimeSignature`: :attr:`~music21.meter.TimeSignature.barDuration`, :attr:`~music21.meter.TimeSignature.beatCount`, :attr:`~music21.meter.TimeSignature.beatCountName`, :attr:`~music21.meter.TimeSignature.beatDivisionCount`, :attr:`~music21.meter.TimeSignature.beatDivisionCountName`, :attr:`~music21.meter.TimeSignature.beatDivisionDurations`, :attr:`~music21.meter.TimeSignature.beatDuration`, :attr:`~music21.meter.TimeSignature.beatLengthToQuarterLengthRatio`, :attr:`~music21.meter.TimeSignature.beatSubDivisionDurations`, :attr:`~music21.meter.TimeSignature.classification`, :attr:`~music21.meter.TimeSignature.denominator`, :attr:`~music21.meter.TimeSignature.musicxml`, :attr:`~music21.meter.TimeSignature.mx`, :attr:`~music21.meter.TimeSignature.numerator`, :attr:`~music21.meter.TimeSignature.quarterLengthToBeatLengthRatio`, :attr:`~music21.meter.TimeSignature.totalLength`

        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **Mensuration** **methods**

        Methods inherited from :class:`~music21.meter.TimeSignature`: :meth:`~music21.meter.TimeSignature.getAccent`, :meth:`~music21.meter.TimeSignature.getAccentWeight`, :meth:`~music21.meter.TimeSignature.getBeams`, :meth:`~music21.meter.TimeSignature.getBeat`, :meth:`~music21.meter.TimeSignature.getBeatDepth`, :meth:`~music21.meter.TimeSignature.getBeatDuration`, :meth:`~music21.meter.TimeSignature.getBeatOffsets`, :meth:`~music21.meter.TimeSignature.getBeatProgress`, :meth:`~music21.meter.TimeSignature.getBeatProportion`, :meth:`~music21.meter.TimeSignature.getBeatProportionStr`, :meth:`~music21.meter.TimeSignature.getOffsetFromBeat`, :meth:`~music21.meter.TimeSignature.load`, :meth:`~music21.meter.TimeSignature.loadRatio`, :meth:`~music21.meter.TimeSignature.quarterPositionToBeat`, :meth:`~music21.meter.TimeSignature.ratioEqual`, :meth:`~music21.meter.TimeSignature.setAccentWeight`, :meth:`~music21.meter.TimeSignature.setDisplay`

        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonAttributes`, :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


Punctus
-------

Inherits from: :class:`~music21.base.Music21Object`, :class:`~music21.base.JSONSerializer`

.. class:: Punctus()


    An object representing a punctus, found in Trecento notation.



    **Punctus** **attributes**

        Attributes inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.classSortOrder`, :attr:`~music21.base.Music21Object.isSpanner`, :attr:`~music21.base.Music21Object.isStream`, :attr:`~music21.base.Music21Object.isVariant`, :attr:`~music21.base.Music21Object.hideObjectOnPrint`, :attr:`~music21.base.Music21Object.groups`, :attr:`~music21.base.Music21Object.id`

    **Punctus** **properties**

        .. attribute:: fontString

            The utf-8 code corresponding the punctus in Cicionia font


        Properties inherited from :class:`~music21.base.Music21Object`: :attr:`~music21.base.Music21Object.activeSite`, :attr:`~music21.base.Music21Object.beat`, :attr:`~music21.base.Music21Object.beatDuration`, :attr:`~music21.base.Music21Object.beatStr`, :attr:`~music21.base.Music21Object.beatStrength`, :attr:`~music21.base.Music21Object.classes`, :attr:`~music21.base.Music21Object.derivationHierarchy`, :attr:`~music21.base.Music21Object.duration`, :attr:`~music21.base.Music21Object.isGrace`, :attr:`~music21.base.Music21Object.measureNumber`, :attr:`~music21.base.Music21Object.offset`, :attr:`~music21.base.Music21Object.priority`, :attr:`~music21.base.Music21Object.seconds`

        Properties inherited from :class:`~music21.base.JSONSerializer`: :attr:`~music21.base.JSONSerializer.json`

    **Punctus** **methods**

        Methods inherited from :class:`~music21.base.Music21Object`: :meth:`~music21.base.Music21Object.searchActiveSiteByAttr`, :meth:`~music21.base.Music21Object.getContextAttr`, :meth:`~music21.base.Music21Object.setContextAttr`, :meth:`~music21.base.Music21Object.addContext`, :meth:`~music21.base.Music21Object.addLocation`, :meth:`~music21.base.Music21Object.addLocationAndActiveSite`, :meth:`~music21.base.Music21Object.freezeIds`, :meth:`~music21.base.Music21Object.getAllContextsByClass`, :meth:`~music21.base.Music21Object.getCommonSiteIds`, :meth:`~music21.base.Music21Object.getCommonSites`, :meth:`~music21.base.Music21Object.getContextByClass`, :meth:`~music21.base.Music21Object.getOffsetBySite`, :meth:`~music21.base.Music21Object.getSiteIds`, :meth:`~music21.base.Music21Object.getSites`, :meth:`~music21.base.Music21Object.getSpannerSites`, :meth:`~music21.base.Music21Object.hasContext`, :meth:`~music21.base.Music21Object.hasSite`, :meth:`~music21.base.Music21Object.hasSpannerSite`, :meth:`~music21.base.Music21Object.hasVariantSite`, :meth:`~music21.base.Music21Object.isClassOrSubclass`, :meth:`~music21.base.Music21Object.mergeAttributes`, :meth:`~music21.base.Music21Object.next`, :meth:`~music21.base.Music21Object.previous`, :meth:`~music21.base.Music21Object.purgeLocations`, :meth:`~music21.base.Music21Object.purgeOrphans`, :meth:`~music21.base.Music21Object.purgeUndeclaredIds`, :meth:`~music21.base.Music21Object.removeLocationBySite`, :meth:`~music21.base.Music21Object.removeLocationBySiteId`, :meth:`~music21.base.Music21Object.setOffsetBySite`, :meth:`~music21.base.Music21Object.show`, :meth:`~music21.base.Music21Object.splitAtDurations`, :meth:`~music21.base.Music21Object.splitAtQuarterLength`, :meth:`~music21.base.Music21Object.splitByQuarterLengths`, :meth:`~music21.base.Music21Object.unfreezeIds`, :meth:`~music21.base.Music21Object.unwrapWeakref`, :meth:`~music21.base.Music21Object.wrapWeakref`, :meth:`~music21.base.Music21Object.write`

        Methods inherited from :class:`~music21.base.JSONSerializer`: :meth:`~music21.base.JSONSerializer.jsonAttributes`, :meth:`~music21.base.JSONSerializer.jsonComponentFactory`, :meth:`~music21.base.JSONSerializer.jsonPrint`, :meth:`~music21.base.JSONSerializer.jsonRead`, :meth:`~music21.base.JSONSerializer.jsonWrite`


